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

4 posts, 1 answers
  1. Joe
    Joe avatar
    86 posts
    Member since:
    Nov 2017

    Posted 05 Apr Link to this post

    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

  2. Dinko
    Admin
    Dinko avatar
    1145 posts

    Posted 09 Apr Link to this post

    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.
  3. Answer
    Dinko
    Admin
    Dinko avatar
    1145 posts

    Posted 10 Apr Link to this post

    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.
  4. Joe
    Joe avatar
    86 posts
    Member since:
    Nov 2017

    Posted 10 Apr in reply to Dinko Link to this post

    Thanks Dinko.  
Back to Top