score:2

you can pass information of color per point like this http://jsfiddle.net/gvkv4f50/1/

$(function () {
    // create the chart
    $('#container').highcharts('stockchart', {
        plotoptions: {
            ohlc: {
                colorbypoint: true,
            }
        },

        rangeselector: {
            inputenabled: $('#container').width() > 480,
            selected: 2
        },

        title: {
            text: 'aapl stock price'
        },

        series: [{
            type: 'ohlc',
            name: 'aapl stock price',
            data: [{
                open: 8.34,
                high: 8.56,
                low: 5.47,
                close: 6.15,
                color: 'yellow'
            }, {
                open: 8.34,
                high: 8.56,
                low: 5.47,
                close: 6.15,
                color: 'green'
            }],
            datagrouping: {
                units: [
                    [
                        'week', // unit name
                    [1] // allowed multiples
                    ],
                    [
                        'month', [1, 2, 3, 4, 6]]
                ]
            }
        }]
    });
});

if you want to ignore different coloring when open point has lower value than close point add this:

 highcharts.wrap(highcharts.seriestypes.ohlc.prototype, 'getattribs', function (p, args) {
    highcharts.seriestypes.column.prototype.getattribs.apply(this, args);
});

you can see how in here - http://jsfiddle.net/chybv1mt/3/


Related Query

More Query from same tag