FlexChart Axis Min/Origin issue

Posted by: fabio.lavitola on 13 February 2023, 5:07 am EST

  • Posted 13 February 2023, 5:07 am EST

    Hi,

    I’ve noticed a strange behaviour when adding serie from scratch to a FlexChart.

    Everytime I change something into one serie, Axis X/Y properties keep on changing even if I set them to 0.

    In older versions i HAD something like Axis.AutoMIN, very useful, to prevent this.

    Since I’ve solved setting those value in the “Rendered” event, redrawing is extremly flickering; Is there a way to improve the redraw?

    THanks

    Fabio

    P.S. I’m also using AxisScrollbars

  • Posted 15 February 2023, 8:48 pm EST

    Hi Fabio,

    We have created a sample that uses AxisScrollBars in C1FlexChart. As per our understanding you are setting the minimum value of FlexChart axis to 0 which on update in series creates a flickering issue in the chart.

    Unfortunately, we could not replicate this issue on series update, kindly refer to the attached sample for the same. (See SeriesUpdateChartResize.zip)

    >Axis X/Y properties keep on changing even if I set them to 0.

    Could you please provide more information regarding the change in the properties?

    We request you update the attached sample so that we can replicate the issue on our end and analyze the issue in a better way.

    Thanks & Regards,

    Aastha

    [Attachment: SeriesUpdateChartResize.zip]

  • Posted 16 February 2023, 4:21 am EST

    Hi,

    I’ve attached the replicating issue into your code: I’ve changed the X Axis using double instead of Date and added a button into the form to “force” Min and Origin: once forced, the scrollbar change will reset min and Origin.

  • Posted 16 February 2023, 4:22 am EST

    Hi,

    I’ve attached the replicating issue into your code: I’ve changed the X Axis using double instead of Date and added a button into the form to “force” Min and Origin: once forced, the scrollbar change will reset min and Origin.SeriesUpdateChartResize REFACTORED.zip

  • Posted 20 February 2023, 3:18 am EST

    Hi Fabio,

    Thanks for providing the updated sample.

    We could replicate the flickering issue when the “Change Series” button is clicked. The reason for that is setting _horizontalScrollBar and _verticalScrollBar to null on its Click event.

    We have updated the sample accordingly to eliminate this issue. Kindly refer to the attached file. (See SeriesUpdateChartResize_Mod.zip)

    We have also attached the steps we have followed to replicate the issue after updating the sample. (Please see flickerIssue.zip)

    Kindly let us know if we are missing somewhere in understanding your scenario. This will help us analyze the issue in a better way.

    Thanks & Regards,

    Aastha

  • Posted 20 February 2023, 4:29 am EST

    Hi, the issue still exists: the real problem is that the chart is NOT respecting my “Origin = 0 and Min =0”, neither X nor Y axis…

  • Posted 21 February 2023, 9:31 pm EST

    Hi Fabio,

    The origin of an axis is determined by the data that is displayed on it. In your sample application, since the X-axis data starts from “1”, resetting the origin would shift it to the first data point of “1”. To fix this issue, we can add a dummy data point to start rendering from 0 instead.

    In case you have added axis scroll bars to the flexchart, changing the axis properties may not have any effect. To solve this problem, you can set the lower value of the axis scroll bars to 0 when a button is clicked, as shown in the provided code snippet.

    button1.Click += (s,e) =>{
    if(_horizontalScrollbar!=null && _verticalScrollbar != null)
                {
                    _horizontalScrollbar.LowerValue = 0;
                    _verticalScrollbar.LowerValue = 0;
                }
    };

    Kindly refer to the attached sample for implementation. (SeriesUpdateChartResize_mod.zip)

    If the issue still persists even after trying the suggested solution, please provide us with a video showing the issue so that we can better understand and analyze the problem.

    Thanks & Regards,

    Aastha

Need extra support?

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

Learn More

Forum Channels