Moving a chart is very slow

Posted by: mikedempsey on 8 September 2017, 2:46 pm EST

  • Posted 8 September 2017, 2:46 pm EST

    When I initially display my fpChart I size it to fit the window and it displays quickly.
    The size will change if the window is resized since it is anchored on all 4 sides.
    This also seems to work quite fast.

    I then allow the user to 'zoom' the chart to a larger size. This initially displays the top left part of the chart and works quite quickly.

    I then allow them to 'scroll' down or right by simply resetting the Location property. (using negative values)
    I would expect this to be fast, but it is <U>very</U> slow.
    I can see it repainting the chart in sections.

    I see similar performance problems if the window (an MDI child) is maximized and I switch to/from the chart window.
    It is so slow that I can see that switching windows apparently causes it to reset the size of the one that is being hidden back to its 'normal state size' before the new window is displayed maximized. Switching the chart window between normal and maximized seems to be a little faster, but still slow.

    Is this a bug or is there a property I need to set to improve the repainting performance?

    Note that the source of the data is an fpSpread sheetview. However the sheet is read only so the data never changes.
    (I would not expect it to be rebuilding the chart model anyway for a resize or 'move' action.)


  • Replied 8 September 2017, 2:46 pm EST


    There is no such performance issue reported yet, I would request you to provide me a sample depicting your issue. It would help me to debug the issue further and get to a solution for the same.


    Manpreet Kaur.

  • Replied 8 September 2017, 2:46 pm EST

    I'll have to see if I can create a small app that does not include the Infragistics components.
    Unfortunatelty when I built my demo/proof of concept I used Infragistics controls rather than the standard Microsoft controls as I wanted to be able to use the code in my main app.


  • Replied 8 September 2017, 2:46 pm EST

    After looking at my initial attempt to 'zoom' the chart I realized that, unlike other controls, simply scaling the size of the chart object is not a good way to zoom in/out.

    Instead I now change the size of the plotarea if the scale factor is less than 1, or increase/reduce the number of data points displayed (Using Axis.Minimum and Axis.Maximum)  if the scale factor is greater than 1.
    This is much more in line with what a chart user expects when they zoom in or out.

    As a result I no longer have the performance problem with changing the chart size.
    It does still seem to be slow when I Maximize the MDI child windows and switch between windows though.

    I'll try to set up a simple demo for that problem and attach it to this thread.


Need extra support?

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

Learn More

Forum Channels