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:
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Question
scisd
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:
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:
Link to comment
Share on other sites
0 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.