I need to implement custom html legend instead of built-in options.
To hide built-in rollover I’m using series config:
this.series.rolloverModifierProps.width = 0;
this.series.rolloverModifierProps.height = 0;
this.series.rolloverModifierProps.markerColor = "rgba(255, 255, 255, 0)";
I can’t set
rolloverModifierProps.showRollover = false;
because in that case rolloverModifierProps.tooltipDataTemplate handler is not firing.
My handler looks like
rolloverModifierProps.tooltipDataTemplate = (seriesInfo: SeriesInfo): string[] => {
const ohlcInfo = seriesInfo as OhlcSeriesInfo;
myOwnHandlerToPassDataToHtml({ high: ohlcInfo.highValue, low: ohlcInfo.lowValue, open: ohlcInfo.openValue, close: ohlcInfo.closeValue });
return [];
};
I’am wondering if there is any other way to hide rollover marker but keep tooltipDataTemplate handler firing?
- Sergey Chernyakov asked 2 years ago
- last active 2 years ago