ZoomCharts Documentation

Version: 1.21.1 (2024-11-08)

PieChart.settings.interaction

This section is defined by the type PieChartSettingsInteraction.

Configurable interactivity options to navigate among the slices and pie levels to facilitate analysis of the grouped data in different ways.

Properties

animation: anonymous type

Chart animation settings.

Properties
hoverDuration: number
Default value: 200

Duration of hover animation.

scrollDuration: number
Default value: 500

Duration of scroll animation.

coverCenter: boolean
Default value: false

If true, empty donut center area reacts to clicks.

mode: "drilldown" | "select" | "toggle"
Default value: "drilldown"

Interaction mode. Note that selection.enabled can be used to disable the selection completely.

Valid values:
  • drilldown - performs drill down on click, if item is not expandable, selects it
  • select - selects items
  • toggle - toggle selects items.

Slice including all the values that can not be displayed as a separate slice. Use them to configure 'others' slice rendering space.

Properties
centerGoesToPrevious: boolean
Default value: false

If true, when offset > 0 click on center acts as click on previous slice.

enabled: boolean
Default value: true

Enable/Disable Others/Previous slices.

maxOthersFraction: number
Default value: 0.6

Max size of others slice, as a fraction of 1. If others slice is bigger than this, it will be made smaller and other slices proportionally expanded.

maxSlicesVisible: number
Default value: 15

Max number of slices to show. All remaining slices will be replaced by 'Others' slice.

minSliceFraction: number
Default value: 0.01

Minimum slice size as fraction of full pie. All slices smaller than that are replaced with 'Others' slice.

minSlices: number
Default value: 1
Introduced in version 1.12.0.

Minimum number of slices the pie needs to have for it to show the Others slice. Note that once this limit is reached the Others slice may also contain all but one of the slices - this setting does not limit the minimum number of slices that are shown at once in such case.

If you set this property to a value greater than 1, it might be useful to set slice.minFraction to a value of 0.01 or greater.

navigationFraction: number
Default value: 0.15
Version 1.12.0: the settings correctly applies to Others slice.

Others and Previous slice size as fraction of full pie. Previous will always be this big. Other will be at least this big but no bigger than maxOthersFraction.

Inherited from: BaseSettingsInteraction
View section details

Controls chart resize handles.

It's a horizontal line right below any chart to handle whole chart resizes by small steps.

Note that the full screen button used as a main alternative to get a full screen by one click.

scrolling: anonymous type

One of interactivity option to scroll among data.

Properties
enabled: boolean
Default value: false

Enable/disable scrolling the Other/Previous slices by rotating the chart.

selection: anonymous type

One of interactivity option to use the data selection.

Properties
enabled: boolean
Default value: true

Enable/disable selection.

maxSwipeDistance: number
Default value: 45

Max cutout distance on swipe.

partialSwipe: boolean
Default value: false

Allows partial selecting of slices by gradually dragging them outwards. If this is set to true, the slices will not snap to true/false positions instead the API will provide information on how far they were pulled out.

swipe: boolean
Default value: false

Wether to select slice by swipe. Note that it works independently of selection mode.

swipeSensitivity: number
Default value: 10

Pixels the pointer has to be moved before the motion is recognized as a swipe.

tolerance: number
Default value: 2

Selection distance tolerance.

X