How to use the @elastic/charts.getAnnotationId 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 / x-pack / legacy / plugins / ml / public / application / jobs / new_job / pages / components / charts / anomaly_chart / anomalies.tsx View on Github external
export const Anomalies: FC = ({ anomalyData }) => {
  const anomalies = anomalyData === undefined ? [] : anomalyData;
  const severities: Severities = splitAnomalySeverities(anomalies);

  return (
github elastic / kibana / x-pack / legacy / plugins / ml / public / jobs / new_job / pages / components / charts / anomaly_chart / anomalies.tsx View on Github external
export const Anomalies: FC = ({ anomalyData }) => {
  const anomalies = anomalyData === undefined ? [] : anomalyData;
  const severities: Severities = splitAnomalySeverities(anomalies);

  return (
    
      
      
github elastic / kibana / src / legacy / core_plugins / kibana / public / discover / np_ready / angular / directives / histogram.tsx View on Github external
id={getAxisId('discover-histogram-bottom-axis')}
          position={Position.Bottom}
          title={chartData.xAxisLabel}
          tickFormat={this.formatXValue}
          ticks={10}
        />
        
        
        
      
    );
github elastic / kibana / x-pack / legacy / plugins / ml / public / application / jobs / new_job / pages / components / charts / anomaly_chart / anomalies.tsx View on Github external
export const Anomalies: FC = ({ anomalyData }) => {
  const anomalies = anomalyData === undefined ? [] : anomalyData;
  const severities: Severities = splitAnomalySeverities(anomalies);

  return (
    
      
      
github elastic / kibana / x-pack / legacy / plugins / infra / public / pages / logs / analysis / sections / anomalies / chart.tsx View on Github external
const severityConfigs: Record = {
  warning: {
    annotationId: getAnnotationId(`anomalies-warning`),
    style: { fill: 'rgb(125, 180, 226)', opacity: 0.7 },
  },
  minor: {
    annotationId: getAnnotationId(`anomalies-minor`),
    style: { fill: 'rgb(255, 221, 0)', opacity: 0.7 },
  },
  major: {
    annotationId: getAnnotationId(`anomalies-major`),
    style: { fill: 'rgb(229, 113, 0)', opacity: 0.7 },
  },
  critical: {
    annotationId: getAnnotationId(`anomalies-critical`),
    style: { fill: 'rgb(228, 72, 72)', opacity: 0.7 },
  },
};

const renderAnnotations = (
  annotations: Record,
  chartId: string,
  renderAnnotationTooltip?: (details?: string) => JSX.Element
) => {
  return Object.entries(annotations).map((entry, index) => {
    return (
github elastic / kibana / x-pack / legacy / plugins / watcher / public / sections / watch_edit / components / threshold_watch_edit / watch_visualization.tsx View on Github external
{actualThreshold.map((_value: any, i: number) => {
              const specId = i === 0 ? 'threshold' : `threshold${i}`;
              return (
                
              );
            })}