WPF componentOne chart resets when moved from x zoom to y zoom and vice versa

Posted by: jaison.joy on 8 April 2018, 3:26 pm EST

    • Post Options:
    • Link

    Posted 8 April 2018, 3:26 pm EST

    C1ChartMVVMSample.zip.

    Please find the attached sample which I found from one of your topics. Zoom works from if we zoom along X axis or Y axis alone. But if we need to use the combination of X axis zoom and Y axis zoom, then the chart resets to default state. We have the requirement to zoom across x axis first and then zoom across y axis.

  • Posted 8 April 2018, 3:32 pm EST

  • Posted 8 April 2018, 6:05 pm EST

    Please find the attached if the above attachment doesn’t work. Why the change in c1chart.View.AxisY.MinScale resets the chart to default state?

  • Posted 9 April 2018, 3:34 pm EST

    Hi,

    What you are observing is the correct behavior. In the sample you’ve provided, both the MinScale/Scale are being set to 1. This means that the axis should not be in the zoomed state. To zoom across x axis first and then zoom across y axis, you’ll need to set the MinScale value to the current Scale when clicking the radio buttions. For example:

    c1chart.View.AxisX.MinScale = c1chart.View.AxisX.Scale;
    

    Attached is the modified ChartView.xaml.cs file from the sample for your reference. Let us know if this helps.

    PS: In case you are just getting started with using C1Chart, then we would like to inform you that C1Chart is in maintenance mode now and FlexChart is our flagship charting tool. You can read more about this in the following post:

    https://www.grapecity.com/en/forums/wpf-edition/c1chart-in-maintenance-mod

    Regards,

    Ankit

    ChartView.zip

  • Posted 9 April 2018, 7:08 pm EST

    Thank You

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels