[ 2 posts ]

Paco

  • Username: paco
  • Joined: Tue Oct 13, 2009 4:34 pm
  • Posts: 8
  • Offline
  • Profile

Charts won't show bar for a small value in a wide range data

Post Posted: Mon May 07, 2012 11:32 am
+0-
I am using BarChart of YUI 2.8. My data source covers a wide range of values, which is from 2 to 4000. For example, Number of access from server 1: 3; Number of access from server 2: 3900 ...

In the bar chart, there's no bar showing up for a small value, such as 5. Because the maximum value showing in the chart is 3900.

Is there any way to show a bar for the small value? even a very short bar.

Thanks,

Tripp Bridges

YUI Developer

  • Username: tripp
  • Joined: Wed Jan 07, 2009 1:54 pm
  • Posts: 435
  • GitHub: tripp
  • Gists: tripp
  • YUI Developer
  • Offline
  • Profile
Tags:

Re: Charts won't show bar for a small value in a wide range

Post Posted: Tue May 08, 2012 7:25 am
+0-
The calculated size of the bar is smaller than the chart can render. If you don't have the option of setting a maximum or displaying a larger chart, I don't know of any clean solution. The only workaround that I can think of is to update your datasource to force a value large enough to show, store the actual values in a separate array and write a dataTip function that displays the proper value on mouseover.

Thanks,
Tripp
  [ 2 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum