Bubble Plot 2
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
})
This Vizzu animation consist of 2 steps (animates):
1st:
- remove two Measures from the axes
- move the Dimension from the Label channel and the third Measure from the Size channel to the X-axis
- switch the Geometry from Circle to Rectangle
2nd:
- remove the Dimension from the X-axis
- add the remaining Measure to the Label channel
chart.animate({
config: {
"channels": {
"x": [
"Joy factors",
"Value 6 (+/-)"
],
"y": "Value 5 (+/-)",
"color": "Joy factors",
"size": "Value 2 (+)",
"label": "Country_code"
},
"geometry": "circle"
}
});
chart.animate({
config: {
"channels": {
"x": [
"Country_code",
"Value 2 (+)"
],
"y": "Joy factors",
"label": null
},
"geometry": "rectangle",
"orientation": "vertical"
}
});
chart.animate({
config: {
"channels": {
"x": "Value 2 (+)",
"label": "Value 2 (+)"
}
}
});