Class: Chart

ol.style. Chart

Set chart style for vector features.


new Chart(options)

Parameters:
Name Type Description
options
Properties
Name Type Argument Description
type String

Chart type: pie,pie3D, donut or bar

radius number

Chart radius/size, default 20

rotation number

Rotation in radians (positive rotation clockwise). Default is 0.

declutterMode string <optional>

Declutter mode "declutter" | "obstacle" | "none" | undefined

snapToPixel bool

use integral numbers of pixels, default true

stroke _ol_style_Stroke_

stroke style

colors String | Array.<ol.color>

predefined color set "classic","dark","pale","pastel","neon" / array of color string, default classic

displacement Array.<number>
offsetX number

X offset in px (deprecated, use displacement)

offsetY number

Y offset in px (deprecated, use displacement)

animation number

step in an animation sequence [0,1]

max number

maximum value for bar chart

Implements:
  • ol.structs.IHasChecksum
See:

Extends

  • ol.style.RegularShape

Members


<static> colors

Default color set: classic, dark, pale, pastel, neon

Methods


clone()

Clones the style.

Returns:
Type
ol.style.Chart

getData()

Get data associatied with the chart


getRadius()

Get symbol radius


setAnimation(false)

Set animation step

Parameters:
Name Type Description
false false | number

to stop animation or the step of the animation [0,1]


setData(data)

Set data associatied with the chart

Parameters:
Name Type Description
data Array.<number>

setRadius(symbol, donut)

Set symbol radius

Parameters:
Name Type Description
symbol number

radius

donut number

ratio