I am trying to add the y-axis lines as shown in the exampleshttps://www.highcharts.com/demo/stock/basic-line
This is my code, what i am not enabling?
Code: Select all
let particulte_chart= this.sensor_chart.stockChart('particulate_plot', {
chart: {
type: 'line',
animation: true,
backgroundColor: "transparent",
Color:"black"
},
credits: {
enabled: false
},
legend: {
enabled: true,
layout: 'horizontal',
verticalAlign: 'bottom',
floating: false,
},
rangeSelector: {
selected: 1,
inputEnabled: false,
enabled: false
},
title: {
text: "Air Quailty",
style: { "color": "#f4f5f8", "fontSize": "12px" }
},
yAxis: {
min: 0,
opposite: false,
title: {
text: "Mass \xb5g/m\xb3",
style: { "color": "#010101", "fontSize": "12px" }
},
labels: {
formatter: function () {
return (this.value.toFixed(2) ? '' : '') + this.value.toFixed(2);
},
style: { "color": "#010101", "fontSize": "12px" }
},
plotLines: [{
label:
{
text: "EU Limit 40 \xb5g/m\xb3",
style: { "color": "#010101", "fontSize": "12px" },
align: 'center',
y: -10,
},
color: 'red', // Color value
value: 3, // Value of where the line will appear
width: 5 // Width of the line
}],
},
navigator: {
enabled: false
},
scrollbar: { enabled: false },
series: [{
data: [15, 25, 40, 40, 20,30, 5, 10, 40, 30],
//pointStart: 1
}],
"tooltip": {
"pointFormat": "<b>{point.y:.2f}</b>",
"shared": true
},
});