I have 2 JavaScript charts that are receiving values through a PHP file. However these values only appear in the graphic when the resolution of the web page for some reason is changed. This is the JavaScript code I have:
demo = {
initDashboardPageCharts: function() {
var dataSales = {
labels: ['Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun', 'Jul', 'Ago', 'Set', 'Out', 'Nov', 'Dez'],
series: []
};
var optionsSales = {
lineSmooth: false,
low: 0,
high: 100,
showArea: true,
height: "245px",
axisX: {
showGrid: false,
},
lineSmooth: Chartist.Interpolation.simple({
divisor: 3
}),
showLine: false,
showPoint: false,
fullWidth: false
};
var responsiveSales = [
['screen and (max-width: 640px)', {
axisX: {
labelInterpolationFnc: function(value) {
return value[0];
}
}
}]
];
var chartHours = Chartist.Line('#chartHours', dataSales, optionsSales, responsiveSales);
}
}
If you want to see for yourself, you can see here . How can I resolve this so that the values always appear?