ZoomCharts Documentation

ZoomCharts.Configuration.PieChartSettings

Inheritance hierarchy

This type inherits from BaseSettings.

Methods

This type does not define any methods.

Properties

Inherited from: BaseSettings

Advanced chart settings. Be advised that they are subject to change, backwards compatibility is not guaranteed.

Inherited from: BaseSettings

Chart area related settings.

assetsUrlBase: string
Inherited from: BaseSettings

The URL root where the ZoomCharts library and assets are located. For example, if the base.css file is available at 'http://server/css/zoomcharts/zc.css' then this value should be set to 'http://server/css/zoomcharts/'. Note that the library will try to determine its location automatically by searching the included script tags. So this property can be skipped if the assets folder is located next to 'zoomcharts.js' file on the server.

Inherited from: BaseSettings
container: string | HTMLElement
Inherited from: BaseSettings

Element of the page where the chart will be inserted. Any HTML element should work, for example you can use a <div>.

Any contents of the element will be cleared - this behavior can be used to specify a loading message as the initial content, for example <div>Chart is being initialized...</div>.

Note that a single element can host only one chart. If the same container is given to another chart, the previous chart will be automatically disposed.

Unless parentChart is specified, the value of the property is mandatory and can only be specified while creating the chart, not with updateSettings. The value can be either an ID of an existing element or a reference to a DOM element.

Inherited from: BaseSettings

Settings for displaying chart credits. Use it as a reference to additional data sources if necessery.

Chart including credits

Note that even if credits enabled on page load, it's possible to hide on exported images.

Inherited from: BaseSettings

Settings used to load data into chart. Customise preferred data source feeding methods. You can use one of these options: url, data function, preloaded data.

Inherited from: BaseSettings

The events used to handle user interaction with UI elements.

Configurable conditions to filter the raw data values for subset of drawing slices.

Properties
allowZeroValues: boolean
Introduced in version 1.14.0.

Determines if zero values are automatically filtered from the data or if they will be displayed.

Note that if you want to show the empty values in the piechart, it might be useful to set interaction.others.minSliceFraction to 0 or slice.minFraction to a value larger than 0.

sliceFilter: (sliceData: PieChartDataObject) => boolean

Function to filter visible slices.

Parameters

slice filtering data

Return value
Data type: boolean

true to show the slice, false to hide the slice.

Slice icons as an additional element of style to highlight each individual slice or groups.

Properties
autohideWhenTooSmall: boolean

Whether to render icons if smaller than min value of sizeExtent.

placement: "auto" | "center"

Icon placement method

Valid values:
  • auto - maximize icon size
  • center - always place in center of slice
sizeExtent: [number, number]

Min and max value of icon size. The icon size is automatically computed from available space.

Rising content field while hovering over slice. Content returned in a form of html and is relevant to context of slice hovered.

Properties
contentsFunction: (sliceData: PieChartDataObject, slice: PieChartSlice, callback: (result: string | HTMLElement) => void) => string | HTMLElement

Prepare custom info popup contents. May return null and call callback(contents) later.

Parameters

slice data including subvalues

slice object to apply predefined content

callback: (result: string | HTMLElement) => void

function called to return predefined content

Parameters
Return value
Data type: string | string | HTMLElement
enabled: boolean

Show/hide info popup.

Inherited from: BaseSettings

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

Label settings related to internal and external slice text and their connectors.

Inherited from: BaseSettings

The chart legend by additional interactivity to navigate between the slices or hilight each of them. Note that click on entries acts the same way as click on slice and is dependant of chart interaction mode.

Inherited from: BaseSettings

Localizeable strings including export type options and useful default buttons used for chart interaction. Buttons like to navigate back, set the chart on full screen and others.

navigation: anonymous type

Settings to specify initial pie and visible slice offset once the page loaded.

Properties
initialDrilldown: Array<string>

Initial pie drilldown to show. For example ['', 'Firefox', 'Firefox 2.5'] denotes to various browsers grouped by versions.

initialOffset: number

Initial offset, number of items from start.

parentChart: BaseApi
Inherited from: BaseSettings

