Waterfall
Info - How to setup Vizzu
In HTML
, create a placeholder element that will contain the rendered
chart.
<html>
<body>
<div id="myVizzu">
</div>
</body>
</html>
In JavaScript
, initialize and configure the chart:
import Vizzu from 'https://cdn.jsdelivr.net/npm/vizzu@0.10/dist/vizzu.min.js'
import {
data
} from 'https://lib.vizzuhq.com/0.10/assets/data/chart_types_eu.js'
let chart = new Vizzu('myVizzu')
chart.initializing
chart.animate({
data
})
- remove the Dimension from the Y-axis
- + here is an example of how you can set a colorGradient palette in the Style
chart.animate({
config: {
"channels": {
"x": "Year",
"y": [
"Year",
"Value 5 (+/-)"
],
"color": {
"set": "Value 5 (+/-)",
"range": {
"min": "-45",
"max": "45"
}
},
"label": "Value 5 (+/-)"
},
"legend": "color"
},
style: {
"plot": {
"marker": {
"colorGradient": "#ac1727 0,#e36c56 0.15,#f4b096 0.35,#d5d7d9 0.5,#9fbffa 0.65,#6389ec 0.85,#3d51b8 1",
"label": {
"position": "top"
}
}
}
}
});
chart.animate({
config: {
"channels": {
"y": {
"set": [
"Value 5 (+/-)"
]
}
}
}
});
chart.feature('tooltip', true);