IntervalsLegend.getColumnCount

Syntax

getColumnCount: Boolean;

Description

The getColumnCount method returns the number of legend columns.

Comments

The number of columns is returned with the specified method value:

Example

Executing the example requires that the HTML page contains the BubbleChart component named bubbleChart (see Example of Creating the BubbleChart Component).

// Get interval legend
var legend = bubbleChart.getLegend();
// Enable automatic calculation of the number of columns
legend.setAutoColumnsCount(true);
// Set displaying of legend in two columns
legend.setColumnsCount(2);
console.log('Displayed number of columns:', legend.getColumnCount(true));
console.log('Specified number of columns:', legend.getColumnCount(false));
// Refresh chart
bubbleChart.refresh();

After executing the example the console displays information about the number of columns:

Displayed number of columns: 3

Specified number of columns: 2

See also:

IntervalsLegend