achinmay
achinmay

Reputation: 31

How to handle long labels on y-axis in Dojo Charts?

I have long labels on y-axis in dojo bar chart. In Firefox 3.6, they are overlapping on to the bars and in IE8, they are clipped.

Help me with this please. Since I am a new user, I am not allowed to post images otherwise I would have done that.

Upvotes: 2

Views: 1292

Answers (2)

gotcha
gotcha

Reputation: 151

Have a look at this page...you can use the label shortening:

http://archive.dojotoolkit.org/nightly/dojotoolkit/dojox/charting/tests/test_label_shortening.html

Upvotes: 0

Sivaji
Sivaji

Reputation: 21

chart1.addAxis("y", {
    vertical: true, includeZero: true, leftBottom: false,minorTicks: false,majorTick: {length: 0},fixLower: "major", fixUpper: "major",
    labelFunc: function(value){ 
    //alert(value);
        if(value != 0 ){
            if(value %  20 == 0){
                value   =   "$"+value+"M";
            }else{
            //alert(value %  20);
                value   =   " ";//"$"+value+"M";
            }
        } 
        return value;
    }
});

Upvotes: 2

Related Questions