简体   繁体   中英

Highcharts series bars - multiple series, same xAxis

I am working with Highcharts which represent a mission tracing. The X Axis shows the name of each person and the Y axis is the duration time for each status.

An img for instance:

在此处输入图片说明

I am wondering how can I repeat over a status series on the same X Axis like this:

在此处输入图片说明

Do you have an idea? Please help :) Thanks!

You can use two or more linked series with the same color and with [x, y] data format, for example:

    series: [{
        color: 'blue',
        data: [
            [0, 20],
            [1, 6],
            [2, 16]
        ]
    }, {
        data: [
            [0, 20],
            [1, 21],
            [2, 16]
        ]
    }, {
        color: 'blue',
        linkedTo: 0,
        data: [
            [1, 15]
        ]
    }]

Live demo: http://jsfiddle.net/BlackLabel/hbecsx1p/

API Reference: https://api.highcharts.com/highcharts/series.bar.linkedTo

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM