Posted 9 November 2020, 8:29 am EST
Hello Wijmo Support Team
I am trying to create a multi series chart with some flexibility in data source.
The size of the arrays is variable.
public struct ChartRec
{
public double Value; // binding Y
public string Label; // name - series
public string ValueUnit;
}
public class ChartRecId
{
double Id; // this should be bindingX.
ChartRec[] ChartRec;
}
// In javascript
setSeries: function (pChart, pSeries) {
var VarProg = "setSeries";
if (pChart != null) {
for (var i = 0; i < pSeries.length; i++) {
var series = new wijmo.chart.Series();
series.binding = pSeries[i].binding;
series.name = pSeries[i].name;
pChart.series.push(series);
}
I want to access the property “Label” and “Value” and set it to the series. But the size of this array is not fixed. BindingX is set to Id from class ChartRecId. If I set “Value” as binding in series it does not display the data in the chart.
Can you share an example, how to achieve this use case?
Kind Regards