Плагин всплывающей подсказки Chartist установлен в узлах модулей, но не может импортироваться в компонент. При попытке использовать всплывающую подсказку появляется сообщение «Подсказка не определена»
if ('undefined' !== typeof module) {
module.exports = function AppLaunchesChart(data) {
dataRoundedLineChart = data.app_launches;
optionsRoundedLineChart = {
lineSmooth: Chartist.Interpolation.cardinal({
tension: 0
}),
axisX: {
// showGrid: true,
offset: 60
},
low: 0,
showArea : true,
axisY: {
labelInterpolationFnc: function(value) {
if (value >= 1000) {
return (value / 1000).toFixed(1).replace(/\.0$/, '') + 'K';
}
else {
return value;
}
},
scaleMinSpace: 15
},
chartPadding: { left: 20,top: 20, right: 20, bottom: 20},
height: 350,
showPoint: true,
// I tried to add here but gave me error
}
var RoundedLineChart = new Chartist.Line('#dailyAppLaunch', dataRoundedLineChart, optionsRoundedLineChart);
md.startAnimationForLineChart(RoundedLineChart);
}}