How To Create A Table For Legend Of A Stacked Chart In Highcharts?
This is javascript code of stack chart in highchart- legend: { align: 'right', x: -70, verticalAlign: 'top', y: 20, floating: true, backgroundColor: (Highcharts.theme &&
Solution 1:
Highcharts (stacked Chart) in a table format
http://jsfiddle.net/ntg7qz3q/1/
working fiddle
$(function() {
$('#container').highcharts({
chart: {
type:'bar'
},
title: {
text:'Stacked bar chart'
},
xAxis: {
categories: ['A', 'B', 'C']
},
yAxis: {
min:0,
title: {
text:'Total fruit consumption'
}
},
legend: {
align:'right',
x:-70,
verticalAlign:'top',
y:20,
floating:true,
backgroundColor:(Highcharts.theme&&Highcharts.theme.background2)||'white',
borderColor:'#CCC',
borderWidth:1,
shadow:false
},
plotOptions: {
series: {
stacking:'normal'
}
},
series: [{
name:'A',
data: [5]
}, {
name:'B',
data: [2]
}, {
name:'C',
data: [3]
}]
});
});
Post a Comment for "How To Create A Table For Legend Of A Stacked Chart In Highcharts?"