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

Secondary X axis at top of the chart

2 Answers 134 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
Veteran
James asked on 30 Dec 2020, 05:15 PM

I apologize if an example of what I would like to do is in another thread. I tried searching for something similar but

I have a customer that would like to zoom in on the data points of a graph. I told them that I don't think that capability exists, but I could adjust the range of the graph so that they could better see where each data point exists in the swim lanes.

What I would like to do is either offset the data point labels that are off the chart, or create an x axis at the top of the graph containing the data point value for each week in the series. Is this feasible?

 

 

 

2 Answers, 1 is accepted

Sort by
0
Accepted
Mads
Telerik team
answered on 04 Jan 2021, 02:53 PM

Hello James,

I believe there are multiple approaches that will achieve something similar to what you describe.

Solution 1

One of the simpler solutions is to set the property 'Presentation > Series > lineSeries1 > Y' value to the following expression:
'= IIf(Sum(Fields.Value) > 10000, 10000, Sum(Fields.Value))'
where the number 10000 is the max value you want the scale to go. This will stop the data-points from going outside the chart. To better explain that these data-points are not relatively positioned on the graph, conditional formatting can be applied to hide the datapoints. Open the editor for DataPointConditionalFormatting, set the Filter to '=Fields.Value' '>' and '10000'. Then, set the applied style to 'Layout > Visible = false'. 

 

The main downside with this approach is that the line going to and from points outside of the scale will not correctly show how steep the increase/decrease is.

Solution 2

Another approach that gives more freedom to set it up as you prefer, but is a bit more of a work-around, is to duplicate the graph and make each of the two graphs show the different parts.

  • In 'Presentation > CoordinateSystems > cartesianCoordinateSystem1 > YAxis > Scale' set both minimum and maximum to 0
  • Set the visibility of all elements you do not want showing to false
  • Set ConditionalFormatting for DataPoint and DataPointLabel to the opposite of the original chart

Does any of these two approaches result in what you want? I have attached reports displaying both solutions with this reply. Let me know if found this helpful, if you run into challenges, or have any other questions.

Regards, Mads Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
James
Top achievements
Rank 1
Veteran
answered on 04 Jan 2021, 03:49 PM

Hello Mads,

 

Yes, either solution will work for the customer. I appreciate your help!

 

Best Regards,

 

Jim

Tags
General Discussions
Asked by
James
Top achievements
Rank 1
Veteran
Answers by
Mads
Telerik team
James
Top achievements
Rank 1
Veteran
Share this question
or