How to use the @elastic/charts.TooltipType.VerticalCursor function in @elastic/charts

To help you get started, we’ve selected a few @elastic/charts examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github elastic / kibana / src / legacy / core_plugins / vis_type_timeseries / public / visualizations / views / timeseries / index.js View on Github external
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}
github elastic / kibana / src / legacy / core_plugins / kibana / public / discover / np_ready / angular / directives / histogram.tsx View on Github external
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 (