I’m trying to produce a bubble chart with values encoding x, y, size and colour. I managed to do it to some extent with hard-coded values (although the colour is not correct, it’s using z instead of my colourValue).
{
“chart”: { “type”: “bubble” },
“title”: { “text”: “Personas Bubble Chart” },
“legend”: {
“enabled”: true,
“title”: {
“text”: “Percent male”
}
},
“colorAxis”: {
“stops”: [
[0, “rgb(199, 113, 243)”], // Low value = less intense (purple)
[0.9, “rgb(76, 175, 254)”] // High value = more intense (blue)
]
},
“xAxis”: {
//w don’t want a line with ticks at the bottom
“gridLineWidth”: 1,
“lineWidth”: 0,
“tickLength”: 0,
“labels”: { “enabled”: false },
“title”: { “text”: null },
“plotLines”: [
{
“color”: “#A9A9A9”,
“width”: 1,
“value”: 0,
“zIndex”: 5
}
]
},
“yAxis”: {
“labels”: { “enabled”: false },
“title”: { “text”: null },
“plotLines”: [
{
“color”: “#A9A9A9”,
“width”: 1,
“value”: 0,
“zIndex”: 5
}
]
},“tooltip”: {
“pointFormat”: “{point.name}
X: {point.x}
Y: {point.y}
Size: {point.z}”
},
“plotOptions”: {
“bubble”: {
“minSize”: 40,
“maxSize”: 120,
“dataLabels”: {
“enabled”: true,
“format”: “{point.name}”
}
}
},
“series”: [
{
“name”: “Bubbles”,
“data”: [
{
“x”: -0.3384,
“y”: 0.3639,
“z”: 11,
“name”: “Bubble 1”,
“colorValue”: 0.25
},
{
“x”: -0.1026,
“y”: -0.1117,
“z”: 7,
“name”: “Bubble 2”,
“colorValue”: 0.44
},
{
“x”: -0.2843,
“y”: -0.4786,
“z”: 11,
“name”: “Bubble 3”,
“colorValue”: 0.48
},
{
“x”: -0.8098,
“y”: -0.1399,
“z”: 8,
“name”: "Bubble 4,
“colorValue”: 0.86
}] }
]
}
I’m now trying to do it more dynamically from a dataset I uploaded. In my data well (in the Group by) I have 5 columns for x, y, size, color and name. I’m struggling to use map to correctly assign these to the dimensions I need - do I even need map?
“series”: [
{
“data”: [“getColumn”,0,1,2,3]
}
]
This seems to be positioning my bubbles correctly and the size looks right, but how do I show name from column 4, and apply colour based on column 3? Why doesn’t this work?:
“data”: [“getColumn”,0,1,2,3,4],
“name”: [“get”, [“item”], 4]
Thanks in advance, I’ve just started using highcharts and finding the structuring of the data in my series quite difficult.