Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add tooltips and better labels #17

Merged
merged 5 commits into from
Jan 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions template/docs/example-dashboard.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,15 @@ const countLaunchesByStateId = id => launchHistory.filter(d => d.stateId === id)
title: "Launches Over the Years",
height: 300,
x: { label: null, interval: "year" },
y: { grid: true, label: "Lunches" },
color: { legend: true },
y: { grid: true, label: "Launches" },
color: { legend: true, label: "State" },
marks: [
Plot.barY(
launchHistory,
Plot.groupX({ y: "count" }, { x: d => new Date(d.date), fill: "state" })
Plot.groupX(
{ y: "count" },
{ x: d => new Date(d.date), fill: "state", tip: {format: {x: false}} }
)
),
Plot.ruleY([0])
]
Expand All @@ -73,12 +76,15 @@ const countLaunchesByStateId = id => launchHistory.filter(d => d.stateId === id)
marginLeft: 65,
height: 300,
x: { grid: true, label: "Launches" },
y: { label: "Launch Vehicle Family" },
color: { legend: true },
y: { label: "Vehicle Family" },
color: { legend: true, label: "State" },
marks: [
Plot.barX(
launchHistory,
Plot.groupY({ x: "count" }, { y: "family", fill: "state", sort: { y: "x", reverse: true }})
Plot.groupY(
{ x: "count" },
{ y: "family", fill: "state", tip: true, sort: { y: "x", reverse: true }}
)
),
Plot.ruleX([0])
]
Expand Down