0

I need to display price of item for every date in the month. The chart can be Bar chart or plot chart.

Question:

Suppose there is no data available for 01/15/2010 then, Is there a way to display (01/15/2010) on x axis but no (bar or plot point) corresponding y axis point ?

i.e. there will be a empty space between 2 bars or plot points.

Currently I am using 0 , But 0 is a valid value.

Let me know if such a display is possible.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Shah Al
  • 346
  • 2
  • 4
  • 17

2 Answers2

0

No. You need to use some kind of value for a plot or a bar or a column. If you use null, no space will be reserved for that data point.

For example, if you have three columns — say, March, April and May — and the values in the dataProvider are [3, null, 5], the April column will simply not show up and March and April will each get wider.

What you can do is create a dataTipFunction (see ChartBase) that tells the user no data is available if the datum is 0.

Robusto
  • 31,447
  • 8
  • 56
  • 77
  • Thank you, I started looking into Chart Base, not much available. Will try and figure out your solution. – Shah Al Jun 09 '10 at 12:26
  • I took the advice , but there is new issue. The problem with this approach is that user has to mouse over to see the tip, Is there a way we can set "color" of individual plot series point based on the value ? My idea is to change it to some blue to say missing data. and green for good data. – Shah Al Jun 10 '10 at 20:50
0

Finally,

Here is the solution. Say i want show the following data [jan, 10] [ feb , ]

Step 1: To hide the point on the Barchart, send a NaN from server. In the above example , it would mean [jan,10][Feb, NaN]. --This causes an undesirable effect of showing the value near the title bar.

Step 2: Now hide the data tip, Follow the solution at the link: flex chart hide a datatip

Community
  • 1
  • 1
Shah Al
  • 346
  • 2
  • 4
  • 17