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 > < Settings baseTheme = { useBaseTheme ( ) } / > < Axis id = "bottom" position = { Position . Bottom } / > < Axis id = "right" groupId = "mainGroup" position = { Position . Left } ticks = { 5 } / > < BarSeries id = "groupB" groupId = "other" useDefaultGroupDomain = "mainGroup" xScaleType = { ScaleType . Ordinal } yScaleType = { ScaleType . Linear } yNice xAccessor = "x" yAccessors = { [ 'y' ] } splitSeriesAccessors = { [ 'g' ] } stackAccessors = { [ 'g' ] } data = { [ { x : 'A' , y : 10 , g : 'ga' } , { x : 'A' , y : 10 , g : 'gb' } , { x : 'A' , y : 10 , g : 'gc' } , { x : 'B' , y : 10 , g : 'ga' } , { x : 'B' , y : 10 , g : 'gb' } , { x : 'B' , y : 10 , g : 'gc' } , ] } / > < /Chart>); } ;