Type Alias ElevationProfileOptions
backgroundColor?: string | null;
crosshairColor?: string;
displayCrosshair?: boolean;
displayDistanceGrid?: boolean;
displayDistanceLabels?: boolean;
displayElevationGrid?: boolean;
displayElevationLabels?: boolean;
displayTooltip?: boolean;
displayUnits?: boolean;
distanceGridColor?: string;
elevationGridColor?: string;
fontSize?: number;
forceComputeElevation?: boolean;
labelColor?: string;
onChangeView?: ((windowedLineString: LineString) => void) | null;
onClick?: ((data: CallbackData) => void) | null;
onMove?: ((data: CallbackData) => void) | null;
paddingBottom?: number;
paddingLeft?: number;
paddingRight?: number;
paddingTop?: number;
profileBackgroundColor?: string | null;
profileLineColor?: string | null;
profileLineWidth?: number;
tooltipBackgroundColor?: string;
tooltipDisplayDistance?: boolean;
tooltipDisplayDPlus?: boolean;
tooltipDisplayElevation?: boolean;
tooltipDisplayGrade?: boolean;
tooltipTextColor?: string;
unit?: "metric" | "imperial";
}
Index
Properties
Properties
OptionalbackgroundColor
OptionalcrosshairColor
Color of the crosshair.
Default: "#0005" (partially transparent black)
OptionaldisplayCrosshair
Display the crosshair, a vertical line that follows the pointer, if true.
Default: true
OptionaldisplayDistanceGrid
Display the distance grid lines (vertical lines matching the distance labels) if true.
Default: false
OptionaldisplayDistanceLabels
Display the distance labels alon the horizontal axis.
Default: true
OptionaldisplayElevationGrid
Display the elevation grid lines (horizontal lines matching the elevation labels) if true.
Default: true
OptionaldisplayElevationLabels
Display the elevation label along the vertical axis.
Default: true
OptionaldisplayTooltip
Display the tooltip folowing the pointer.
Default: true
OptionaldisplayUnits
Display the distance and elevation units alongside the labels.
Default: true
OptionaldistanceGridColor
Color of the distance grid lines.
Default: "#0001" (partially transparent black)
OptionalelevationGridColor
Color of the elevation drig lines.
Default: "#0001" (partially transparent black)
OptionalfontSize
Font size applied to axes labels and tooltip.
Default: 12
OptionalforceComputeElevation
If true, will force the computation of the elevation of the GeoJSON data provided to the .setData() method,
even if they already contain elevation (possibly from GPS while recording). If false, the elevation will only
be computed if missing from the positions.
Default: false
OptionallabelColor
Color of the elevation and distance labels.
Default: "#0009" (partially transparent black)
OptionalonChangeView
Callback function to call when the chart is zoomed or panned.
The argument windowedLineString is the GeoJSON LineString corresponding
to the portion of the route visible in the elevation chart.
Default: null
OptionalonClick
Callback function to call when the the elevation chart is clicked.
Default: null
OptionalonMove
Callback function to call when the pointer is moving on the elevation chart.
Default: null
OptionalpaddingBottom
Padding at the bottom of the chart, in number of pixels.
Default: 10
OptionalpaddingLeft
Padding at the left of the chart, in number of pixels.
Default: 10
OptionalpaddingRight
Padding at the right of the chart, in number of pixels.
Default: 10
OptionalpaddingTop
Padding at the top of the chart, in number of pixels.
Default: 30
OptionalprofileBackgroundColor
Color of the elevation profile background (below the profile line)
Can be null to not display any backgound color.
Default: "#66ccff22"
OptionalprofileLineColor
Color of the elevation profile line.
Can be null to not display the line and rely on the background color only.
Default: "#66ccff"
OptionalprofileLineWidth
Width of the elevation profile line.
Default: 1.5
OptionaltooltipBackgroundColor
Color of the tooltip background.
Default: "#000A" (partially transparent black)
OptionaltooltipDisplayDistance
Display the distance information inside the tooltip if true.
Default: true
OptionaltooltipDisplayDPlus
Display the D+ (cumulated positive ascent) inside the tooltip if true.
Default: true
OptionaltooltipDisplayElevation
Display the elevation information inside the tooltip if true.
Default: true
OptionaltooltipDisplayGrade
Display the slope grade in percentage inside the tooltip if true.
Default: true
OptionaltooltipTextColor
Color of the text inside the tooltip.
Default: "#fff"
Optionalunit
Unit system to use. If "metric", elevation and D+ will be in meters, distances will be in km. If "imperial", elevation and D+ will be in feet, distances will be in miles.
Default: "metric"
Color of the background of the chart