Type Alias: FillPaint
type FillPaint =
| {
kind: 'solid';
}
| {
colorscale: Colorscale;
direction: FillGradientDirection;
kind: 'gradient';
start?: number;
stop?: number;
}
| {
kind: 'pattern';
pattern: PatternFill;
};Experimental
How the polygons are painted.
'solid': per-polygon FillData.color.'gradient'(Plotlyfillgradient): a colorscale along x (horizontal), y (vertical), or outwards from the center of the bounding box of all vertices (radial); seewriteFillGradientfor the exact mapping. Colors (and their alpha) come from the colorscale; FillData.opacity still multiplies them. The colorscale is a shared LUT texture, so a colorscale change uploads one 256×1 texture and nothing else.'pattern'(plan E8.10, Plotlyfillpattern): per-polygon hatch patterns (seepattern.ts; the polygons are its items), tiles anchored at the viewport's top-left corner; polygons without a shape keep their FillData.color. The pattern code loads on first use (FillPrimitive.ready).
Union Members
Type Literal
{
kind: 'solid';
}Type Literal
{
colorscale: Colorscale;
direction: FillGradientDirection;
kind: "gradient";
start?: number;
stop?: number;
}| Name | Type | Description |
|---|---|---|
colorscale | Colorscale | - |
direction | FillGradientDirection | - |
kind | "gradient" | - |
start? | number | Linear gradients: data coordinate of colorscale position 0 / 1 (default: the extent). |
stop? | number | - |
Type Literal
{
kind: 'pattern';
pattern: PatternFill;
}