Interface: GarminChartScaleBarLayerProps
Defined in: src/garminsdk/components/charts/GarminChartScaleBarLayer.tsx:14
Component props for GarminChartScaleBarLayer.
Properties
displayUnitsMode
displayUnitsMode:
Subscribable<UnitsDistanceSettingMode>
Defined in: src/garminsdk/components/charts/GarminChartScaleBarLayer.tsx:16
The mode to apply to the scale bar's displayed units.
notToScaleText?
optionalnotToScaleText:string
Defined in: src/garminsdk/components/charts/GarminChartScaleBarLayer.tsx:46
The text to display when there are no geo-referencing data available for the displayed chart. Defaults to
'NOT TO SCALE'.
numberFormatter()?
optionalnumberFormatter: (value) =>string
Defined in: src/garminsdk/components/charts/GarminChartScaleBarLayer.tsx:32
A function that formats range values for display in the scale bar's label. Defaults to a function that formats numbers with up to one decimal place precision.
Parameters
| Parameter | Type | Description |
|---|---|---|
value | number | The value to format. |
Returns
string
The formatted value.
scaleBarLengthBounds
scaleBarLengthBounds:
Readonly<Omit<Float64Array<ArrayBufferLike>,"set"|"sort"|"copyWithin">> |Subscribable<Readonly<Omit<Float64Array<ArrayBufferLike>,"set"|"sort"|"copyWithin">>>
Defined in: src/garminsdk/components/charts/GarminChartScaleBarLayer.tsx:24
The limits to enforce on the scale bar's length, as [min, max] in pixels. The scale bar will attempt to choose
the largest range such that the length of the bar lies within these limits. The minimum limit has priority over
the maximum limit (in other words, if forced to violate one of the minimum or maximum limits, the scale bar will
preferentially violate the maximum limit).
unitFormatter()?
optionalunitFormatter: (unit) =>string
Defined in: src/garminsdk/components/charts/GarminChartScaleBarLayer.tsx:40
A function that formats unit types for display in the scale bar's label. Defaults to an upper-case unit formatter created from UnitFormatter.
Parameters
| Parameter | Type | Description |
|---|---|---|
unit | Unit<Distance> | The unit to format. |
Returns
string
The formatted unit.