import React from 'react' ; import { Axis , BarSeries , Chart , Position , ScaleType , Settings } from '@elastic/charts' ; import { useBaseTheme } from '../../use_base_theme' ; export const Example = ( ) => { return ( < Chart renderer = "canvas" > < Settings theme = { useBaseTheme ( ) } /> < Axis id = "count" title = "count" position = { Position . Left } / > < Axis id = "x" title = "goods" position = { Position . Bottom } / > < BarSeries id = "bars" name = "amount" xScaleType = { ScaleType . Ordinal } xAccessor = "x" yAccessors = { [ 'y' ] } barSeriesStyle = { { rectBorder : { visible : true , strokeWidth : 10 , stroke : 'black' , } , } } data = { [ { x : 'A' , y : 0 , val : 1222 } , { x : 'B' , y : 20 , val : 1222 } , { x : 'C' , y : 750 , val : 1222 } , { x : 'D' , y : 854 , val : 1222 } , ] } / > < /Chart>); } ;