Bullet Chart
Displays a single value along a scale, providing a quick visual comparison to a target or range. This allows for a rapid assessment of performance relative to goals or benchmarks. It is commonly used in dashboards and scorecards to quickly assess performance against targets, such as sales targets, budget goals, or key performance indicators (KPIs).
Chart:
Code:
muze
.canvas()
.rows(["Maker"])
.columns([
muze.Operators.share("Cumulative_Horsepower", "Target_Horsepower"),
])
.layers([
{
mark: "bar",
encoding: {
x: "Cumulative_Horsepower",
color: {
value: () => "#f1f1f1",
},
},
},
{
mark: "bar",
encoding: {
size: {
value: () => 0.3,
},
x: "Target_Horsepower",
color: "Qualitative_Range",
},
},
])
.config({
axes: {
x: {
name: "Horsepower (Cumulative vs. Target)",
},
},
})