Dimple js:绘制带有刻度线但没有线条的轴

时间:2018-12-04 21:16:38

标签: dimple.js

有没有一种方法可以保留轴刻度线,但要摆脱实际的轴线?我已经尝试过y.hidden = true,但这会删除涉及相关轴的所有内容,而不仅仅是行。还是有D3可以覆盖此dimple.js问题?

代码:

var svg = dimple.newSvg("#chartContainer6","500%", "100%");

var myChart = new dimple.chart(svg, Index );

var x = myChart.addTimeAxis("x", "Year","%Y-%m-%d","%Y");

x.timeField = "Year";

var y2 =myChart.addMeasureAxis("y", " Index");

y1.title = "Popularity Index";

x.timeInterval = 4;

var s2 = myChart.addSeries("L. Beethoven", dimple.plot.line,[x,y2]);

myChart.addLegend(500, 10, 500, 20, "center");

  myChart.defaultColors = [
     new dimple.color("#57575F", "#57575F", 1),
 ];

myChart.setMargins("50px", "10px", "0px", "20px");

  myChart.draw(1500);

  window.onresize = function () {
                        myChart.draw(0, true);
                      };

0 个答案:

没有答案