Dojox charting, problem with Columns chart type
-
29-09-2019 - |
문제
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
해결책
Hard to say what you do wrong from the snippets you published. Some stuff is strange but appears harmless, like gap
for MarkersOnly
or lines
and markers
for Columns
. Make sure that you do define axes named volX
and volY
.
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 reasons x
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.