Skip to main content

Lollipop Chart

Uses circles connected by lines to represent values, often for ranking or comparing. This provides a visually appealing and informative way to represent ranked data, such as top performers, key achievements, or survey results. It is particularly effective for highlighting individual data points and their relative positions within a set.

Chart:


Code:

  muze
.canvas()
.columns(["Maker"])
.rows(["Miles_per_Gallon"])
.layers([
{
mark: "bar",
encoding: {
color: {
value: () => {
return "#8DD3C7";
},
},
size: {
value: () => {
return 0.001;
},
},
},
},
{
mark: "point",
encoding: {
color: {
value: () => {
return "#8DD3C7";
},
},
opacity: {
value: () => {
return 1;
},
},
},
},
])
.config({
axes: {
x: {
labels: {
rotation: 90,
},
},
},
})