diff --git a/src/context.d.ts b/src/context.d.ts index 9bc14286c8..d07832af8d 100644 --- a/src/context.d.ts +++ b/src/context.d.ts @@ -1,8 +1,6 @@ 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 @@ -10,8 +8,6 @@ export interface Context { */ document: Document; - /** - * The current projection, if any. - */ + /** The current projection, if any. */ projection?: GeoStreamWrapper; } diff --git a/src/curve.d.ts b/src/curve.d.ts index 6e9ee3424f..c3a8668ae9 100644 --- a/src/curve.d.ts +++ b/src/curve.d.ts @@ -1,8 +1,10 @@ import type {CurveFactory} from "d3"; -type CurveFunction = CurveFactory; +/** A curve implementation. */ +export type CurveFunction = CurveFactory; -type CurveName = +/** The built-in curve implementations. */ +export type CurveName = | "basis" | "basis-closed" | "basis-open" @@ -60,6 +62,7 @@ export interface CurveOptions extends CurveAutoOptions { curve?: Curve; } +/** Options for marks that support possibly-projected curves. */ export interface CurveAutoOptions { /** * The curve (interpolation) method for connecting adjacent points. One of: diff --git a/src/dimensions.d.ts b/src/dimensions.d.ts index b57f28fa9d..3b5f34ba93 100644 --- a/src/dimensions.d.ts +++ b/src/dimensions.d.ts @@ -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; }; }