AdvGDIPChartView save/load serialize/deserialize

How can I save/load and/or serialize/deserialize a VCL Chart ?
I tried with FNCPersistence, but no success - it rises an access violation when trying to load json (I had to RegisterClass TAdvGDIPChartPane & TAdvGDIPChartSerie first). Maybe I'm missing something. I could do it with FNCChart, just by accessing/setting it's JSON helper property.

I'd like to somehow save a chartview and load it back without knowing how many panes it had, nor what were the original series types or data.
Any way to achieve this?

Not even it's save/load settings work well if stuff is not preconfigured as when it was saved. If you run finance demo, save settings, then enter properties and hide one of the panes (uncheck Visible), then load settings, it rises an access violation. Didn't delete it, just hid it. Update: No need to hide a pane

Update: I could save/load by using SaveToFile and SaveToCSV, but before running LoadFromFile/LoadFromCSV I had to manually create the panes & series it had before saving.

Update: Now I see that LoadFromFile has 2 non-documented arguments, AutoCreatePanes & AutoCreateSeries, both defaults to False.

, True, True

Done.

Suggestion: Make settings and data also available through string properties/functions, so we could avoid using temporary files to get the content.

No need to hide a pane.
Just save settings to a file, enter chart Properties, press Ok, and then load settings, it also raise the A.V.
Delphi11

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.