Frage

When I create a DojoX vertical bar chart, it automatically calculates the labels on the Y axis to cover the largest value. In this case, it created 3 Y-axis labels, 100, 200 300.

How do I increase the number of labels, to say intervals of 50 rather than intervals of 100?

War es hilfreich?

Lösung

When you add an axis, there are several options you can use for the tick marks. Example:

chart.addAxis("y", { 
    majorTicks    : true, // default
    majorLabels   : true, // default 
    majorTick     : {length: 4, color: "#FFF"},
    majorTickStep : 10, 
    minorTicks    : true,
    minorLabels   : true,
    minorTick     : { length: 2, color: "#CCC"},
    minorTickStep : 5,
    ...
    vertical: true
 });

Check the API docs for more: http://dojotoolkit.org/api/1.8/dojox/charting/axis2d/Default

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top