3

我在 Dojo 中使用虚线和点线创建了一个图表。一切正常,除了虚线的背景是灰色的。

如何去除线条的灰色背景?

var xChart = new dojox.charting.Chart2D("test-chart");
xChart.setTheme(dojox.charting.themes.Julie);
xChart.addAxis("x");
xChart.addPlot("default", {type: "Lines"});

xChart.addSeries("xscsd", [2,3,5,5,23,1,6],
   {stroke: {color: "red", width: 1.5, style:"Dot"}});

xChart.render();
4

1 回答 1

6

默认主题定义灰色轮廓。添加系列时用 null 覆盖大纲。

xChart.addSeries("xscsd", [2,3,5,5,23,1,6],
                 {stroke: {color: "red", width: 1.5, style:"Dot"},
                     outline: null });

http://jsfiddle.net/cswing/qDL79/

于 2012-10-01T12:13:33.710 回答