forked from observablehq/plot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
19 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,13 @@ | ||
import type {GeoStreamWrapper} from "d3"; | ||
|
||
/** | ||
* Additional rendering context provided to marks and initializers. | ||
*/ | ||
/** Additional rendering context provided to marks and initializers. */ | ||
export interface Context { | ||
/** | ||
* The current document. Defaults to window.document, but may be overridden | ||
* via plot options as when rendering plots in a headless environment. | ||
*/ | ||
document: Document; | ||
|
||
/** | ||
* The current projection, if any. | ||
*/ | ||
/** The current projection, if any. */ | ||
projection?: GeoStreamWrapper; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,26 @@ | ||
/** The realized screen dimensions, in pixels, of a plot. */ | ||
export interface Dimensions { | ||
/** The outer width of the plot in pixels, including margins. */ | ||
width: number; | ||
/** The outer height of the plot in pixels, including margins. */ | ||
height: number; | ||
/** The distance between the inner and outer top edges of the plot. */ | ||
marginTop: number; | ||
/** The distance between the inner and outer right edges of the plot. */ | ||
marginRight: number; | ||
/** The distance between the inner and outer bottom edges of the plot. */ | ||
marginBottom: number; | ||
/** The distance between the inner and outer left edges of the plot. */ | ||
marginLeft: number; | ||
/** The default margins of the facet axes, if any. */ | ||
facet?: { | ||
/** The minimum top margin to reserve for facet axes. */ | ||
marginTop: number; | ||
/** The minimum right margin to reserve for facet axes. */ | ||
marginRight: number; | ||
/** The minimum bottom margin to reserve for facet axes. */ | ||
marginBottom: number; | ||
/** The minimum left margin to reserve for facet axes. */ | ||
marginLeft: number; | ||
}; | ||
} |