Graph DateTime axis scaling with a Stand Alone Report Designer report

1 Answer 26 Views
Graph Report Designer (standalone)
James Glinsek
Top achievements
Rank 1
James Glinsek asked on 20 Jan 2025, 11:42 PM | edited on 20 Jan 2025, 11:43 PM

I'm trying to accomplish what's been asked over in this question: https://www.telerik.com/forums/graph-datetime-axis-scaling without using Events (which according to the docs here: https://docs.telerik.com/reporting/embedding-reports/program-the-report-definition/report-events/overview, you should avoid and are not support on the .trdx reports that I am developing via the Stand Alone Report Designer). 

How can I dynamically set the MajorUnit and/or MajorStep as the final solution there describes without using the events as that solution does? (solution I'm referring to: https://www.telerik.com/forums/graph-datetime-axis-scaling#4445917 )

1 Answer, 1 is accepted

Sort by
0
Accepted
Ivet
Telerik team
answered on 23 Jan 2025, 01:04 PM

Hi James,

Thank you for reaching out. 

If you do not wish to use events to change the units/steps of the graph's axes, you can add bindings to the graph's coordinate system - Use Bindings to Control the Coordinate System Properties in the Graph Report Item - Telerik Reporting

I am sending you a sample report in which I made Binding in the CoordinateSystem property of the graph. The Binding looks like this:

= (Exec("graph1", Max(Fields.Date)) - Exec("graph1", Min(Fields.Date))).TotalDays > 31 ? "Months" : "Days"

I created 2 CSV data sources. If you switch them, you will see that csvDataSource1 changes the day, аnd csvDataSource2 changes the month.

More information about the functions that I used in the report you will find in the links below:

I hope the above information will be useful. Let me know if you have other questions.

Regards,
Ivet
Progress Telerik

Stay tuned by visiting our roadmap and feedback portal pages, enjoy a smooth take-off with our Getting Started resources, or visit the free self-paced technical training at https://learn.telerik.com/.
Tags
Graph Report Designer (standalone)
Asked by
James Glinsek
Top achievements
Rank 1
Answers by
Ivet
Telerik team
Share this question
or