ZoomCharts Documentation

Version: 1.21.1 (2024-11-08)

ZoomCharts.Configuration.ItemsChartSettingsAdvanced

Inheritance hierarchy

This type inherits from BaseSettingsAdvanced.

Methods

This type does not define any methods.

Properties

assets: Array<string | { url?: string; required?: () => boolean; }>
Inherited from: BaseSettingsAdvanced

List of assets to load from assets directory. This should be used to load CSS of JS files that are required for the chart to work.

If required is specified, it can be used to determine at runtime if the file has to be included. For example, zc.css is only included if the page does not already defines the class .DVSL-suppress-default-styles { color: #abc } (note that the color: #abc rule has to be defined since that rule is verified and not the class as a whole).

Note that in order to support older browsers such as Android 4.1, it is required for any .css asset to define the required delegate that can be used to verify if the asset has been loaded.

crossOriginHeader: "anonymous" | "use-credentials"
Inherited from: BaseSettingsAdvanced
Introduced in version 1.16.0.

Specifies if the image requests issued by the chart are issued with crossOrigin: anonymous attribute.

Setting this to true enables using of images hosted on other servers for chart export. However it requires that all image resources used provide Access-Control-Allow-Origin header in the response.

Note that currently the chart only uses this header when requesting images. It is not used when requesting other assets like scripts or stylesheets.

See also
dataExportFunction: (data: Array<Array<string | number | Date | boolean>>, callback: (data: Array<Array<string | number | Date | boolean>>) => void) => void
Inherited from: BaseSettingsAdvanced
Experimental property - the API might not be stable and is subject to change.
Introduced in version 1.16.0.

Specifies a delegate that provides the data for the CSV and Excel export options. If this is specified the chart will enable CSV and Excel export even if by default these options are not available. For charts that provide the data export by default, the function receives the default data set and can convert that.

Parameters

The default data set if the chart supports data export.

callback: (data: Array<Array<string | number | Date | boolean>>) => void

The callback that has to be called once the data is available.

Parameters
dataRequestClass: string
Inherited from: BaseSettingsAdvanced

The class to use for making data requests.

defaultExportFileName: string
Inherited from: BaseSettingsAdvanced
exportPdfSize: [number, number]
Inherited from: BaseSettingsAdvanced

The page size in milimeters for the exported PDF documents. For A4 use [210, 297] (this is the default), for letter size use [215.9, 279.4]. The first number is the width, the second is the height.

exportProxyURL: string
Inherited from: BaseSettingsAdvanced
Version 1.12.0: changed the default value; request format modified and is no longer compatible with previous versions.
Version 1.15.6: if the value is set to null, the user will be informed if the browser does not support the download without the proxy.

URL for export proxy requests. To host the service on your own server, please visit https://github.com/zoomcharts/proxy-export-dotnet/.

highDPI: number | boolean
Inherited from: BaseSettingsAdvanced
Version 1.13.0: a constant scale using a number can now be specified, previously only true/false was supported.

Enables high resolution rendering on high DPI screens. As performance is varied across different browsers, disable this to improve the performance of your application.

This setting can either be set to false to disable the scaling, true to render according to the browser DPI setting and a number to force a constant scale, ignoring browser DPI settings.

imageExportRenderingFunction: (context: CanvasRenderingContext2D, width: number, height: number) => void
Inherited from: BaseSettingsAdvanced
Experimental property - the API might not be stable and is subject to change.
Introduced in version 1.20.1.

Specifies a delegate to perform additional rendering during image export operations.

Parameters
width: number
height: number
labelCache: boolean
Inherited from: BaseSettingsAdvanced

Whether to store entire label into bitmap. Use it to improve the performance of your application.

labelCacheRotated: boolean
Inherited from: BaseSettingsAdvanced
Introduced in version 1.14.0.

Whether to store labels that are rendered rotated in the cache.

logging: boolean
Inherited from: BaseSettingsAdvanced

Whether to show verbose logging.

maxCanvasHeight: number
Inherited from: BaseSettingsAdvanced
Version 1.16.0: increased value from 2047 to 4096; the upscale is now always done by integer factor (e.g. x2 not x1.7).

Maximum height in pixels of the canvas object.

When the height exceeds this value, the canvas is scaled up to match the required resolution. For example, if the maximum height is set to 4096px but the container height is 5000px, the canvas will be rendered at 2500px height with the scale factor of 2.

maxCanvasWidth: number
Inherited from: BaseSettingsAdvanced
Version 1.16.0: increased value from 2047 to 4096; the upscale is now always done by integer factor (e.g. x2 not x1.7).

Maximum width in pixels of the canvas object.

When the width exceeds this value, the canvas is scaled up to match the required resolution. For example, if the maximum width is set to 4096px but the container width is 5000px, the canvas will be rendered at 2500px width with the scale factor of 2.

perNodeLoadingIndicator: boolean

Whether to display a loading indicator on every node, otherwise only a global loading indicator.

Inherited from: BaseSettingsAdvanced

Pointer related settings.

showFPS: boolean
Inherited from: BaseSettingsAdvanced

Whether to show frames per second on the chart.

showTimestamp: boolean
Inherited from: BaseSettingsAdvanced

Whether to show the current timestamp on the chart. Use only for debugging.

showTouchTrail: boolean
Inherited from: BaseSettingsAdvanced

Whether to show the trail of each touch pointer and also display pointers that are no longer active. For this setting to have effect, showTouches must be true.

showTouches: boolean
Inherited from: BaseSettingsAdvanced

Whether to use debugging option to paint pointer trails on screen.

strictEscaping: boolean
Inherited from: BaseSettingsAdvanced

If true, will always escape strings before they are used in innerHTML. For example, this could be useful if user input is used in a contentsFunction to avoid XSS possibilities.

Note if true, then HTML cannot be provided as strings in contentsFunction settings. Instead DOM objects must be returned directly.

Inherited from: BaseSettingsAdvanced

Miscellaneous style settings.

themeCSSClass: string
Inherited from: BaseSettingsAdvanced

CSS class for current theme. Used to reference chart container in CSS files.

useAnimationFrame: boolean
Inherited from: BaseSettingsAdvanced

Whether to use requestAnimationFrame for requested paint instead of setTimeout.

useLeafletInteractionContainer: boolean

For very rare use cases where interaction must come from the correct part of the page to behave as expected.

If doing significant configuration on the chart DOM elements, then:

Try setting to 'true' if interactions seem to come from the wrong location e.g. interactions are offset by several pixels. This is the correct value for most use cases.

Try setting to 'false' if the scroll wheel is not being detected in Google Chrome.

X