MCPcopy Create free account
hub / github.com/apache/echarts / dataToPoint

Method dataToPoint

src/coord/matrix/Matrix.ts:152–164  ·  view source on GitHub ↗

* @implement * - The input is allowed to be `[NaN/null/undefined, xxx]`/`[xxx, NaN/null/undefined]`; * the return is `[NaN, xxxresult]`/`[xxxresult, NaN]` or clamped boundary value if * `clamp` passed. This is for the usage that only get coord on single x or y. * - Alwasy retur

(
        data: MatrixCoordRangeOption[],
        opt?: Parameters<Matrix['dataToLayout']>[1],
        out?: number[]
    )

Source from the content-addressed store, hash-verified

150 * If it can not be located or invalid, return `[NaN, NaN]`.
151 */
152 dataToPoint(
153 data: MatrixCoordRangeOption[],
154 opt?: Parameters<Matrix['dataToLayout']>[1],
155 out?: number[]
156 ): number[] {
157 out = out || [];
158
159 this.dataToLayout(data, opt, _dtpOutDataToLayout);
160
161 out[0] = _dtpOutDataToLayout.rect.x + _dtpOutDataToLayout.rect.width / 2;
162 out[1] = _dtpOutDataToLayout.rect.y + _dtpOutDataToLayout.rect.height / 2;
163 return out;
164 }
165
166 /**
167 * @implement

Callers

nothing calls this directly

Calls 1

dataToLayoutMethod · 0.95

Tested by

no test coverage detected