Dojox 图表,柱形图表类型的问题
我不知道出了什么问题。使用 dojotoolkit.org 中的最新内容。我的图表对于标记图或折线图呈现良好:
this.chartVol.addPlot("default", {
type: "MarkersOnly",
lines: false,
markers: false,
gap: 1,
hAxis: 'volX',
vAxis: 'volY'
});
但是当我更改为“列”时,我什么也得不到。
this.chartVol.addPlot("default", {
type: "Columns",
lines: false,
markers: false,
gap: 1,
hAxis: 'volX',
vAxis: 'volY'
});
我正在查看此指南页面,不清楚我做错了什么。
http://www.dojotoolkit.org/reference-guide/ dojox/charting.html#dojox-charting
I can't figure out what's wrong. Using the latest everything from dojotoolkit.org. My chart renders fine for a Marker or Line chart:
this.chartVol.addPlot("default", {
type: "MarkersOnly",
lines: false,
markers: false,
gap: 1,
hAxis: 'volX',
vAxis: 'volY'
});
but when I change to "Columns" I get nothing.
this.chartVol.addPlot("default", {
type: "Columns",
lines: false,
markers: false,
gap: 1,
hAxis: 'volX',
vAxis: 'volY'
});
I'm looking at this howto page, it's not clear what I'm doing wrong.
http://www.dojotoolkit.org/reference-guide/dojox/charting.html#dojox-charting
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
很难从您发布的片段中说出您做错了什么。有些东西很奇怪,但看起来无害,例如
MarkersOnly
的gap
或lines
和markers
的Columns< /代码>。确保您定义了名为
volX
和volY
的轴。行和列之间的一大区别是数据。虽然线图(默认)接受数字数组或
{x, y}
点,但柱图(1.5 之前)仅接受数字数组(出于显而易见的原因x< /code> 不能用列绘制)。
你说你使用最新的一切,所以我假设你正在运行 1.5 的 beta 版本 - 它应该可以工作,但我不能从你的代码片段中看出什么问题,抱歉。需要更多信息。
Hard to say what you do wrong from the snippets you published. Some stuff is strange but appears harmless, like
gap
forMarkersOnly
orlines
andmarkers
forColumns
. Make sure that you do define axes namedvolX
andvolY
.One big difference between lines and columns is the data. While the lines (default) plot accepts an array of numbers or
{x, y}
points, the columns plot (prior to 1.5) accepts only an array of numbers (for obvious reasonsx
cannot be plotted with columns).You said you use the latest everything, so I assume you are running the beta version of 1.5 — it should work, but I cannot say what's wrong from your snippets, sorry. Need more info.