bubbleChart = BubbleChart(airport_data, {
label: d => d.iata,
value: d => d.departures_amount,
group: d => d.type,
title: d => d.name,
width: 800,
legend: {
title: "Airport Type",
items: [
{ label: "Large Airport", color: "steelblue" },
{ label: "Medium Airport", color: "orange" },
{ label: "Small Airport", color: "green" },
{ label: "Helipad", color: "purple" },
{ label: "Closed", color: "red" }
]
},
tooltip: d => {
return `<div><strong>${d.type}</strong></div>
<div>${d.iata}: ${d.departures_amount}</div>
<div>${d.name}</div>`;
}
});