Charting is limited by quite a few constraints; it's perfectrly undertstandable why they're set if we consider the architecture they're built for.

Some of the major ones are limitations set on the max number of datapoints per series and number of series per backtest.
These limitations become less needed if we were to flush all the accumulated charting updates over ZMQ prior to algo termination, and omit charting data from the final {Backtest,Live}ResultPacket. Idea would be to make the charting data state handling the responsibility of the ZMQ consumer - that way the full charting history in the final message becomes redundant as it's already been consumed downstream.

Currently the high level charting data propagation is as follows:

1) algo calls QCAlgorithm.Plotting.Plot() family methods, private _charts contains all data;
2) from AlgorithmManager.Run, results.ProcessSynchronousEvents() is invoked;
3) from there SampleRange(Algorithm.GetChartUpdates()); is invoked
4) note charting data delta is pulled via QCAlgorithm.Plotting.GetChartUpdates
5) pulled delta updates are also stored internally in ResultHandler.Charts

Now everything's fine until ResultHandler.SendFinalResult() is invoked; the accumulated internal Charts is sent with the final {Backtest,Live}Result message, containing considerable amount of data if abovementioned limitations were relaxed.

I suppose the charting data in private Charts field should still be kept around as it's required for the final StatisticsResults calculation, but it appears wiping all the charts from the finalResult message shouldn't have any adverse effects. Is this reasoning valid?

Thinking something in the following lines:
a) make sure all charting data is flushed to zmq before final result is generated - how to accomplish this? Currently finalResult's charts always contain some charting data that weren't received prior; I assumed line results.ProcessSynchronousEvents(forceProcess: true); in AlgorithmManager takes care of it, but doesn't appear to be the case;
b) bump up maximum-data-points-per-chart-series config value;
c)
make max number of series per algo configurable;
d) omit charts from final result message (dependent on a))