假设我们有示例的条形图http://dimplejs.org/examples_viewer.html?id=bars_vertical http://dimplejs.org/examples_viewer.html?id=bars_vertical我想将 x 轴标签从“Months”更改为“Meses”。
我怎样才能做到这一点?
绘制后,您可以访问标题对象并设置其文本,如下所示:
chart = new dimple.chart(svg, data);
x = chart.addCategoryAxis("x", ["Fruit", "Year"]);
chart.addMeasureAxis("y", "Value");
chart.addSeries(["Volume", "Year"], dimple.plot.bar);
chart.draw();
x.titleShape.text("My New Title");
这里它正在工作:http://jsfiddle.net/y3BVN/ http://jsfiddle.net/y3BVN/
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)