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

Dynamic DateTime Axis BaseUnit

3 Answers 151 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
beavisCZ
Top achievements
Rank 1
beavisCZ asked on 05 Jan 2016, 07:52 AM

Hello,

I'm considering to switch from SSRS to Telerik Reporting and I'm testing Clustered Column chart. As datasource I have simple table as this:

BillDate (Date), BillAmount (Money)

 On X axis I have BillDate and I'm showing Sum(BillAmount) as data.

 I set Label step to 7, LabelUnit Days, BaseUnit Auto. It works great for daterange of one or two months, each day has own column of data, label is for seventh column. But When user choses great range for this report, for example from 2015-01-01 to 2015-12-31 then there is too much data, labels ale unreadable. Is it possible to set automatic switch to Month BaseUnit or even Year BaseUnit when there is too much records? Attached are samples of both graphs.

 

3 Answers, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 07 Jan 2016, 01:29 PM
Hello beavisCZ,

It is possible to bind the Scale.BaseUnit to a different base unit depending on the number of data records returned from the Graph's data source. This can be done with a Binding and a User Function applied to the coordinate system.

Attached you can find a sample report demonstrating the approach.

Regards,
Nasko
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
beavisCZ
Top achievements
Rank 1
answered on 13 Jan 2016, 02:50 PM
Is it possible to achieve desired result in standalone designer without C# coding? I need distribute reports as standalone files so I dont want use VisualStudio to generate reports as classes.
0
Nasko
Telerik team
answered on 15 Jan 2016, 04:04 PM
Hello beavisCZ,

It is possible. you will need to bind the BaseUnit property to a string representation of the DateTimeScaleUnits Enumeration value e.g.:

= "Days"

or

= "Months" 

or a similar expression which returns the desired string representation of the base unit.

Regards,
Nasko
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
Tags
General Discussions
Asked by
beavisCZ
Top achievements
Rank 1
Answers by
Nasko
Telerik team
beavisCZ
Top achievements
Rank 1
Share this question
or