Home Forums Feature Requests & Feedback define color in the options

define color in the options

Viewing 5 posts - 1 through 5 (of 5 total)
  • #6487

    Hi,

    I’m building a simple chart editor and having a problem when reading the color of the series.
    I don’t define a color for all series and they are retrieved from the colorSet. In this cases I cant later read the used color.
    Is possible to alter the chart.options.data[] to include this value?

    color = dataPoints[i].color ? dataPoints[i].color : dataSeries._colorSet[i % dataSeries._colorSet.length];
    if(!dataPoints[i].color) dataPoints[i].color=color;
    • This topic was modified 9 years, 9 months ago by Daniel Silva.
    #6492

    Hi,
    You can read the used colors which are explicitly given to data. By default color retrieved from the colorSet cant be read as of now.

    #6495

    Only if the color is defined when building the chart, automatic colors are not displayed,

    #6497

    Hi,

    Yes, you can only read colors when you set them explicitly. Default colors are not exposed yet.

    But we do have a workaround where you can assign a custom colorSet and determine dataPoint’s color from it – dataPoints are assigned color in a sequential order. Checkout this example.

    #6498

    Thanks

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

You must be logged in to reply to this topic.