API REFERENCE

legend

Show the legend. Undefined lets each chart use its own default (marimekko/dot-plot default on; the cartesian charts default off).

Definition

ItemValue
JavaScript propertylegend
HTML attributelegend
Typeboolean
Defaultundefined

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

Configuration example

javascript
// Register sy-line-chart and create the element before configuring it.
chart.legend = true;