如何在dojo折线图中去除虚线的灰色背景?

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();
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/


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接