MapChart.getPieLayer

Syntax

getPieLayer();

Description

The getPieLayer method returns the layer of map pie factors.

Comments

The method returns a value of the SVGElement type.

Example

To execute the example the HTML page must contain the MapChart component named map (see Example of Creating the MapChart Component). Show all available pie factors in the map and set 50% transparency for these factors:

// Get map pie factors
var pieVisual = map.getLayer("Regions").getVisuals().PieVisual;
// Show the pie factors in the map
pieVisual.setVisibility(PP.Ui.Visibility.Visible);
// Redraw the map
map.draw();
// Get pie factors layer
var pieLayer = map.getPieLayer();
// Set layer opacity to 50%
pieLayer.style.opacity = 0.5;

After executing the example the map shows all available pie factors with 50% transparency:

See also:

MapChart