Hi there,
We are using the AddSeries method on SfChart to adjust the available data the user is shown based on some other controls, however whenever we call AddSeries, we get dozens of console errors around JSON deserialization.
Example code:
var seriesCollection = new List<ChartSeries>();
seriesCollection.Add(new ChartSeries { DataSource = DataSource, XName = CurrentXDataName, YName = CurrentYDataName });
await DLRepChart.AddSeries(seriesCollection);
While the errors are many versions of:
Newtonsoft.Json.JsonSerializationException: Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'System.Collections.Generic.List`1[Syncfusion.Blazor.Charts.ChartSeries]' because the type requires a JSON array (e.g. [1,2,3]) to deserialize correctly.
To fix this error either change the JSON to a JSON array (e.g. [1,2,3]) or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer, not a collection type like an array or List<T>) that can be deserialized from a JSON object. JsonObjectAttribute can also be added to the type to force it to deserialize from a JSON object.
Path 'zOrder', line 1, position 10.
As you can see at the end there, it's failing to find the zOrder property of the ChartSeries object - we get one error for EVERY
property available on ChartSeries (and there's a LOT of those!)
However, even with all these errors - the charts draw fine and there are no other visible issues.
I have tried updating to the latest version (we were on 18.2.0.48, have now upgraded to 18.3.0.35), but there was no change, so any hints as to
where the issue might be would be apprecaited.