Added number function to SquiggleChart

This commit is contained in:
Ozzie Gooen 2022-05-26 17:18:10 -04:00
parent d38caff28f
commit f5474030ec
2 changed files with 19 additions and 2 deletions

View File

@ -153,11 +153,11 @@ to allow large and small numbers being printed cleanly.
</Story> </Story>
</Canvas> </Canvas>
## Functions ## Functions (Distribution Output)
<Canvas> <Canvas>
<Story <Story
name="Function" name="Function to Distribution"
args={{ args={{
squiggleString: "foo(t) = normal(t,2)*normal(5,3); foo", squiggleString: "foo(t) = normal(t,2)*normal(5,3); foo",
width, width,
@ -167,6 +167,20 @@ to allow large and small numbers being printed cleanly.
</Story> </Story>
</Canvas> </Canvas>
## Functions (Number Output)
<Canvas>
<Story
name="Function to Number"
args={{
squiggleString: "foo(t) = t^2; foo",
width,
}}
>
{Template.bind({})}
</Story>
</Canvas>
## Records ## Records
<Canvas> <Canvas>

View File

@ -82,6 +82,9 @@
"y2": { "y2": {
"scale": "yscale", "scale": "yscale",
"value": 0 "value": 0
},
"fill": {
"value": "#2f65a7"
} }
} }
} }