import React from 'react' ; import { Axis , BarSeries , Chart , Position , ScaleType , Settings } from '@elastic/charts' ; import { SeededDataGenerator } from '@elastic/charts/src/mocks/utils' ; import { TooltipType } from '@elastic/charts/src/specs/constants' ; import { useBaseTheme } from '../../use_base_theme' ; export const Example = ( ) => { const dg = new SeededDataGenerator ( ) ; const data = dg . generateSimpleSeries ( 15000 ) ; const tooltipProps = { type : TooltipType . Follow , } ; return ( < Chart > < Settings tooltip = { tooltipProps } baseTheme = { useBaseTheme ( ) } / > < Axis id = "bottom" position = { Position . Bottom } title = "Bottom axis" / > < Axis id = "left2" title = "Left axis" position = { Position . Left } tickFormat = { ( d ) => Number ( d ) . toFixed ( 2 ) } /> < BarSeries id = "bars" xScaleType = { ScaleType . Linear } yScaleType = { ScaleType . Linear } xAccessor = "x" yAccessors = { [ 'y' ] } splitSeriesAccessors = { [ 'g' ] } data = { data } / > < /Chart>); } ;