How to use the @elastic/charts.getAxisId 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 / infra / public / pages / logs / analysis / sections / anomalies / chart.tsx View on Github external
});
    },
    [setTimeRange]
  );

  return (
    <div style="{{">
      
        
         numeral(value.toPrecision(3)).format('0[.][00]a')} // https://github.com/adamwdraper/Numeral-js/issues/194
        /&gt;
        
        {renderAnnotations(annotations, chartId, renderAnnotationTooltip)}</div>
github elastic / kibana / x-pack / legacy / plugins / ml / public / jobs / new_job / pages / components / charts / common / axes.tsx View on Github external
export const Axes: FC = ({ chartData }) =&gt; {
  const yDomain = chartData !== undefined ? getYRange(chartData) : undefined;

  return (
    
      
      
    
  );
};
github elastic / kibana / x-pack / legacy / plugins / siem / public / components / charts / barchart.tsx View on Github external
}&gt;(({ data, ...chartConfigs }) =&gt; {
  const xTickFormatter = get('configs.axis.xTickFormatter', chartConfigs);
  const yTickFormatter = get('configs.axis.yTickFormatter', chartConfigs);
  const tickSize = getOr(0, 'configs.axis.tickSize', chartConfigs);
  const xAxisId = getAxisId(`stat-items-barchart-${data[0].key}-x`);
  const yAxisId = getAxisId(`stat-items-barchart-${data[0].key}-y`);
  const settings = {
    ...chartDefaultSettings,
    ...get('configs.settings', chartConfigs),
  };
  return chartConfigs.width &amp;&amp; chartConfigs.height ? (
    
      
      {data.map(series =&gt; {
        const barSeriesKey = series.key;
        const barSeriesSpecId = getSpecId(barSeriesKey);
        const seriesType = SeriesType.BAR;
        return checkIfAllTheDataInTheSeriesAreValid ? (
github elastic / kibana / x-pack / plugins / infra / public / components / metrics_explorer / chart.tsx View on Github external
)}
        <div width="" style="{{">
          {series.rows.length &gt; 0 ? (
            
              {metrics.map((metric, id) =&gt; (
                
              ))}
              
              
              
            
          ) : options.metrics.length &gt; 0 ? (
            
          ) : (
            
          )}
        </div>
      
    );
  }
);
github elastic / kibana / src / legacy / core_plugins / kibana / public / discover / np_ready / angular / directives / histogram.tsx View on Github external
const tooltipProps = {
      headerFormatter: this.renderBarTooltip(xInterval, domainStart, domainEnd),
      type: TooltipType.VerticalCursor,
    };

    return (
github elastic / kibana / x-pack / legacy / plugins / uptime / public / components / functional / charts / monitor_bar_series.tsx View on Github external
export const MonitorBarSeries = ({
  absoluteStartDate,
  absoluteEndDate,
  dangerColor,
  histogramSeries,
}: MonitorBarSeriesProps) =&gt; {
  const id = getSpecId('downSeries');

  return seriesHasDownValues(histogramSeries) ? (
    <div style="{{">
      
        
        
         [timestamp, down])}
          id={id}
          name={i18n.translate('xpack.uptime.monitorList.downLineSeries.downLabel', {
            defaultMessage: 'Down checks',
          })}
          timeZone="local"
          xAccessor={0}
          xScaleType={ScaleType.Time}
          yAccessors={[1]}
          yScaleType={ScaleType.Linear}
        /&gt;</div>
github elastic / kibana / x-pack / legacy / plugins / infra / public / components / metrics_explorer / chart.tsx View on Github external
)}
      <div width="" style="{{">
        {series.rows.length &gt; 0 ? (
          
            {metrics.map((metric, id) =&gt; (
              
            ))}
            
            
            
          </div>
github elastic / kibana / x-pack / legacy / plugins / infra / public / components / metrics_explorer / chart.tsx View on Github external
type={chartOptions.type}
                key={id}
                metric={metric}
                id={id}
                series={series}
                stack={chartOptions.stack}
              /&gt;
            ))}
            
            
            
          
        ) : options.metrics.length &gt; 0 ? (
          
        ) : (
          
        )}