How to use the @elastic/charts.ScaleType.Linear 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 / uptime / public / components / functional / charts / snapshot_histogram.tsx View on Github external
defaultMessage: 'Pings',
              description:
                'The label on the y-axis of a chart that displays the number of times Heartbeat has pinged a set of services/websites.',
            })}
          />
           [x, upCount || 0])}
            id={upSpecId}
            name={upMonitorsId}
            stackAccessors={[0]}
            timeZone="local"
            xAccessor={0}
            xScaleType={ScaleType.Time}
            yAccessors={[1]}
            yScaleType={ScaleType.Linear}
          />
           [x, downCount || 0])}
            id={downSpecId}
            name={i18n.translate('xpack.uptime.snapshotHistogram.series.downLabel', {
              defaultMessage: 'Down',
            })}
            stackAccessors={[0]}
            timeZone="local"
            xAccessor={0}
            xScaleType={ScaleType.Time}
            yAccessors={[1]}
            yScaleType={ScaleType.Linear}
          />
github elastic / kibana / x-pack / legacy / plugins / triggers_actions_ui / np_ready / public / application / components / builtin_alert_types / threshold / visualization.tsx View on Github external
{alertVisualizationDataKeys.map((key: string) => {
              return (
                
              );
            })}
            {actualThreshold.map((_value: any, i: number) => {
github elastic / kibana / x-pack / legacy / plugins / lens / public / indexpattern_plugin / field_item.tsx View on Github external
formatter.convert(d)}
          />

          
        
      );
    }
  }

  if (props.topValues && props.topValues.buckets.length) {
    return wrapInPopover(
      <div data-test-subj="lnsFieldListPanel-topValues">
        {props.topValues.buckets.map(topValue =&gt; {
          const formatted = formatter.convert(topValue.key);
          return (
            <div>
              </div></div>
github elastic / kibana / x-pack / legacy / plugins / infra / public / components / metrics / sections / series_chart.tsx View on Github external
rect: {
      opacity: 1,
    },
  };
  const colors: DataSeriesColorsValues = {
    colorValues: [],
    specId: getSpecId(id),
  };
  const customColors: CustomSeriesColorsMap = new Map();
  customColors.set(colors, color || '#999');
  return (
    
  );
};
github elastic / kibana / x-pack / legacy / plugins / ml / public / jobs / new_job_new / pages / components / charts / event_rate_chart / event_rate_chart.tsx View on Github external
loading = false,
}) =&gt; {
  return (
    <div data-test-subj="{`mlEventRateChart" height="" style="{{">
       0} loading={loading}&gt;
        
          {showAxis === true &amp;&amp; }

          
          
        
      
    </div>
  );
};
github elastic / kibana / x-pack / legacy / plugins / siem / public / components / charts / barchart.tsx View on Github external
{data.map(series =&gt; {
        const barSeriesKey = series.key;
        const barSeriesSpecId = getSpecId(barSeriesKey);
        const seriesType = SeriesType.BAR;
        return checkIfAllTheDataInTheSeriesAreValid ? (
          
        ) : null;
      })}
github elastic / kibana / x-pack / legacy / plugins / uptime / public / components / functional / charts / checks_chart.tsx View on Github external
description: 'The heading of the y-axis of a chart of timeseries data',
            })}
          /&gt;
           ({
              x,
              [upString]: up || 0,
            }))}
            id={upSeriesSpecId}
            stackAccessors={['x']}
            timeZone="local"
            xAccessor="x"
            xScaleType={ScaleType.Time}
            yAccessors={[upString]}
            yScaleType={ScaleType.Linear}
          /&gt;
           ({
              x,
              [downString]: down || 0,
            }))}
            id={downSeriesSpecId}
            stackAccessors={['x']}
            timeZone="local"
            xAccessor="x"
            xScaleType={ScaleType.Time}
            yAccessors={[downString]}
            yScaleType={ScaleType.Linear}
          /&gt;
github elastic / kibana / x-pack / legacy / plugins / uptime / public / components / functional / charts / monitor_bar_series.tsx View on Github external
id={getAxisId('bottom')}
          position={Position.Bottom}
          tickFormat={timeFormatter(getChartDateLabel(absoluteStartDate, absoluteEndDate))}
        /&gt;
         [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;
      
    
  ) : null;
};
github elastic / kibana / x-pack / legacy / plugins / siem / public / components / charts / areachart.tsx View on Github external
{data.map(series =&gt; {
          const seriesKey = series.key;
          const seriesSpecId = getSpecId(seriesKey);
          return checkIfAllTheDataInTheSeriesAreValid(series) ? (
            
          ) : null;
        })}
github elastic / kibana / x-pack / legacy / plugins / uptime / public / components / functional / charts / duration_chart.tsx View on Github external
const lineSeries = locationDurationLines.map(line =&gt; {
    const locationSpecId = getSpecId('loc-avg' + line.name);
    return (
       [x || 0, microsToMillis(y)])}
        id={locationSpecId}
        key={`locline-${line.name}`}
        name={line.name}
        xAccessor={0}
        xScaleType={ScaleType.Time}
        yAccessors={[1]}
        yScaleToDataExtent={false}
        yScaleType={ScaleType.Linear}
      /&gt;
    );
  });