Hi Kalpa,
Thanks for using Syncfusion product.
We have analyzed this. This can be done by following the below steps.
1. Pass the type of the chart to be rendered in controller through viewbag.
[CS]
public ActionResult ChartFeatures()
{
ViewBag.type = "spline"; // passed the chart series type
return View();
}
2. Trigger load event of chart
[CSHTML]
@(Html.EJ().Chart("container")
.Load("onchartload")
)
3. Covert the value from viewbag to use it in JS
[JS]
var seriesType = @Html.Raw(Json.Encode(ViewBag.type)); // Converts the value to use it in JS
4. Code the method, to assign the value passed in viewbag to chart on load
[JS]
function onchartload(sender) {
sender.model.series[0].type = seriesType; // assign it to chart seriestype
}
The below screen shot shows the output of the attached sample.
We have also made a sample to illustrate this. Find it from the below location.
Attachment.zip
Please let us know if you have any concern.
Thanks,
Jayavigneshwaran