import React , { FC } from 'react' ; import { LineSeries , ScaleType , CurveType } from '@elastic/charts' ; import { seriesStyle , useChartColors } from '../common/settings' ; interface Props { chartData : any [ ] ; } const SPEC_ID = 'line' ; const lineSeriesStyle = { ... seriesStyle , } ; export const Line = ( { chartData } ) => { const { LINE_COLOR } = useChartColors ( ) ; return ( < LineSeries id = { SPEC_ID } xScaleType = { ScaleType . Time } yScaleType = { ScaleType . Linear } xAccessor = { 'time' } yAccessors = { [ 'value' ] } data = { chartData } curve = { CurveType . CURVE_MONOTONE_X } lineSeriesStyle = { lineSeriesStyle } color = { LINE_COLOR } / > ) ; } ;