So I have 2 series with data about events :
- a serie with views
- a serie with € values
1 item in each series relate to 1 event
I want a stacked bar chart with 2 column: 'Views', 'Value'
Each event will have it's own color.
Here is what I have so far :
$('#container').highcharts({
chart: {
type: 'bar'
},
title: {
text: 'Stacked bar chart'
},
xAxis: {
categories: ['Views', 'Value']
},
yAxis: [{
min: 0,
title: {
text: 'Value (€)'
}
},{
min: 0,
opposite: true,
title: {
text: 'Views'
}
}],
legend: {
reversed: true
},
plotOptions: {
series: {
stacking: 'normal'
}
},
series: [{
name: 'Views',
data: [{
name: 'Event1',
y: 500
},{
name: 'Event2',
y: 200
},{
name: 'Event3',
y: 350
}],
yAxis: 1
}, {
name: 'Value',
data: [{
name: 'Event1',
y: 3000
},{
name: 'Event2',
y: 2000
},{
name: 'Event3',
y: 1500
}]
}]
});
I already setup 2 yAxis for value and views.
My problem is :
datas are stacked by events and not by categories. And as you will see, it's not even a good stacking because the first bar is hiding the second one.
Is it possible to do this with Highcharts ?
EDIT
Something more close to what I am looking for :
But I can't find a way to properly setup my second yAxis