externalizeLegends() configure the manager to externalize the legends from the graphs to put it directly in your HTML document.
The generated legends
externalizeLegends() needs:
optionally you can use this call to set dataOptions
Optional
dataOptions: anyreturns back the theme manager object
externalizePopover() configure the manager to externalize the management of popover or tooltip.
The generated tooltips or popover will implement the Orange Design System.
externalizePopover() needs:
popoverConfig: the configuration of the externalizePopover feature ODSChartsPopoverConfig
popoverDefinition: a renderer ODSChartsPopoverDefinition of the popover/tooltip
ODSChartsPopoverManagers gives preconfigured renderer
default value is ODSChartsPopoverManagers.NONE: uses default Apache ECharts template to externalize tooltip/popover HTML element, implementing Orange Design system
optionally you can use this call to set dataOptions
Optional
popoverDefinition: ODSChartsPopoverDefinitionOptional
dataOptions: anyreturns back the theme manager object
getChartOptions() build the eCharts options merging
optionally you can use this call to set dataOptions
Optional
dataOptions: anythe Apache ECharts options
getThemeOptions() can be used to get the options that should be added to charts options to implement the Orange Design System.
getThemeOptions() does not need to be called if you use getChartOptions() as getChartOptions() internally already calls it.
getThemeOptions() needs graph data, already set or given in the dataOptions parameter
Optional
dataOptions: anyreturns back the theme manager object
manageChartResize() ensures that the graph resizes correctly when the window is resized
manageChartResize() needs:
optionally you can use this call to set dataOptions
Optional
dataOptions: anyreturns back the theme manager object
setDataOptions is used to set the graph data.
Example:
lineChartODSTheme
.setDataOptions({
xAxis: {
data: ['shirt', 'cardigan', 'chiffon', 'pants', 'heels', 'socks'],
},
series: [
{
name: 'sales',
type: 'bar',
data: [5, 20, 36, 10, 10, 20],
},
],
})
returns back the theme manager object
Static
getEntry point of the library. It returns the generated theme manager.
This manager is used to retrieve the Apache ECharts theme and manage the chart options in accordance with the Orange Design System.
The method takes the theme configuration as a parameter ODSChartsThemeOptions.
Optional
options: ODSChartsThemeOptionsdefault option used to generate the theme
the theme manager
ODSChartsTheme is the object get by
ODSCharts.getThemeManager
(ODSChartsThemeOptions)This manager is used to