Skip to content

grafit-charts


Variable: gradientLegendModule ​

const gradientLegendModule: object

Type Declaration ​

api ​

readonly api: object = gradientLegendApi

api.extent ​

extent: (options?, metrics?) => number = gradientLegendExtent

Room the scale takes across its side. Without the end labels that is the bar alone; with them it is the bar plus whatever the wider of the two ends really measures — a formatter is free to make them long, and a fixed reserve would push them off the chart. Called without metrics (no text to measure yet), the fallback sizes stand in.

Parameters ​
options? ​

GradientLegendOptions

metrics? ​

GradientLegendMetrics

Returns ​

number

api.HEIGHT ​

HEIGHT: number = GRADIENT_LEGEND_HEIGHT

api.isHorizontal ​

isHorizontal: (position?) => boolean = gradientLegendHorizontal

Top and bottom lay the bar out along the x axis; left and right along the y.

Parameters ​
position? ​

GradientLegendPosition

Returns ​

boolean

api.render ​

render: (layer, rect, info, theme, options?) => void = renderGradientLegend

Color scale (heatmap and other colorField series): vertical or horizontal.

Parameters ​
layer ​

Group

rect ​

LayoutRect

info ​

ColorScaleInfo

theme ​

ThemeContext

options? ​

GradientLegendOptions

Returns ​

void

api.WIDTH ​

WIDTH: number = GRADIENT_LEGEND_WIDTH

kind ​

readonly kind: "feature" = 'feature'

name ​

readonly name: "gradient-legend" = 'gradient-legend'