Skip to content

Commit

Permalink
Merge pull request #98 from hackoregon/barchartGlobals
Browse files Browse the repository at this point in the history
Removed HorizontalBarChart knobs from storybooks global scope
  • Loading branch information
AlexanderNull authored May 6, 2018
2 parents 1e66f5d + 398714d commit 7ff96b1
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions packages/component-library/stories/HorizontalBarChart.story.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,18 @@ const description = `
This is some basic usage with the button with providing a label to show the text.
Clicking should trigger an action.`;

const data = array('Data',[
{sortOrder: 1, population: 2000, label: 'Labrador Retriever'},
{sortOrder: 2, population: 8000, label: 'Standard Poodle'},
{sortOrder: 3, population: 6000, label: 'French Bulldog'},
{sortOrder: 4, population: 3000, label: 'Afghan Hound'},
{sortOrder: 5, population: 1000, label: 'Jack Russell Terrier'}
]);
const dataKey = text('Data key', 'sortOrder');
const dataValue = text('Data values', 'population');
const dataKeyLabel = text('Data key labels', 'label');

export default () => storiesOf(displayName, module).addDecorator(withKnobs)
.add('Basic Usage', (() => {
const data = array('Data',[
{sortOrder: 1, population: 2000, label: 'Labrador Retriever'},
{sortOrder: 2, population: 8000, label: 'Standard Poodle'},
{sortOrder: 3, population: 6000, label: 'French Bulldog'},
{sortOrder: 4, population: 3000, label: 'Afghan Hound'},
{sortOrder: 5, population: 1000, label: 'Jack Russell Terrier'}
]);
const dataKey = text('Data key', 'sortOrder');
const dataValue = text('Data values', 'population');
const dataKeyLabel = text('Data key labels', 'label');
return (
<HorizontalBarChart
data={data}
Expand Down

0 comments on commit 7ff96b1

Please sign in to comment.