import { number } from '@storybook/addon-knobs' ; import React from 'react' ; import { Axis , BarSeries , Chart , Position , ScaleType , Settings } from '@elastic/charts' ; import { useBaseTheme } from '../../use_base_theme' ; export const Example = ( ) => { const minBarHeight = number ( 'minBarHeight' , 5 ) ; const data = [ [ 1 , 100000 ] , [ 2 , 10000 ] , [ 3 , 1000 ] , [ 4 , 100 ] , [ 5 , 10 ] , [ 6 , 1 ] , [ 7 , 0 ] , [ 8 , 1 ] , [ 9 , 0 ] , ] ; return ( < Chart > < Settings baseTheme = { useBaseTheme ( ) } / > < Axis id = "bottom" title = "Bottom" position = { Position . Bottom } / > < Axis id = "left" title = "Left" position = { Position . Left } / > < BarSeries id = "bars" xScaleType = { ScaleType . Linear } yScaleType = { ScaleType . Linear } xAccessor = { 0 } yAccessors = { [ 1 ] } data = { data } minBarHeight = { minBarHeight } / > < /Chart>); } ;