ZoomCharts Documentation
Switch to Version 2.0 (BETA)
Navigation
Using the Pie Chart, users can navigate the whole data set.
There are two kinds of navigation:
- drilldown / drill up
- next page / previous page
- opening an URL
Drilldown
By default clicking on slice will expand it and open up a new level in the pie chart. The Pie Chart will request new data and display the new pie and move previous pie to the center of the chart.
To return to previous level, simply click on the center of the chart.
The slice will be be expanded if:
- the slice data has
id
field slice.expandable
is not set to falseslice.url
is not setevent.preventDefault()
is not called inonClick
event function.
You can expand a slice programmatically by calling chart.expandSlice(slice)
.
Next / Previous
Navigation by pages is performed by clicking on special "Others" and "Previous" slices that act list page flipping buttons.
This feature is controlled by settings.interaction.others
section in settings.
It has the following values:
enabled = true
- enables/disables the page navigation.navigationFraction = 0.15
- fraction of full pie chart to use for "Others" and "Previous" slice.maxSlicesVisible = 15
- max number of slices to display in single page.maxOthersFraction = 0.6
- limits max size of others slice.minSliceFraction = 0.01
- all slices smaller than this are automatically combined into "Others" slice, even if themaxSlicesVisible
limit is not reached.
Navigation by API
The API method chart.setPie(["rooId", "sublevel1Id", "sublevel2Id"], offset)
allows to change current state programmatically.
The first parameter is an array of pie identifiers.
Second parameter is paging offset if the active pie.
Opening an URL
Set slice.url
value to open an URL when clicking on the slice.
Initial state
Several settings determine the initial pie display.
navigation.initialPieId = ""
- identifier of initial pie. An array of identifiers:["root", "p1","p2"]
can be used to setup a stack of pies.navigation.initialPieOffset = 0
- index of the first visible slice of the initial pie
Note that this is incompatible with data.autoCategories
.