Continuous visual map component that maps data values to visual properties (typically color). Required for heatmaps.
Usage
VisualMap(
type = "continuous",
min = NULL,
max = NULL,
precision = NULL,
calculable = NULL,
show = NULL,
orient = NULL,
in_range = NULL,
out_of_range = NULL,
left = NULL,
right = NULL,
top = NULL,
bottom = NULL
)Arguments
- type
Character {"continuous", "piecewise"}: Visual map type.
- min
Optional Numeric: Minimum value of the mapped data range.
- max
Optional Numeric: Maximum value of the mapped data range.
- precision
Optional Integer
[0, Inf): Decimal places shown in colorbar labels and the draggable-handle tooltip. ECharts defaults to0, which rounds labels to whole numbers — set this to matchvalue_digitsfor accurate display.- calculable
Optional Logical: Whether to show drag handles for interactive range selection.
- show
Optional Logical: Whether to display the visual map legend.
- orient
Optional Character {"vertical", "horizontal"}: Orientation of the color bar.
- in_range
Optional list: Visual encoding for in-range values. Typically
list(color = c("blue", "white", "red")).- out_of_range
Optional list: Visual encoding for out-of-range values.
- left
Optional Numeric or Character: Distance from the left of the container.
- right
Optional Numeric or Character: Distance from the right of the container.
- top
Optional Numeric or Character: Distance from the top of the container. For vertical heatmap colorbars,
draw()aligns"middle"and"center"with the plotted data area.- bottom
Optional Numeric or Character: Distance from the bottom of the container.
Details
Corresponds to ContinuousVisualMapOption in
src/component/visualMap/ContinuousModel.ts.
ECharts docs: https://echarts.apache.org/en/option.html#visualMap-continuous
Examples
VisualMap(type = "continuous", min = 0, max = 100, calculable = TRUE)#> <rtemis.draw::VisualMap>
#> @ type : chr "continuous"
#> @ min : num 0
#> @ max : num 100
#> @ precision : NULL
#> @ calculable : logi TRUE
#> @ show : NULL
#> @ orient : NULL
#> @ in_range : NULL
#> @ out_of_range: NULL
#> @ left : NULL
#> @ right : NULL
#> @ top : NULL
#> @ bottom : NULL