<EjsChart>
<ChartPrimaryXAxis ValueType="Syncfusion.EJ2.Blazor.Charts.ValueType.DateTime"></ChartPrimaryXAxis>
<ChartSeriesCollection>
<ChartSeries DataSource="IndicatorData[0].Outputs" XName="@nameof(ChartData.XValue)" YName="@nameof(ChartData.YValue)" Type="ChartSeriesType.Column"></ChartSeries>
@foreach (var indicator in IndicatorData)
{
<ChartSeries DataSource="indicator.Outputs" XName="@nameof(ChartData.XValue)" YName="@nameof(ChartData.YValue)"></ChartSeries>
}
</ChartSeriesCollection>
</EjsChart>
@code{
public class ChartData
{
public DateTime XValue { get; set; }
public double YValue { get; set; }
}
public class Indicator
{
public string value { get; set; }
public List<ChartData> Outputs { get; set; }
}
} |
....
<EjsChart @ref="ChartObj">
<ChartPrimaryXAxis ValueType="Syncfusion.EJ2.Blazor.Charts.ValueType.DateTime"></ChartPrimaryXAxis>
<ChartSeriesCollection>
@foreach (var indicator in IndicatorData)
{
<ChartSeries DataSource="indicator.Outputs" XName="XValue" YName="YValue"></ChartSeries>
}
</ChartSeriesCollection>
</EjsChart>
....
@code{
EjsChart ChartObj;
....
public void AddIndicator()
{
List<ChartSeries> seriesCollection = new List<ChartSeries>();
seriesCollection.Add(new ChartSeries
{
XName = "XValue",
YName = "YValue",
DataSource = new List<ChartData>
{
new ChartData { XValue = new DateTime(2005, 01, 01), YValue = 31 },
new ChartData { XValue = new DateTime(2006, 01, 01), YValue = 26 },
new ChartData { XValue = new DateTime(2007, 01, 01), YValue = 43 },
new ChartData { XValue = new DateTime(2008, 01, 01), YValue = 31 },
new ChartData { XValue = new DateTime(2009, 01, 01), YValue = 44 },
new ChartData { XValue = new DateTime(2010, 01, 01), YValue = 67 },
new ChartData { XValue = new DateTime(2011, 01, 01), YValue = 60 },
}
});
ChartObj.AddSeries(seriesCollection);
}
....
|
Hi Dan,
Thanks for your patience.
We are able to reproduce the reported issue and we will
validate and update you the status on 6th April, 2020. We appreciate
your patience until then.
Regards,
Baby.