Skip to content

Latest commit

 

History

History
25 lines (18 loc) · 483 Bytes

README.md

File metadata and controls

25 lines (18 loc) · 483 Bytes

Flourish state change API demo

This is a simple demonstration of how to change state with the API.

After building an API chart with an initial API options object

const visual = new Flourish.Live(options)

you can manipulate any state property of the options object

control_title.addEventListener('input', function(e) {
  options.state.layout.title = e.target.value;
  //...

before simply updating the API visual.

  // ...
  visual.update(options);
})