ChartLabelCollection.getMaxWidth

Syntax

getMaxWidth();

Description

The getMaxWidth method calculates maximum width for collection labels.

Comments

This method returns a Number type value.

Example

To execute this example, the HTML page must contain the BubbleChart component named bubbleChart (see Example of Creating the BubbleChart Component). Determine maximum width and height of labels in collection of X axis labels:

// Get a collection of labels for bubble chart X axis
var labels = bubbleChart.getChartArea().getAxisX().getLabels();
// Calculate maximum width of labels in the collection
var maxWidth = labels.getMaxWidth();
console.log("Maximum width of X axis labels: " + maxWidth);
// Calculate maximum height of labels in the collection
var maxHeight = labels.getMaxHeight();
console.log("Maximum height of X axis labels: " + maxHeight);

After the example execution the browser console shows maximum width and height of X axis labels:

Maximum width of X axis labels: 61
Maximum height of X axis labels: 24

See also:

ChartLabelCollection