Profile Picture

When is it adviceable to call _NevronChart.document.Calculate() and RecalcLayout()

Posted By joern kunze 5 Years Ago

When is it adviceable to call _NevronChart.document.Calculate()...

Author
Message
joern kunze
Problem Posted 5 Years Ago
View Quick Profile
Junior Member

Junior Member (13 reputation)Junior Member (13 reputation)Junior Member (13 reputation)Junior Member (13 reputation)Junior Member (13 reputation)Junior Member (13 reputation)Junior Member (13 reputation)Junior Member (13 reputation)Junior Member (13 reputation)

Group: Forum Members
Last Active: 2 Years Ago
Posts: 86, Visits: 218
Hi Experts,

I have a application which uses Nevron Chart with various Chart Types (point, line, bar...) - and it is possible to display multiple charts in rows and / or columns. In general, I process the data in the following way:

// Create Charts
....
// Create Series (create Scale: Lin / log...) and attach them to the Chart
...
// Fill Series with Data (AddRange...)
...

// Recalc layout so that the Chart can be placed manually within the panel so that multiple Charts can be drawn in  rows / columns:
   _NevronChart.document.Calculate();
    _NevronChart.document.RecalcLayout(_NevronChart.View.Context);
    _NevronChart.Refresh();


// apply zoom settings for each Chart - if applicable
...

// allign Charts within the Panel
...
// add events for interactivity
...

This approach has been working quite good so far. But with the last Nevron update only Point-Chart was still working - all other Charts did not show any data.
After investigating the problem, the line:
_NevronChart.document.Calculate();
seemed to be the culprit.

After removing the line, at first glance everything was working as before with the previous Chart Version.So the questions are now:

1) What is the recommended way to force the Chart to recalc its Layout so that I can use the chart values for getting Min/Max Values , updating the used rulers depending on the loaded data values for the axis as well as updating the chart coordinates to place the Chart within a panel for Multi-Chart arrangements ?

2) Is it not adviceable to use _NevronChart.document.Calculate(); before a _NevronChart.document.RecalcLayout(_NevronChart.View.Context); call ?
With previous versions I got the impression that calling RecalcLayout() might even be dangerous since under certain circumstances it can cause a hard crash of the Chart component.

2) When exactly is it adviceable to call _NevronChart.Refresh(); ? Is it a problem when the call happens to often ?

Thanks for your help,
Best regards,
Joern






Similar Topics


Reading This Topic