Hi Alexander Muthler,Thanks for contacting Syncfusion support.You can change the color for the types of line and range area chart through button click.Please find the code snippet below
[JS]
var button = $('<input/>', { type: "button", id: "field", value: "Change Color", onclick:"change()"});//To create button
button.appendTo($(element)); /To append button in body
function change()
{
var chart,type,i;
chart = $("#container").ejChart("instance");
for (i = 0; i < chart.model.series.length;i++)
{
type = chart.model.series[i].type;
if(type == 'line')
chart.model.series[i].fill = "#99ff33"; //To change the color to line chart
else
chart.model.series[i].fill = "#ff6600"; //To change the color to range area
}
chart.redraw();
}
|
On button click, We have changed the line and range area color through redrawing the chart.
We have created a sample for your reference. It can be downloaded from the below link.
Sample Link:
SamplePlease let us know if you need any other assistance.
Regards,
Saravana Kumar K