Skip to content
This repository has been archived by the owner on Jul 9, 2019. It is now read-only.

Commit

Permalink
added knobs for changing the graph data
Browse files Browse the repository at this point in the history
  • Loading branch information
richarddubay committed Nov 30, 2016
1 parent 18b0b73 commit 1c8e8ee
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion imports/components/graphs/lineGraph/__stories__/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Meteor } from "meteor/meteor";
import { storiesOf } from "@kadira/storybook";
import {
withKnobs,
text,
number,
} from "@kadira/storybook-addon-knobs";
import withReadme from "storybook-readme/with-readme";
import backgrounds from "react-storybook-addon-backgrounds";
Expand Down Expand Up @@ -73,6 +73,20 @@ story
},
];

// knobs for changing data
data[0].amount = number("January", data[0].amount);
data[1].amount = number("February", data[1].amount);
data[2].amount = number("March", data[2].amount);
data[3].amount = number("April", data[3].amount);
data[4].amount = number("May", data[4].amount);
data[5].amount = number("June", data[5].amount);
data[6].amount = number("July", data[6].amount);
data[7].amount = number("August", data[7].amount);
data[8].amount = number("September", data[8].amount);
data[9].amount = number("October", data[9].amount);
data[10].amount = number("November", data[10].amount);
data[11].amount = number("December", data[11].amount);

return (
<LineGraph data={data} />
);
Expand Down

0 comments on commit 1c8e8ee

Please sign in to comment.