tags:

views:

707

answers:

1

I want to make a line chart that allows the user to select a date range for the data. For example if the date range span is more than 1 month, I want to to have a bar that shows the months, also if the date range is around 30 days or less I want it to show the dates for each day as well. Something like that.

Does anyone have any suggestions?

Thanks!

A: 

I would suggest using a DateTimeAxis, and setting the labelUnits property to "days" or "months" as appropriate. The axis will then do all the hard work of grouping your data accordingly.

In your particular case, when the user makes a choice from the combo box, you should have a handler that computes how granular to make the x-axis based on the user's date selections.

Matt Dillard