0
我正在使用Dygraph庫。yValue不在圖表中使用dygraphs庫
見圖片,爲什麼 「$ 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);
}
}
}
});