I have a chart with X-axis showing timeline and Y-axis showing value for an object. The time line values are in ‘milliseconds’. I have give the user a way to select timeline, user can select a day/week/month/months. So, in my Chart I want to show all the data points for the selected range but want to limit the date labels displayed on the X-axis. For Ex: if user selects a week, I want to display Mon to Sun on the X-axis. And if user selects a day, want to display a label for every 3 hrs like that…
I guess it is possible if only, I look at the selected time range at run-time and based on the starting (t1) and end (t2) time, I make a decision. Is there any API available in Flex’s DateTimeAxis to achieve this ? Or any other ideas on how to get this working ?
Thanks,
Ravi
I have had a lot of difficulty trying to bend the DateTimeAxis to my will 😛
What I have found works more often for specialized situations like this is to
extendtheCategoryAxis. You can always generate an array of only the dates that you care about and use those as the category axis. I am not sure if this will work for your situation, but it is the first place I would look.This will of course require a lot more effort, because you need to customize the display of the axis items to look like dates or times, but I think it works for custom situations.