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

Does ChartView has some sort of "Equal-Scale" mode for two Linear Axes?

3 Answers 85 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Joe
Top achievements
Rank 2
Iron
Iron
Veteran
Joe asked on 05 Apr 2020, 09:17 PM

I've got a simple RadCartesianChart with two Linear Axes and a scatter line plot.   It represents a profile Each axis represents Millimeters.  IThat chart auto fits the data to the screen space.   I've attached an image to show what it looks like

But now I need to implement a checkbox that will switch the axes to what I am calling "Equal Scale" mode:  So that 1 millimeter of my data in vertical space will take up the same physical screen space as 1 millimeter in horizontal space.  

Is there a simple way to do this?  Some property that I am missing, perhaps?  I realize I can try to write the code-behind. but it seems awfully complicated -- I have to take into account the relative ActualWidth/ActualHeight properties of the control as as the relative Millimeter height and width of the data.   And I have to make sure that I don't lose my nice even auto labels (or I have do do all the match to individually calculate them myself)

So is there a property/function that will let me achieve this already built in to ChartView?

 

-Joe

3 Answers, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 09 Apr 2020, 05:43 AM

Hello Joe,

Thank you for the provided details.

Our chart component for WPF does not provide such functionality of the box. I need more time to check if this behavior could be achieved somehow. I will contact you again as soon as I have more information regarding your case.

Regards,
Dinko
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
0
Accepted
Dinko | Tech Support Engineer
Telerik team
answered on 10 Apr 2020, 02:41 PM

Hi Joe,

After digging sometime I am afraid I can't suggest a straightforward approach to achieve the desired behavior. What you can try is to create custom logic which calculates the Width/Height of the chart depending on the ActualVisibleRange property of the axis. Then you can set the ActualMajorStep/MajorStep, Minimum and Maximum properties in a way the length between the labels corresponds to pixel/s from the screen.

Regards,
Dinko
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
0
Joe
Top achievements
Rank 2
Iron
Iron
Veteran
answered on 10 Apr 2020, 07:21 PM
Thanks Dinko.  
Tags
ChartView
Asked by
Joe
Top achievements
Rank 2
Iron
Iron
Veteran
Answers by
Dinko | Tech Support Engineer
Telerik team
Joe
Top achievements
Rank 2
Iron
Iron
Veteran
Share this question
or