import React from 'react' ; import { Axis , LineSeries , Chart , Position , ScaleType , Settings , PartialTheme } from '@elastic/charts' ; import { ColorVariant } from '@elastic/charts/src/utils/common' ; import * as TestDatasets from '@elastic/charts/src/utils/data_samples/test_dataset' ; import { useBaseTheme } from '../../use_base_theme' ; export const Example = ( ) => { const customTheme = { lineSeriesStyle : { point : { radius : 10 , fill : ColorVariant . Series , stroke : ColorVariant . None , } , } , } ; return ( < Chart > < Settings showLegend showLegendExtra legendPosition = { Position . Right } theme = { customTheme } baseTheme = { useBaseTheme ( ) } / > < Axis id = "bottom" position = { Position . Bottom } title = "Bottom axis" showOverlappingTicks / > < Axis id = "left2" title = "Left axis" position = { Position . Left } tickFormat = { ( d ) => Number ( d ) . toFixed ( 2 ) } /> < LineSeries id = "line" xScaleType = { ScaleType . Ordinal } yScaleType = { ScaleType . Linear } xAccessor = "x" yAccessors = { [ 'y1' , 'y2' ] } splitSeriesAccessors = { [ 'g' ] } data = { TestDatasets . BARCHART_2Y1G } / > < /Chart>); } ;