The parent chart within which the new chart will be rendered. If this property is specified, container cannot be specified.

Use area.left, area.top, area.width and area.height settings to position the subchart within parent chart.

See also

Data values arranged in a circular manner.

Properties
adaptiveRadius: boolean

Whether to adapt pie outer radius dynamically to allow enough space for labels.

backgroundHoveredStyle: PieChartSettingsPieStyle

Hovered pie background style.

backgroundStyle: PieChartSettingsPieStyle

Pie background style.

centerMargin: number

Pie center margin.

depth: number

Pie depth - used for raised theme.

endAngle: number

End angle of the pie.

innerRadius: number

Pie inner radius. Inner pies are drawn inside this radius. If the value is less than 1, it is multiplied by current pie radius to get inner radius. Otherwise it represents the inner radius in pixels.

innerRadiusWhenDrilldown: number

Inner radius is extended to radius * innerRadiusWhenDrilldown when drilled down.

margin: number

Pie margin.

Pie style when no data is present.

outerMargin: number

Pie outer margin.

radius: number

Pie outer radius. If not specified, the radius is determined automatically.

rotationSpeed: number
Experimental property - the API might not be stable and is subject to change.
Introduced in version 1.12.0.

The speed of the rotation for the pie. Set to 0 to disable rotation and return the pie to its specified startAngle.

showInnerPies: boolean

Whether to show inner pies on chart.

showInnerPiesExport: boolean

Whether to show inner pies on exported image.

startAngle: number

Start angle of the pie.

Default pie rendering style.

styleFunction: (pie: PieChartPie) => void

Dynamically determine pie style from data.

Parameters

pie to apply predefined style

theme: "flat" | "bevel" | "can" | "rounded" | "smoothy"

Default pie rendering theme.

Valid values:
  • flat
  • bevel
  • can
  • rounded
  • smoothy
See also

Center X coordinate of the pie chart. If the value is 'null' - coordinate is calculated automatically. If the value is >1 - it specifies the exact x value in pixels. If the value is <=1 - it specifies a fraction of chart width.

Center Y coordinate of the pie chart. If the value is 'null' - coordinate is calculated automatically. If the value is >1 - it specifies the exact x value in pixels. If the value is <=1 - it specifies a fraction of chart height.

Represents settings for individual slices within each pie.

Properties
backgroundActiveStyle: anonymous type

Style to active slices in background (back navigation) pies

Properties
brightness: number
backgroundStyle: anonymous type

Slice style on background (back navigation) pies.

Properties
fillColor: string
fillColor2: string

Extra property to alternate fill colors on backgrond slices.

fillGradient: GradientDefinition
connectorStyle: BaseSettingsLineStyle

Label connector line style.

expandableMarkStyle: anonymous type

Expandable slice mark line style

Properties
distance: number
lineColor: string
lineDash: Array<number>
lineWidth: number

Hovered slices style.

margin: number

Slice margin.

minFraction: number

Controls minimal visual size of slice. Use this to make very small sizes visually bigger. The value represents smallest fraction of a full pie a slice will take. The range is between 0 and 1. For example using 0.05, all slices smaller than 5% will be grown up to 5%. Other slices will be made proportionally smaller to accommodate for extra size of small slices.

othersStyle: anonymous type

Style for "Others" slice.

Properties
fillColor: string
lineDecoration: "zigzag"

Circumference decoration of 'others' slice.

Valid values:
  • zigzag
previousStyle: anonymous type

Style for the "Previous" slice.

Properties
fillColor: string
lineDecoration: "zigzag"

Circumference decoration of 'previous' slice.

Valid values:
  • zigzag

Selected slices style.

Slice style settings

styleFunction: (slice: PieChartSlice, sliceData: PieChartDataObject) => void

Dynamically determine slice style from data.

Parameters

slice to apply predefined style

slice data including subvalues

Inherited from: BaseSettings

Theme to apply. You can either use this to share configuration objects between multiple charts or use one of the predefined themes.

See also
Inherited from: BaseSettings

The chart's main title.

Inherited from: BaseSettings

Adjustable settings to manage default and custom toolbar items, as well as toolbar overall appearance.

X