我有一個非常簡單的折線圖。我想將x和y軸的顏色更改爲白色。更改軸顏色酒窩
var svg = dimple.newSvg(".line_chart_container", 400, 300),dataset;
var chart = new dimple.chart(svg, dataset);
var x = chart.addCategoryAxis("x", "Attempts");
//x.style ("fill","red")
var y = chart.addMeasureAxis("y", "Value");
y.showGridlines = true;
x.showGridlines = true;
var s = chart.addSeries(["Metric", "Value"], dimple.plot.bubble);
var lines = chart.addSeries("Metric", dimple.plot.line);
lines.lineWeight = 2;
lines.lineMarkers = true;
chart.assignColor("Metric", "#30D630");
chart.draw();
s.shapes.style("opacity", function (d) {
return (d.yValue === 0 ? 0 : 0.8);
});
我檢查了dimple.axis documentation in GitHub但找不到任何東西。有一個dimple.axis.colors屬性,但它會更改數據的顏色而不是軸。酒窩甚至支持這個嗎?
我還試圖(以D3等)添加樣式屬性:
x.style ("fill","red")
而是陷入了一個錯誤:未捕獲的類型錯誤:x.style不是一個函數
任何想法?