99 lines
1.6 KiB
JavaScript
99 lines
1.6 KiB
JavaScript
var options = {
|
|
chart: {
|
|
height: 350,
|
|
type: 'bar',
|
|
},
|
|
plotOptions: {
|
|
bar: {
|
|
dataLabels: {
|
|
position: 'top', // top, center, bottom
|
|
},
|
|
}
|
|
},
|
|
dataLabels: {
|
|
enabled: true,
|
|
formatter: function (val) {
|
|
return val + "%";
|
|
},
|
|
offsetY: -20,
|
|
style: {
|
|
fontSize: '12px',
|
|
colors: ["#2e323c"]
|
|
}
|
|
},
|
|
series: [{
|
|
name: 'Inflation',
|
|
data: [2.3, 3.1, 4.0, 10.1, 4.0, 3.6, 3.2, 2.3, 1.4, 0.8, 0.5, 0.2]
|
|
}],
|
|
xaxis: {
|
|
categories: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
|
|
position: 'top',
|
|
labels: {
|
|
offsetY: -18,
|
|
},
|
|
axisBorder: {
|
|
show: false
|
|
},
|
|
axisTicks: {
|
|
show: false
|
|
},
|
|
crosshairs: {
|
|
fill: {
|
|
type: 'gradient',
|
|
gradient: {
|
|
colorFrom: '#01902d',
|
|
colorTo: '#81a3f0',
|
|
stops: [0, 100],
|
|
opacityFrom: 0.4,
|
|
opacityTo: 0.5,
|
|
}
|
|
}
|
|
},
|
|
tooltip: {
|
|
enabled: true,
|
|
offsetY: -35,
|
|
}
|
|
},
|
|
fill: {
|
|
gradient: {
|
|
shade: 'light',
|
|
type: "horizontal",
|
|
shadeIntensity: 0.25,
|
|
gradientToColors: undefined,
|
|
inverseColors: true,
|
|
opacityFrom: 1,
|
|
opacityTo: 1,
|
|
stops: [50, 0, 100, 100]
|
|
},
|
|
},
|
|
yaxis: {
|
|
axisBorder: {
|
|
show: false
|
|
},
|
|
axisTicks: {
|
|
show: false,
|
|
},
|
|
labels: {
|
|
show: false,
|
|
formatter: function (val) {
|
|
return val + "%";
|
|
}
|
|
}
|
|
},
|
|
title: {
|
|
text: 'Monthly Inflation in Argentina, 2018',
|
|
floating: true,
|
|
offsetY: 320,
|
|
align: 'center',
|
|
style: {
|
|
color: '#2e323c'
|
|
}
|
|
},
|
|
colors: ['#01902d', '#00bb3a', '#5bca7d'],
|
|
}
|
|
var chart = new ApexCharts(
|
|
document.querySelector("#basic-column-graph-datalables"),
|
|
options
|
|
);
|
|
chart.render();
|