-
-
Notifications
You must be signed in to change notification settings - Fork 229
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔨 (line legend) refactor label dropping algorithm
- Loading branch information
1 parent
23f6d25
commit a5caed0
Showing
7 changed files
with
522 additions
and
217 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
packages/@ourworldindata/grapher/src/lineLegend/LineLegendConstants.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { GRAY_70 } from "../color/ColorConstants.js" | ||
|
||
// text color for labels of background series | ||
export const NON_FOCUSED_TEXT_COLOR = GRAY_70 | ||
// Minimum vertical space between two legend items | ||
export const LEGEND_ITEM_MIN_SPACING = 4 | ||
// Horizontal distance from the end of the chart to the start of the marker | ||
export const MARKER_MARGIN = 4 | ||
// Space between the label and the annotation | ||
export const ANNOTATION_PADDING = 1 | ||
|
||
export const DEFAULT_CONNECTOR_LINE_WIDTH = 25 | ||
export const DEFAULT_FONT_WEIGHT = 400 |
Oops, something went wrong.