ZoomCharts Documentation

Version: 1.21.1 (2024-11-08)

ZoomCharts.Configuration.PieChartSettingsData

Inheritance hierarchy

This type inherits from BaseSettingsData.

This type is implemented by FacetChartSettingsData.

Methods

This type does not define any methods.

Properties

autoCategories: Array<string | ((obj: PieChartDataObject) => string)>

An array of fields for auto-categorization. For each field a new drilldown sub-level will be created, separated by the values of that field.

dataFunction: (id: string, limit: number, offset: number, success: (data: PieChartDataObjectRoot) => void, fail: (result: BaseDataErrorResponse) => void) => void

Load more chart data.

Parameters
id: string

The ID of the parent slice. null when loading the top level data.

limit: number

max number of slices to load on pie

offset: number

number of slices to skip from start

success: (data: PieChartDataObjectRoot) => void

callback function to execute when data arrived correctly

Parameters
fail: (result: BaseDataErrorResponse) => void

callback function to execute when error occure while loading data

Parameters
format: "JSON" | "GeoJSON"
Inherited from: BaseSettingsData

Data loading format. Currently most charts only support JSON.

id: string
Inherited from: BaseSettingsData

Data id used for series to reference specific data source.

itemsToLoad: number

Number of slices to request from server.

numberOfParallelRequests: number
Inherited from: BaseSettingsData

Max number of parallel data requests to issue. More requests will result in faster loading, but might put heavy load on server.

partialLoad: boolean

Enables/Disables partial load. Items will be loaded on demand but is not compatible with sortField or autoCategories.

postprocessorFunction: (data: string) => string
Inherited from: BaseSettingsData

Delegate that can be used to process data returned by the server for the HTTP request issued by the chart.

Parameters
data: string

The raw data received from the server.

Return value
Data type: string

The data object that will be further processed by the chart.

Inherited from: BaseSettingsData
Version 1.12.0: the value has to be an object, JSON strings are no longer accepted.

Provides the ability to embed chart data directly into the chart configuration.

This data can be complete or act as the initial data where the rest will be requested dynamically using url or dataFunction.

requestTimeout: number
Inherited from: BaseSettingsData

Timeout in milliseconds for data requests. This timeout only applies to HTTP requests issued by the chart directly.

Version 1.12.0: added the ability to specify ascending sort order.
Version 1.13.0: added the ability to specify multiple fields in an array.
Version 1.14.0: added the ability to specify a custom sort delegate.

If set, items will be sorted in descending order using values from this field. You can either specify a single field or an array of fields.

To sort the values ascending, prefix the field name with -, for example, -value (without any spaces).

The default value null means that the chart does not reorder the data and it is displayed in the order it is given in the data source.

The callback receives two data objects every iteration, return 0 for equal values, 1 if the first value should be before the other and -1 otherwise.

sortField: function (a, b) {
// handle null and undefined values as zeroes
var v1 = a.val || 0;
var v2 = b.val || 0;
if (v1 === v2) return 0;
if (v1 < v2) return 1;
return -1;
}
url: string
Inherited from: BaseSettingsData

URL that is used to load data

urlParameters: Array<{ name?: string; value?: string; }>
Inherited from: BaseSettingsData

List of extra parameters to pass with data URL.

Properties
name: string

Parameter name.

value: string

Parameter value.

X