【问题标题】:change dimplejs linemarker style更改 dimplejs 线标记样式
【发布时间】:2016-05-10 00:50:05
【问题描述】:

我试图用dimplejs 绘制一个多折线图。但是对于我的图表来说,默认的线标记看起来有点“大”。有没有办法改变dimplejs中线标记的大小或颜色?

【问题讨论】:

    标签: javascript series dimple.js


    【解决方案1】:

    绘制后可以修改形状:

    // dimple's draw method will create the shapes in the svg
    chart.draw();
    
    // this will select the markers and set the radius to 2
    svg.selectAll(".dimple-marker,.dimple-marker-back").attr("r", 2);
    

    【讨论】:

    • 谢谢!这正是我想要的。不过,我还有另一个问题,目前,标记充满了白色。我已经手动为我的多折线图中的每条线分配了一种颜色。有什么办法可以去掉那个“白色”的填充,让标记的每条线的颜色都一样?
    猜你喜欢
    • 2011-01-03
    • 1970-01-01
    • 1970-01-01
    • 2016-09-24
    • 1970-01-01
    • 1970-01-01
    • 2012-06-05
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多