【问题标题】:How do I remove the grey background for dashed lines in a dojo line chart?如何去除道场折线图中虚线的灰色背景?
【发布时间】:2012-10-01 10:45:10
【问题描述】:

我在 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();

【问题讨论】:

    标签: charts dojo linechart


    【解决方案1】:

    默认主题定义了灰色轮廓。添加系列时用 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/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-11-05
      • 1970-01-01
      • 2019-12-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多