score:2

Accepted answer

complete the categories as:

categories: [
                    'tokyo',
                    'new york',
                    'london',
                    'berlin'
                ]

then the stacking option as:

plotoptions: {
                column: {
                    pointpadding: 0.2,
                    borderwidth: 0,
                    stacking: 'normal'
                }
            }

then your data in series as:

series: [{
                name: 'tokyo',
                data: [49.9,null,null,null]

            }, {
                name: 'new york',
                data: [null,83.6,null,null],


            }, {
                name: 'london',
                data: [null,null,48.9,null]

            }, {
                name: 'berlin',
                data: [null,null,null,42.4]

            }]

here you have the fiddle:

http://jsfiddle.net/tu7tl/1/

alternatively you can do it using only one serie, and putting all your data in the serie array like that:

series: [{
            name: 'measure',
            data: [{y:49.9, color: colors[0]},{y:83.6, color: colors[1]},{y:48.9, color: colors[2]},{y:42.4,color: colors[3]}]

        }]
    });

with this last method you have to specify the different colors in the same serie. previously i declare and use a variable "colors", to get the colors from highchart:

var colors = highcharts.getoptions().colors;

the fiddle example is here: http://jsfiddle.net/tu7tl/4/


Related Query

More Query from same tag