Я использую библиотеку Dygraph.
Посмотрите на картинку, почему "$0.00" отсутствует на графике?
Вот мой код:
new Dygraph(document.getElementById("graphdiv"),
$scope.dataPrediction,
{
errorBars: true,
animatedZooms: false,
customBars: true,
legend: 'always',
labelsSeparateLines: true,
axisLabelFontSize: '12',
labels: ["x", "Current costs", "Predicted cost by switching to reserved instance"],
labelsDivWidth: "440",
colors: ["#1f77b4", "#ff9f4a"],
axes: {
y: {
axisLabelFormatter: function (y) {
return "$" + y.toFixed(2);
},
valueFormatter: function (y) {
return "$" + y.toFixed(2);
}
}
}
});