Skip to content

Instantly share code, notes, and snippets.

@mathisonian mathisonian/index.md
Last active Aug 13, 2017

Embed
What would you like to do?
idyll vars

Setting value on a variable just defines its initial value, if you want a variable that updates derived variables are available:

[var name:"x" value:1 /]
[derived name:"dataToBeCharted" value:`[ {x: 0, y: 0.5}, {x: 3.5, y: 0.5}, {x: 4, y: x}, {x: 4.5, y: 2}, {x: 5, y: 0.5}, {x: 8, y: 0.5} ]` /]

[Range value:x min:0 max:100 step:5/]
[Display value:x /]

[Chart type:"line" data:`dataToBeCharted` /]

or you can just put the expression directly on the chart:

[var name:"x" value:1 /]

[Range value:x min:0 max:100 step:5/]
[Display value:x /]

[Chart type:"line" data:`[ {x: 0, y: 0.5}, {x: 3.5, y: 0.5}, {x: 4, y: x}, {x: 4.5, y: 2}, {x: 5, y: 0.5}, {x: 8, y: 0.5} ]` /]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.