Class ODSChartsPopoverDefinitionWithRendererAbstract

ODSChartsPopoverDefinition defines the interface of the manager of externalized popover or tooltip ODSChartsTheme.externalizePopover.

ODSChartsPopoverDefinition is not used directly. Instead, we use the variable **ODSChartsPopoverDefinition. ODSChartsPopoverManagers gives 3 default ODSChartsPopoverDefinition managers for Apache ECharts, Boosted 5 and Boosted 4.

You probably need to use one of those.

But even if you use one of those, you may specialize it with specific(s) implementation(s) with one of the ODSChartsPopoverDefinition method(s).

For example, you may specify the content of the tooltip:

                themeManager.externalizePopover(undefined, {
...ODSCharts.ODSChartsPopoverManagers.NONE,
getPopupContent: (tooltipElements) => {
return 'This is my HTML code that may content <a href="https://github.com/Orange-OpenSource/ods-charts">a link</a>';
},
});

or if you want to use Boosted 5 tooltip renderer:

                themeManager.externalizePopover(undefined, {
...ODSCharts.ODSChartsPopoverManagers.BOOSTED5,
getPopupContent: (tooltipElements) => {
return 'This is my HTML code that may content <a href="https://github.com/Orange-OpenSource/ods-charts">a link</a>';
},
});

Hierarchy (View Summary)

Constructors

Properties

getOrCreatePopupInstance: (
    selector: string,
    title: string,
    htmlContent: string,
    enterable: boolean,
) => undefined | ODSChartsPopoverManager
getPopupContent?: (tooltipElements: ODSChartsPopoverItem[]) => string

getPopupTitle() may be specify to change the html code of all the popup/tooltip content

getPopupContentLine?: (tooltipElement: ODSChartsPopoverItem) => string

getPopupContentLine() may be specify to change the html code of one line of the popup/tooltip

getPopupContentValue?: (tooltipElement: ODSChartsPopoverItem) => string

getPopupContentValue() may be specify to change the html code of value displayed in the popup/tooltip

getPopupTemplate?: (
    categoryLabel: string,
    tooltipElements: ODSChartsPopoverItem[],
) => string

getPopupTemplate() may be specify to replace a specific template for the popup/tooltip to replace the default one

getPopupTitle?: (
    axisValue: string,
    axisValueLabel?: string,
    name?: string,
) => string

getPopupTitle() may be specify to change the html code of the popup/tooltip title

testAvailability?: () => boolean

if provided, the testAvailability() will be called to check if this renderer is available. If not, the fall back is an empty ODSChartsPopoverDefinition, ie ODSChartsPopoverManagers.NONE

tooltipDelay: number
tooltipMarging: number