Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
onCursorUpdate={handleCursorUpdate}
theme={
hasBarChart
? {}
: {
crosshair: {
band: {
fill: '#F00',
},
},
}
}
baseTheme={isDarkMode ? DARK_THEME : LIGHT_THEME}
tooltip={{
snap: true,
type: TooltipType.VerticalCursor,
headerFormatter: tooltipFormatter,
}}
/>
{annotations.map(({ id, data, icon, color }) => {
const dataValues = generateAnnotationData(data, tooltipFormatter);
const style = { line: { stroke: color } };
return (
}
hideLinesTooltips={true}
coordinates: {
x0: domainEnd,
},
});
}
const rectAnnotationStyle = {
stroke: isDarkMode ? darkEuiTheme.euiColorLightShade : lightEuiTheme.euiColorDarkShade,
strokeWidth: 0,
opacity: isDarkMode ? 0.6 : 0.2,
fill: isDarkMode ? darkEuiTheme.euiColorLightShade : lightEuiTheme.euiColorDarkShade,
};
const tooltipProps = {
headerFormatter: this.renderBarTooltip(xInterval, domainStart, domainEnd),
type: TooltipType.VerticalCursor,
};
return (