import { BarChart } from 'reaviz'; import { MarimekkoChart } from 'reaviz'; import { StackedBarChart } from 'reaviz'; import { StackedNormalizedBarChart } from 'reaviz'; import { multiCategory, binnedDateData } from 'reaviz-data-utils'; import chroma from 'chroma-js'; import { BarSeries, Bar, StackedBarSeries, StackedNormalizedBarSeries, MarimekkoBarSeries, RangeLines, GuideBar, BarLabel, HistogramBarSeries } from 'reaviz'; import { GridlineSeries, Gridline } from 'reaviz'; import { LinearXAxis, LinearXAxisTickSeries, LinearYAxis, LinearYAxisTickSeries, LinearYAxisTickLabel } from 'reaviz'; import { Gradient, GradientStop } from 'reaviz'; const targetSampleData = [ { key: 'Lateral Movement', data: [ { key: 'XML', data: 100, target: 120 }, { key: 'JSON', data: 120, target: 100 }, { key: 'HTTPS', data: 150, target: 160 } ] }, { key: 'Discovery', data: [ { key: 'XML', data: 100, target: 110 }, { key: 'JSON', data: 34, target: 50 }, { key: 'HTTPS', data: 40, target: 40 } ] }, { key: 'Exploitation', data: [ { key: 'XML', data: 70, target: 80 }, { key: 'JSON', data: 130, target: 100 }, { key: 'HTTPS', data: 110, target: 90 } ] } ]; export default { tags: ['snapshot'], title: 'Charts/Bar Chart/Vertical/Multi Series', component: BarChart, subcomponents: { BarSeries, StackedBarSeries, StackedNormalizedBarSeries, MarimekkoBarSeries, RangeLines, Bar, BarLabel, GuideBar, HistogramBarSeries } }; export const Simple = () => ( } rangeLines={} guide={} /> } colorScheme="cybertron" padding={0.8} /> } /> ); export const BarTargetMarker = () => ( } rangeLines={} guide={} /> } colorScheme="cybertron" padding={0.8} /> } /> ); export const Stacked = () => ( , ]} /> } rangeLines={} guide={} /> } colorScheme="cybertron" /> } /> ); export const StackedCustomStyle = () => ( ( , ]} /> } width={10} /> ))} /> } yAxis={ } /> } /> ); export const StackedDiverging = () => ( } />} series={ } gradient={ , ]} /> } rangeLines={} />, } gradient={ , ]} /> } rangeLines={} /> ]} type="stackedDiverging" colorScheme={chroma .scale(['ACB7C9', '418AD7']) .colors(binnedDateData[0].data.length)} /> } yAxis={ } /> } /> } xAxis={ } /> } /> ); export const StackedNormalized = () => ( , ]} /> } rangeLines={} /> } colorScheme="cybertron" /> } /> ); export const Marimekko = () => ( , ]} /> } rangeLines={} /> } colorScheme="cybertron" /> } /> );