Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including highcharts-multicolor-series with all npm packages installed. Try it out:

var highchartsMulticolorSeries = require("highcharts-multicolor-series")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

highcharts-multicolor-series v2.2.4

Highcharts plugin that adds new series: multicolor-series, where oyu can define color for each part of a path, between two points.

Multicolor series - Highcharts module

Go to project page to see this module in action: http://blacklabel.github.io/multicolor_series/

Requirements

  • Plugin requires the latest Highcharts (4+)

Installation

  • Like any other Highcharts module (e.g. exporting), add <script> tag pointing to multicolor_series.js below Highcharts script tag.
  • For NPM users:
var Highcharts = require('highcharts');

require('multicolor_series')(Highcharts);
  • For BOWER users:
bower install highcharts-multicolor-series

Code

The latest code is available on github: https://github.com/blacklabel/multicolor_series/

Usage and demos

    series: [{
            type: 'coloredline',
            data: [{
                    y: 200,
                    segmentColor: 'red'
            },{
                    y: 210,
                    segmentColor: 'red'
            },{
                    y: 210,
                    segmentColor: 'red'
            },{
                    y: 100,
                    segmentColor: 'green'
            }, {
                    y: 100,
                    segmentColor: 'red'
            }]
    }]

Parameters

Property Description
point.segmentColor Controls line color between N and N+1 point, independent from point.color, which changes marker color.
series.type Set it to "coloredline" or "coloreadarea" to use multicolor series.

Demo

Demos are available at project's github page: http://blacklabel.github.io/multicolor_series/

Releases

  • Versions 2.x.y: compatible with Highcharts >= 4.2.2

  • Versions 1.x.y: compatible with Highcharts < 4.2.2

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free