Jump to content
JChartFX Community
  • 0

how to get reference to chart created with jquery


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:



Share this post

Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now