Reverse order of X Axis When Using DateTime Scale?

2 Answers 86 Views
Graph Report Designer (standalone) Sorting
John
Top achievements
Rank 1
Iron
John asked on 08 Sep 2022, 04:46 PM

Created a line graph in stand-alone designer that is working great.  It uses the DateTime scale on the x-axis to display mmm.yy.  The axis is sorting/displaying in chronological order.  All of the data being displayed is correct, so it appears to be setup correctly.  Is there a way to reverse the sort order to display reverse chronological order on the X-axis?

I am new here and have attempted many different ideas

Found the 'Reversed' setting in Coordinate Systems->Xaxis->Scale, but that setting moves the Y axis from the left to the right side of the chart producing a reverse image.  I am just trying to sort the X-Axis, without moving the Y-Axis.  So close here.

Have tried descending sorting on the field that is feeding the X axis via DateTime scale.  The correct data is displaying which tells me the DateTime scale is working.  Changing the sorting does not affect the order displayed on the chart though.

Have been changing many settings and reviewing other threads.  In general, when using the DateTime scale on an X-Axis, is there a way to reverse the sort order to make it reverse chronological order?

 

Thank You,

John

2 Answers, 1 is accepted

Sort by
0
Accepted
John
Top achievements
Rank 1
Iron
answered on 26 Sep 2022, 02:42 PM

I worked with the helpdesk on this.  The following is how I was instructed to solve this when using DateTime scale.

By design, there is no sorting when using DateTime scale.

I confirm that you may reverse the DateTime axis and preserve the Y-axis to be on the left. You need to:

  • set the Reversed property of the scale to True
  • use X-axis > Scale > CrossAxisPosition to force the crossing between the axes to happen AtMaximum of the X-axis, which when reversed will be at the minimum as required
0
Dimitar
Telerik team
answered on 13 Sep 2022, 08:12 AM

Hello John,

Thank you for the screenshots and the additional information!

Indeed the Reversed setting reverses the whole graph, including the position of the Y-Axis scale.

In order to only reverse the order of the dates, you may try to do the following:

  1. Select the graph
  2. Go to the CategoryGroups property
  3. Expand the category group and change the sorting direction to DESC from the Sortings property

This should give you the desired result, please test and let me know how it goes.

Regards,
Dimitar
Progress Telerik

Brand new Telerik Reporting course in Virtual Classroom - the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products. Check it out at https://learn.telerik.com/.
Tags
Graph Report Designer (standalone) Sorting
Asked by
John
Top achievements
Rank 1
Iron
Answers by
John
Top achievements
Rank 1
Iron
Dimitar
Telerik team
Share this question
or