How to configure something on init
You can tweak and tune all sorts of things when you embed vizabi in your webpage.
For example, this would start Vizabi chart with linear scale on X axis:
What options and their values are available? The example below shows the complete config. Change things in the interactive version to the right to see how the config changes on the left (you don’t need all of it, but you can use it as a lookup):
How to configure something during runtime
Above you can click on some things in config explorer to the right in order to change the picture on the left. This is how you do it programmatically:
How to read the configuration
Below is the example of retreiving values from vizabi model.
This returns the complete model (default + user-configured + autofilled):
This returns the model you should care about if you want to keep a copy of the state somewhere. It ommits volatile changes, for example, current “state.time.value” while time slider is playing.
This returns the user-configured model:
How to listen to config changes
In these examples config is defined above during chart init Listening vizabi events:
Listening to any state change:
Listening to changes specifically in time.value: