JavaScript
Highcharts.chart('container', {
chart: {
type: 'areaspline'
},
title: {
text: 'Average fruit consumption during one week'
},
legend: {
enabled:true,
},
xAxis: {
gridLineWidth: 1,
opposite: true,
categories: [
'18Q1',
'18Q2',
'18Q3',
'18Q4',
'19Q1',
'19Q2',
],
// top:-235,
tickInterval: 0.999,
},
yAxis: {
gridLineWidth: 0,
title: {
text: 'Fruit units'
}
},
tooltip: {
shared: true,
valueSuffix: ' units'
},
credits: {
enabled: false
},
plotOptions: {
spline: { // has to say spline here
dataLabels: {
enabled: true,
borderRadius: 10,
y: -40,
shape: 'oval',
// format:"",
backgroundColor:"#999999",
},
},
areaspline: {
fillOpacity: 0.3
}
},
series: [ {
name: 'Total Esc',
color:"#FFFFFF",
dataLabels: {
enabled: true,
borderRadius: 10,
formatter:function()
{
var pcnt = (this.y);
return 'Your Text Here' + Highcharts.numberFormat(pcnt,0) + '%';
},
y: 20,
shape: 'oval',
// format:"",
backgroundColor:"#999999",
},
data: [36,60,23,38,61,32, 49]
},
{
name: 'John',
data: [10,4,13,8, 5, 12, 3]
}, {
name: 'Jane',
data: [18,33,0,23,33,15,26]
}, {
name: 'Harry',
data: [8, 23, 10, 7, 23, 5,20]
}],
});