☰
Why Choose ApexCharts
- 20 chart types
- MIT License
- 1 million weekly downloads
- No registration needed
- 100+ samples includes
- FREE DOWNLOAD
var options = {
series: [
{
data: [0, -41, 35, -51, 0, 62, -69, 32, -32, 54, 16, -50],
}
],
chart: {
height: 350,
type: 'area',
zoom: {
enabled: false,
},
},
dataLabels: {
enabled: false,
},
title: {
text: 'Negative color for values less than 0',
align: 'left',
},
xaxis: {
categories: [
'Jan',
'Feb',
'Mar',
'Apr',
'May',
'Jun',
'Jul',
'Aug',
'Sep',
'Oct',
'Nov',
'Dec',
],
},
stroke: {
width: 0,
},
plotOptions: {
line: {
colors: {
threshold: 0,
colorAboveThreshold: '#0088ee',
colorBelowThreshold: '#ff0000',
},
},
}
};
var chart = new ApexCharts(document.querySelector("#chart"), options);
chart.render();