views:

239

answers:

2

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.

A: 

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
Thank you, I started looking into Chart Base, not much available.Will try and figure out your solution.
Shah Al
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
A: 

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: http://stackoverflow.com/questions/3873258/flex-chart-hide-a-datatip

Shah Al