ZoomCharts Documentation
ZoomCharts.Configuration.BaseApi
Inheritance hierarchy
This type is implemented by FacetChart, GeoChart, NetChart, PieChart and TimeChart.
Methods
Adds the given data to whatever data the chart has currently loaded. The chart will automatically be updated to display this new data if it falls within the currently visible bounds.
Parameters
the ID of the data source that will be updated. The default value is default
.
Parameters
Applies one of the built-in themes to the chart. This is an alternative to calling
updateSettings({ theme: ZoomCharts.BaseApi.themes.dark })
.
Parameters
The name of the theme to be applied, must be one of the values defined in the BaseApi.themes
static property.
Return value
Launches a file download that contains an image or the data of the current state of the chart.
Note that in some browsers calling this method will send the data to a proxy. When handling sensitive data you should install the proxy
on your own server, see advanced.exportProxyURL
setting.
Parameters
The format in which the data will be exported.
Specifies the dimensions for the image formats.
false
.Specifies if the resulting image should have transparent background. This setting is only valid for png
image format. Default is false
.
Note that if area.style.fillColor
is set, this will have no effect.
Specifies the fileName to be used, excluding fileExtension
Saves the current chart state as a data-URI.
If image type is specified, the URI can be used as the image source in <img src="">
.
Note that some output settings might require sending the data to a proxy. When handling sensitive data you should install the proxy
on your own server, see advanced.exportProxyURL
setting.
Parameters
The format in which the data will be exported.
Specifies the dimensions for the image formats.
Specifies if the resulting image should have transparent background. This setting is only valid for png
image format. Default is false
.
Note that if area.style.fillColor
is set, this will have no effect.
Returns the dimensions for the image exported with exportImageAsString
.
Parameters
Return value
Saves the current chart state as an image.
Note that this method does not support custom DPI setting, for that exportAsString
method has to be used.
Parameters
Return value
A base64 encoded data-URI that contains the image data. This URI can be used as the image source in <img src="">
.
Returns the dimensions for the image exported with exportImageAsString
.
Parameters
Return value
Removes an event listener that was added by a call to on
or by specifying it in settings.
Note that the listener must be the exact same reference, which means that anonymous functions should not be used in call to on
.
Parameters
the type of the event. Please see the documentation for on
about valid values.
Parameters
Return value
true
if the listener was removed, false
if the listener was not previously registered.
Adds event listener.
Parameters
The type of the event for which the listener will be added. See method overloads for valid values.
The callback function. It receives two arguments - the mouse event data and a separate object containing chart specific information.
Parameters
Overloads
Adds an event listener for when the current view has changed (usually after panning and navigation).
Parameters
Parameters
Adds an event listener for the mouse click (or touch tap) event.
Parameters
Parameters
Adds an event listener for the mouse double click (or touch double tap) event.
Parameters
Parameters
Adds an event listener for the mouse click (or touch tap) event.
Parameters
Parameters
An empty mouse event.
Adds an event listener for when the currently hovered item has changed.
Parameters
Parameters
Adds an event listener for pointer down event.
Parameters
Parameters
Adds an event listener for pointer down event.
Parameters
Parameters
Adds an event listener for when chart placement on screen changes. Note that this is called on every animation frame.
Parameters
Parameters
Adds an event listener for the mouse right click (or touch longpress) event.
Parameters
Parameters
Adds an event listener for when the currently selected item or items have changed.
Parameters
Parameters
Adds an event listener for when the settings are updated through the API.
Parameters
Parameters
Adds an event listener for the mouse triple click (or touch triple tap) event.
Parameters
Parameters
Return value
Removes chart from DOM. This method is automatically called when you create a new chart within the same container element.
This method should always be called when the chart HTML element is removed as otherwise there might be additional resources such as event handlers remaining that will prevent the browser from properly releasing memory.
Replaces the data already in the data cache with the given values.
Parameters
the ID of the data source that will be updated. The default value is default
.
Updates the chart settings but instead of merging some settings that are arrays or dictionaries (such as data
)
these collections are replaced completely. For example, this allows removal of series or value axis within TimeChart.
Parameters
Return value
Decrements the suspend counter that was set using suspendPaint()
method.
This method also automatically schedules an async repaint.
Saves the current chart state as an image.
Parameters
Return value
A base64 encoded data-URI that contains the image data. This URI can be used as the image source in <img src="">
.
Suspends the animation of the chart until resumePaint()
is called.
This should be used when the chart element is hidden from the user to conserve browser resources.
Note that if suspendPaint()
is called multiple time then resumePaint()
has to be called the same number of times.
Re-evaluate data filters on next paint.
Updates the chart settings. Only the settings that have to be changed should be passed. Note that some arrays
and dictionaries (such as data
) are merged by the ID values - if instead they should be replaced, use
replaceSettings()
method.
Parameters
Return value
Re-evaluate style for all objects on next paint.
Properties
Gets the name of the chart the JavaScript object references. For example 'PieChart' or 'TimeChart'. This field is read-only.