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

Function buildCartesianSingleLabelElOption

src/component/axisPointer/viewHelper.ts:210–227  ·  view source on GitHub ↗
(
    value: ScaleDataValue,
    elOption: AxisPointerElementOptions,
    layoutInfo: AxisTransformedPositionLayoutInfo,
    axisModel: CartesianAxisModel | SingleAxisModel,
    axisPointerModel: AxisPointerModel,
    api: ExtensionAPI
)

Source from the content-addressed store, hash-verified

208}
209
210export function buildCartesianSingleLabelElOption(
211 value: ScaleDataValue,
212 elOption: AxisPointerElementOptions,
213 layoutInfo: AxisTransformedPositionLayoutInfo,
214 axisModel: CartesianAxisModel | SingleAxisModel,
215 axisPointerModel: AxisPointerModel,
216 api: ExtensionAPI
217) {
218 const textLayout = AxisBuilder.innerTextLayout(
219 layoutInfo.rotation, 0, layoutInfo.labelDirection
220 );
221 layoutInfo.labelMargin = axisPointerModel.get(['label', 'margin']);
222 buildLabelElOption(elOption, axisModel, axisPointerModel, api, {
223 position: getTransformedPosition(axisModel.axis, value, layoutInfo),
224 align: textLayout.textAlign,
225 verticalAlign: textLayout.textVerticalAlign
226 });
227}
228
229export function makeLineShape(p1: number[], p2: number[], xDimIndex?: number) {
230 xDimIndex = xDimIndex || 0;

Callers

nothing calls this directly

Calls 4

buildLabelElOptionFunction · 0.85
getTransformedPositionFunction · 0.85
innerTextLayoutMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…