import { select } from '@storybook/addon-knobs' ; import React from 'react' ; import { AreaSeries , Chart , ScaleType , StackMode , Axis , Position , CurveType , Settings } from '@elastic/charts' ; import { BABYNAME_DATA } from '@elastic/charts/src/utils/data_samples/babynames' ; import { useBaseTheme } from '../../use_base_theme' ; export const Example = ( ) => { const stackMode = select < StackMode > ( 'stackMode' , { Silhouette : StackMode . Silhouette , Wiggle : StackMode . Wiggle , } , StackMode . Silhouette ) ; return ( < Chart > < Settings baseTheme = { useBaseTheme ( ) } / > < Axis id = "x" position = { Position . Bottom } / > < Axis id = "y" position = { Position . Left } / > < AreaSeries id = "area1" xScaleType = { ScaleType . Linear } yScaleType = { ScaleType . Linear } xAccessor = { 0 } yAccessors = { [ 3 ] } splitSeriesAccessors = { [ 2 ] } data = { BABYNAME_DATA } stackAccessors = { [ 0 ] } curve = { CurveType . CURVE_MONOTONE_X } stackMode = { stackMode } areaSeriesStyle = { { area : { opacity : 0.7 , } , line : { visible : false , } , } } /> < /Chart>); } ;