MCPcopy Index your code
hub / github.com/apache/echarts / getScaleValuePositionKind

Function getScaleValuePositionKind

src/coord/axisHelper.ts:138–150  ·  view source on GitHub ↗
(
    scale: Scale, value: number, considerMappingExtent: boolean
)

Source from the content-addressed store, hash-verified

136 * Check if the axis cross a specific value.
137 */
138export function getScaleValuePositionKind(
139 scale: Scale, value: number, considerMappingExtent: boolean
140): ScaleValuePositionKind {
141 const dataExtent = considerMappingExtent
142 ? getScaleExtentForMappingUnsafe(scale, null)
143 : scale.getExtentUnsafe(SCALE_EXTENT_KIND_EFFECTIVE, null);
144 const min = dataExtent[0];
145 const max = dataExtent[1];
146 return !isValidBoundsForExtent(min, max) ? SCALE_VALUE_POSITION_KIND_OUTSIDE
147 : (min === value || max === value) ? SCALE_VALUE_POSITION_KIND_EDGE
148 : (min < value && max > value) ? SCALE_VALUE_POSITION_KIND_INSIDE
149 : SCALE_VALUE_POSITION_KIND_OUTSIDE;
150}
151export type ScaleValuePositionKind =
152 typeof SCALE_VALUE_POSITION_KIND_INSIDE
153 | typeof SCALE_VALUE_POSITION_KIND_EDGE

Callers 1

canOnZeroToAxisFunction · 0.90

Calls 3

isValidBoundsForExtentFunction · 0.90
getExtentUnsafeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…