import {Fragment} from 'react'; import MiniBarChart from 'sentry/components/charts/miniBarChart'; import theme from 'sentry/utils/theme'; export default { title: 'Components/Data Visualization/Charts/MiniBarChart', }; export const _MiniBarChart = () => { const startTime = 1601992800; const interval = 3600; const all = [ 0, 1, 2, 4, 9, 6, 17, 6, 25, 8, 23, 28, 19, 17, 17, 29, 11, 20, 15, 12, 19, 13, 1, 4, 0, ]; const current = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 4, 0, 2, 0, ]; return (

Stacked MiniBarChart

With markers as per issue details

({ name: (startTime + interval * i) * 1000, value, })), }, { seriesName: 'Release abc123', data: current.map((value, i) => ({ name: (startTime + interval * i) * 1000, value, })), }, ]} markers={[ { barGap: '-100%', name: 'First Seen', value: (startTime + interval) * 1000, color: theme.pink300, }, { name: 'Last Seen', value: (startTime + interval * 23) * 1000, color: theme.green300, }, ]} />

No markers and emphasis colors

({ name: (startTime + interval * i) * 1000, value, })), }, ]} />

With yAxis labels and stacked results

({ name: (startTime + interval * i) * 1000, value, })), }, { seriesName: 'Rejected', data: current.map((value, i) => ({ name: (startTime + interval * i) * 1000, value, })), }, ]} />
); }; _MiniBarChart.storyName = 'MiniBarChart';