IntervalsLegend.CellSpacing

Syntax

CellSpacing: Number;

Description

The CellSpacing property determines spacing between legend items.

Comments

Use JSON or the setCellSpacing method to set the property value, and the getCellSpacing method to get the property value.

Example

To execute the example, the HTML page must contain the BubbleChart component named bubbleChart (see Example of Creating the BubbleChart Component). Set new values for the following legend properties: number of columns, distance between items, marker shape, and legend display mode. Set descending sorting for values of legend items, and show markers at the right of the legend items text:

// Get interval legend
var legend = bubbleChart.getLegends()[0];
// Set the number of legend columns
legend.setColumnsCount(2);
// Set paddings between legend elements
legend.setCellSpacing(20);
// Set ascending sorting of intervals
legend.setDescending(true);
// Set new form of legend markers
legend.setMarker(PP.Ui.LegendMarkerShape.Rectangle);
// Set position of markers to the right of text
legend.setMarkersAtRight(true);
// Set the "between" legend display mode
legend.setMode(PP.Ui.LegendMode.BetweenOnly);
// Refresh chart
bubbleChart.refresh();

After executing the example the following legend properties are changed: number of columns, distance between items, marker shape, and legend display mode. Descending sorting is set for values of legend items, legend markers are shown at the right of the legend items text:

See also:

IntervalsLegend