<EjsChart Title="Scatter using Complex List">
<ChartSeriesCollection>
<ChartSeries EnableComplexProperty="true" DataSource="@ComplexList" XName="complexprice.value" YName="complexsqft" Type="ChartSeriesType.Scatter">
</ChartSeries>
</ChartSeriesCollection>
</EjsChart>
@code {
public class ComplexPrice
{
public double value;
public string units;
}
public class ComplexScatterData
{
public ComplexPrice complexprice;
public double complexsqft;
}
public List<ComplexScatterData> ComplexList = new List<ComplexScatterData>
{
new ComplexScatterData { complexprice= new ComplexPrice{value=115000, units="USD" }, complexsqft=1000},
new ComplexScatterData { complexprice= new ComplexPrice{value=125000, units="USD" }, complexsqft=1200},
new ComplexScatterData { complexprice= new ComplexPrice{value=135000, units="USD" }, complexsqft=1300},
};
} |