B.3. Fit Charts Elements

Click to view larger image

Fitting Chart Elements onto Canvas

If you notice that there are chart elements (e.g., ticker labels for the Category Axis) that are chopped off by the canvas, you can use the setFitOnCanvas() method to do the necessary adjustments.

// try to reposition chart location or reduce chart size until
// EspressChart is able to fit a whole chart
// on canvas. Default value is FALSE
chart.gethCanvas().setFitOnCanvas(true);