externalizeLegends() configure the manager to externalize the legends from the graphs to put it directly in your HTML document.
The generated legends
the initialized eCharts object
legendHolderSelector can be:
Optional
dataOptions: anyoptionally you can use this call to set dataOptions, if not already set.
the theme manager object itself to be able to chain calls.
externalizePopover() configure the manager to externalize the management of popover or tooltip.
The generated tooltips or popover will implement the Orange Design System.
the configuration of the externalizePopover feature ODSChartsPopoverConfig
Optional
popoverDefinition: ODSChartsPopoverDefinitionrenderer ODSChartsPopoverDefinition of the popover/tooltip. ODSChartsPopoverManagers is used to specify preconfigured renderer for Apache ECharts, Boosted 5 or Boosted 4.
Default value is ODSChartsPopoverManagers.NONE, that means it uses default Apache ECharts template to externalize tooltip/popover HTML element, implementing Orange Design system.
WARNING: Boosted 4 or Boosted 5 rendering requires dependency on the boosted library and access to the boosted global variable.
Optional
dataOptions: anyoptionally you can use this call to set dataOptions, if not already set.
the theme manager object itself to be able to chain calls.
getChartOptions() build the eCharts options merging
Optional
dataOptions: anyoptionally you can use this call to set dataOptions, if not already set.
the Apache ECharts options to use in Apache Echarts setOption()
call.
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: anyoptionally you can use this call to set dataOptions, if not already set.
modifications to be made to the Apache Echarts data options to implement the Orange Design System.
manageChartResize() ensures that the graph resizes correctly when its container is resized
the initialized eCharts object.
an unique id that identify the chart container in the DOM.
Optional
dataOptions: anyoptionally you can use this call to set dataOptions, if not already set.
the theme manager object itself to be able to chain calls.
Set the original Apache Echarts data options of your graph.
Example:
lineChartODSTheme
.setDataOptions({
xAxis: {
data: ['shirt', 'cardigan', 'chiffon', 'pants', 'heels', 'socks'],
},
series: [
{
name: 'sales',
type: 'bar',
data: [5, 20, 36, 10, 10, 20],
},
],
})
the Apache Echarts data options of your graph.
the theme manager object
Static
getEntry point of the library.
Once the library integrated, via
<script src="...ods-charts.js">
import \* as ODSCharts from 'ods-charts'
use ODSCharts.getThemeManager
(ODSChartsThemeOptions) to get the ODSChartsTheme.
It returns the generated theme manager.
Optional
options: ODSChartsThemeOptionsoptions used to generate the theme.
the theme manager. This manager is used to retrieve the Apache ECharts theme and manage the chart options in accordance with the Orange Design System. It is used to add features:
ODSChartsTheme is the object get by
ODSCharts.getThemeManager
(ODSChartsThemeOptions), refer to ODSChartsTheme.getThemeManagerThis manager is used to
See ODSChartsTheme.getThemeManager for details.