Auto-wrapping category axis labels

Type demo

This demo shows how we can use an adapter and oversizeBehavior on labels of a category axis, to make the auto-wrap automatically. The code Here’s the relevant code section: Example Related info Category axis docs Handling oversized labels Using adapters

Totals on column stacks

Type tutorial

This tutorial will explain how we can place an automatically-calculated total on a stack of columns. Preparing value axis Normally, the chart would not calculate totals, saving CPU for us. We need to enable it by setting calculateTotals: true on our value axis: Adding a label bullet To place labels on or in a column, […]

Show “no data” warning on a chart

Type demo

This demo shows how we can use chart series’ davalidated event to display a “no data” message in a modal if data contains no items.

Grouping several series into single legend item

Type demo

This demo shows how we can selectively add series to legend, then toggle multiple series with a single legend item. The code uses series’ on() method to watch for changes in its visible setting, which is triggered when series is toggled via legend. It then hides or shows related series. It also uses series’ legendLabelText […]

Adding check marks to legend markers

Type tutorial

This tutorial will walk through the steps needed to turn legend markers into checkboxes. Adding a check mark Each marker in the legend is created from a template, which is accessible via legend’s markers.template. Besides enabling us to set any setting that would be applied to any new marker created by the legend, a template […]

Using adapters on category axis labels

Type demo

This demo shows how we can dynamically modify labels of the CategoryAxis using an adapter. We need to add an adapter on an axis label template, which is accessible via axis’ renderer: In this particular example, actual category name is being replaced with a different value extracted from data.

Show only one series at a time

Type demo

This demo shows how we can use series settings events to ensure only one series is shown on an XY chart at a time, by toggling off other series automatically.