Flex chart display with no datapoint
-
25-09-2019 - |
문제
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.
해결책 2
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
다른 팁
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.