Hi Andrea,
Thanks for using Syncfusion product.
We have analyzed your reported query and there is no way to achieve this directly. We have achieved this query in workaround by using SeriesRendering event in sample. The code snippet is given below,
Code Snippet:
[MVC]
@(Html.EJ().Chart("container")
………………………
.Load("onchartload")
.SeriesRendering("getcolor")
………………………..
)
function onchartload(sender)
{
sender.model.series[0].dataSource = chartData;
sender.model.series[0].xName = "xDate";
sender.model.series[0].yName = "yValue";
}
function getcolor(sender)
{
var color=["blue","green","yellow","orange","red","pink"];
for (var i = 0; i < sender.model.series.length; i++)
{
for (var j = 0; j < sender.model.series[i].points.length; j++)
{
sender.model.series[i].points[j].fill=color[j];
}
}
}
We have prepared a sample based on the screen shot and you can find the sample in below location:
Screen Shot:
Sample: http://www.syncfusion.com/downloads/support/forum/119450/Pointfill1156257906.zip
Praveenkumar
sr => { sr .Points(p => { for (int i = 0; i < Model.Records.Count; i++) { p.X(Model.Records[i].Name).Y(Model.Records[i].Value).Fill(Model.Records[i].Color).Add(); } }) //sr.DataSource(Model.Records).XName("Name").YName("Value").Name("Value").Add(); .Add(); })