Home Forums Chart Support Color of bubble/scatter series

Color of bubble/scatter series

Viewing 6 posts - 1 through 6 (of 6 total)
  • #14379

    Is there a setting to keep the color of scatter and bubble plots the same when there’s only one series? It looks if there is only 1 series the color of each bubble is different. Where as if there’s two or more series, the series color sticks and each member of that series is the same.

    I know I can pass color back in the data object to hard code it, but can i just turn off the multi-color option?

    #14380

    Reynaldo,

    You can set the color of entire series by using color property in dataSeries. There is no option to turn off multi-color option other than that.

    ——
    Bivek Singh

    #14392

    The problem is, I generate a lot of charts on the page dynamically and I don’t know in advance how many series there will in a given chart nor how many charts there will be on a given page. For 2 or more series it works as expected (each series it’s own color) but for 1 it does not. I’m not sure I can easily specify the color of the dataSeries for the case where there’s only one.

    #14399

    Reynaldo,

    If your charts are dynamic and the number of dataSeries / charts cannot be estimated before hand,
    set() method can be used after the chart is rendered to set a predefined color in case of only one dataSeries. Please check this jsfiddle.

    __

    Suyash Singh
    Team CanvasJS

    #14404

    Thanks! This works for the time being.

    #24596

    This package is soo great. I use scatter chart, and I just use leftjoin, and selectRaw with coloumname as color, and the chart automatically depict the colors. I dont have to modify my chart scripts. awesome!!

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.