This is a migrated thread and some comments may be shown as answers.

Dynamic x-axis label text and dynamic x-axis label grouping

1 Answer 161 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Erik
Top achievements
Rank 1
Erik asked on 25 Feb 2011, 05:30 PM
I was wondering if the following features are possible with the Telerik line chart, and if so how to use it.

We use line charts to show a variable amount of data across a variable time domain. For instance, 3 years worth of patient temperature data. In some periods, 1 measurement per month can have been recorded. In another period, a measurement would have been done every 2 hours. The user looking at the graph might be interested in the 3-year trend, or the data of the last 48 hours. Exactly how much data each patient has and the timespan in which it occurs differs for each patient. The user is presented with the entire data set, and will do plenty of zooming and scrolling.

One problem we run into is how to present the x-axis labels. We need:
1. Dynamic x-axis text labels. When looking at a timespan of 3 years we do not want the time included in the text label. When looking at a timespan of hours, we do not want to repeat the date in each x-axis label.
2. Visual grouping of parts of the x-axis, so that we can for instance specify the date only once for multiple ticks that occur on that date (but at different times). Something like the attached (google) example. How the grouping occurs should be dynamic and depend on zoom level (i.e. days, weeks, months, years).

Preferably we would use a purely declarative method (we use MVVM and try to keep the code behind to a minimum), we want to avoid having to do this programmatically.
Are the described scenarios possible with the line chart? Is there documentation describing how to do this?

1 Answer, 1 is accepted

Sort by
0
Evgenia
Telerik team
answered on 02 Mar 2011, 05:47 PM
Hi Erik,

Directly to your questions:
1. Our Zooming and Scrolling feature automatically changes the x-axis labels according to the timespan and the zoomlevel .You can review our demo with full source code that demonstrates this.
2. Unfortunately we do not support visual grouping of parts of the XAxis.

Best wishes,
Evgenia
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
Chart
Asked by
Erik
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
Share this question
or