1
我使用Chart.js創建雷達圖表。我想改變標籤的大小,但我沒有在這裏找到option.ind我的代碼:chart.js更改雷達圖標籤大小
var data = {
labels: ajax_label,
pointLabelFontSize : 16,
scaleFontSize: 16,
datasets: [
{
label: "My First dataset",
fillColor: "rgba(91, 192, 222,0.2)",
strokeColor: "rgba(91, 192, 222,1)",
pointColor: "rgba(91, 192, 222,1)",
pointStrokeColor: "#fff",
pointHighlightFill: "#fff",
pointHighlightStroke: "rgba(91, 192, 222,1)",
data: ajax_data,
scaleShowLabels : false,
scaleOverride: true,
// ** Required if scaleOverride is true **
// Number - The number of steps in a hard coded scale
scaleSteps: 10,
// Number - The value jump in the hard coded scale
scaleStepWidth: 10,
// Number - The scale starting value
scaleStartValue: 0
}
]
};
var ctx = $("#myChart").get(0).getContext("2d");
var myNewChart = new Chart(ctx);
new Chart(ctx).Radar(data, {
pointDot: false
});
你能幫助我嗎?
非常感謝!你解決了我的問題! –