I'm creating a pie chart and populating the data via jquery with ajax. this all works great but now I want to change the color of the chart, but I cant' figure out how to get a reference to the chart to call the functions. I can change "allSeries" but I want to change each series to a custom color. I create the chart like this:
$("div", ".ChartDiv1").chart({
gallery: cfx.Gallery.Pie,
dataValues: items,
//allSeries: { color: "#801702D1" },
dataSourceSettings: {
fields: [{
name: "Open",
usage: cfx.FieldUsage.Value
}, {
name: "Date",
usage: cfx.FieldUsage.XValue
}]
},
titles: [{
text: "<%=ChartTitle %>"
}]
});
so how do I get a reference to the chart so I can use setColor() function to change the series color? like this:
chart1.getAllSeries().getBorder().setColor("#FF0000");