Reputation: 65
I am creating a gantt chart showing my advertising buys for the year. Everything is working well except when I have data on the same y axis. The data ends up displayed one on top of the other. How can you stack the data show both can be displayed. Here is a JSFIDDlE showing my dilemma. http://jsfiddle.net/tagriffith/a16mgm04/1/
When I want to show the radio spots in the same y (4) series and they have the same run dates the data gets stacked on top of each other. Below is the partial code from the jsfiddle.
[{
name: 'Radio',
groupPadding: 0,
borderRadius: 0,
pointWidth: 20,
data: [{
name: 'WLW',
x: Date.UTC(2015, 12, 4),
x2: Date.UTC(2015, 12, 20),
y: 4
}, {
name: 'WNKU',
x: Date.UTC(2015, 12, 4),
x2: Date.UTC(2015, 12, 20),
y: 4
},
{
name: 'WGUC',
x: Date.UTC(2015, 12, 4),
x2: Date.UTC(2015, 12, 20),
y: 4
},]]
Upvotes: 3
Views: 1809
Reputation: 7896
New answer:
Grouping data points with same y
values, from the same series is not possible. Series can be grouped - as they are by default. If you want your data points to be displayed with different y values, then you would have to set those values - e.g. process your data before using it in Highcharts. Series can be linked to each other, so they will appear and behave as one - performance might slight drop and custom code might need a little adjustments.
Example: http://jsfiddle.net/m7av02t7/
Previous answer:
To get all series in a single group and allow overlapping of points with same values you could set grouping
to false
in plotOptions.series
.
...
plotOptions: {
series: {
grouping: false,
...
Example: http://jsfiddle.net/8zy6mh0m/
Upvotes: 3