グラフ軸の書式設定に問題があり、更新版2.0のサンプルが見つかりません。Chart.js 2.0 Y軸の通貨と千単位のセパレータの書式設定
私はどのようにして2000000を€2.000.000にすることができますか?
マイフィドル:https://jsfiddle.net/Hiuxing/4sLxyfya/4/
window.onload = function() {
var ctx = document.getElementById("canvas").getContext("2d");
window.myBar = new Chart(ctx, {
type: 'bar',
data: barChartData,
options: {
title: {
display:true,
text:"Figure"
},
legend: {
position: "bottom"
},
tooltips: {
mode: 'label',
bodySpacing: 10,
cornerRadius: 0,
titleMarginBottom: 15
},
scales: {
xAxes: [{
ticks: {}
}],
yAxes: [{
ticks: {
beginAtZero: true,
stepSize: 500000
}
}]
},
responsive: true
}
});
};
ありがとう@Lバール!私はその機能を見過ごした。あなたのコードはaを追加します。しかし負の数の前に。 (例えば、-500000は-.500.000になりますので、私はスプリットを置き換えて置き換えました。新しいフィドルがあります。https://jsfiddle.net/Hiuxing/4sLxyfya/8/ – Mae
パーフェクト!自分のため – vanhornRF