MCPcopy
hub / github.com/apache/echarts / parseTickLabelCustomValues

Function parseTickLabelCustomValues

src/coord/axisTickLabelBuilder.ts:163–180  ·  view source on GitHub ↗
(
    customValues: AxisTickLabelCustomValuesOption,
    scale: Scale,
)

Source from the content-addressed store, hash-verified

161}
162
163function parseTickLabelCustomValues(
164 customValues: AxisTickLabelCustomValuesOption,
165 scale: Scale,
166): ScaleTick[] {
167 const extent = scale.getExtent();
168 const tickNumbers: number[] = [];
169 zrUtil.each(customValues, function (val) {
170 val = scale.parse(val);
171 if (val >= extent[0] && val <= extent[1]) {
172 tickNumbers.push(val);
173 }
174 });
175 removeDuplicates(tickNumbers, removeDuplicatesGetKeyFromItemItself, null);
176 asc(tickNumbers);
177 return zrUtil.map(tickNumbers, function (tickVal) {
178 return {value: tickVal};
179 });
180}
181
182function makeCategoryLabels(axis: Axis, ctx: AxisLabelsComputingContext): ReturnType<typeof createAxisLabels> {
183 const labelModel = axis.getLabelModel();

Callers 2

createAxisLabelsFunction · 0.85
createAxisTicksFunction · 0.85

Calls 6

removeDuplicatesFunction · 0.90
ascFunction · 0.90
getExtentMethod · 0.65
eachMethod · 0.45
parseMethod · 0.45
mapMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…