Question

When the title for Y axis in DOJO charts is a long string, then full string is not displayed. Is there any option to truncate the title (there is support to truncate labels) and show the full title String in tooltip on "mouseover" event?

For example, the y axis title string is "this is a very very very long string for y axis title in dojo charts". Only part of the string displayed.

Note: Size of the chart div cannot be increased.

http://jsfiddle.net/nagarajs92/CdDaD/1/

<script>
dojo.require("dojox.charting.Chart2D");

dojo.require("dojox.charting.themes.Tom");

// Define the data
var chartData = [10000,9200,11811,12000,7662,13887,14200,12222,12000,10009];

// When the DOM is ready and resources are loaded...
dojo.ready(function() {
var chart = new dojox.charting.Chart2D("chartNode");

chart.addPlot("default", {
    type: "Lines",
    markers: true
});

// Add axes
chart.addAxis("x");
chart.addAxis("y", { min: 5000, max: 15000, vertical: true, fixLower: "major",  
 fixUpper: "major", title: "this is a very very very long string for y axis title in 
 dojo charts" });

// Add the series of data
chart.addSeries("SalesThisDecade",chartData);

// Render the chart!
chart.render();

});
</script>
<div id="chartNode" style="width:600px;height:300px;"></div>

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top