Matt
Matt

Reputation: 6422

Highcharts: Is it possible to have separate plotOptions for each series?

I want to have two scatter series on my chart. One with a linewidth of 1 and the other with no lineWidth. As I understand, the plotOptions applies to all charts of the specified type, so either all the scatter plots have a linewidth or nothing. Is it possible to apply a plotOptions to specific series?

Upvotes: 5

Views: 7958

Answers (1)

Igor Dymov
Igor Dymov

Reputation: 16460

In addition to the members listed below, any member of the plotOptions for that specific type of plot can be added to a series individually. For example, even though a general lineWidth is specified in plotOptions.series, an individual lineWidth can be specified for each series.

Just pass lineWidth to series as a parameter like:

var series = {
    data: [...],
    lineWidth: 1
};

Upvotes: 12

Related Questions