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

Bar width for DateTimeScale bar chart with discrete DateTime values

4 Answers 77 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Tristan
Top achievements
Rank 1
Tristan asked on 04 Jan 2016, 03:25 PM

The data I'm using to generate a bar chart comes in at 30 minute intervals. This means that the X-axis coordinate system has to have a 'Minutes' Scale BaseUnit.

The issue I'm having is that this means I get a series of very thin, very widely spaced bars (one very thin bar each 30 minutes) rather than bars which are '30 minutes wide'.

I've seen reference to a DateTimeCategoricalAxis in other parts of Telerik documentation (which sounds very much like what I need), but I've been unable to find an equivalent in the standalone designer.

4 Answers, 1 is accepted

Sort by
0
Accepted
Katia
Telerik team
answered on 06 Jan 2016, 04:32 PM
Hello Tristan,

You can switch to Category Scale and set the CategoryGroup's Label property to an expression that will be applied when displaying the XAxis labels. For more details check How to: Change the Axis Scale.

As the data interval is quite specific in your case, you might consider using Line Chart instead to display the data in a more readable format.

Regards,
Katia
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Tristan
Top achievements
Rank 1
answered on 07 Jan 2016, 09:46 AM

Hi Katia, thanks for getting back to me.

This is closer, I do now have full bars, but the chart seems to be 'doubling up' the data; so with a day's 30 minute data, there's an entire 48 spaces on the left which are blank and that use the label formatting of the CategoryGroup. Then right of that there are 48 bars representing the actual data, these use the label formatting of the bar series (I've attached an image which makes it clear).

Any idea how I can dispose of this extra section on the left?

0
Accepted
Katia
Telerik team
answered on 07 Jan 2016, 03:05 PM
Hello Tristan,

As you are using Category Scale to display dates, you need to remove any values from Series --> X property of your Graph. Only Series --> Y should be populated in your case.

Regards,
Katia
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Tristan
Top achievements
Rank 1
answered on 07 Jan 2016, 03:10 PM
Aha! Thanks again Katia, I wouldn't have figured that one on my own!
Tags
General Discussions
Asked by
Tristan
Top achievements
Rank 1
Answers by
Katia
Telerik team
Tristan
Top achievements
Rank 1
Share this question
or