Last active
May 16, 2017 06:25
-
-
Save tmeasday/43db17a3ee4772added8295708f91320 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { storiesOf } from '@kadira/storybook'; | |
| import Histogram from './Histogram'; | |
| const latencies = []; | |
| for (var i = 20; i <= 120; i += 20) { | |
| latencies.push(i); | |
| } | |
| storiesOf('Histogram') | |
| .add('Typical', () => <Histogram data={latencies.map(latency => ({ | |
| latency, | |
| count: 5000 + Math.random() * 15000, | |
| }))} />) | |
| .add('Low data', () => <Histogram data={latencies.map(latency => ({ | |
| latency, | |
| count: latency === 110 ? 5000 + Math.random() * 15000 : Math.random() * 1000, | |
| }))} />) | |
| .add('No data', () => <Histogram data={latencies.map(latency => ({latency, count: 0}))} />) | |
| .add('Loading', () => <Histogram loading={true} />); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment