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

Function prepareLayoutCallbackParams

src/label/LabelManager.ts:133–149  ·  view source on GitHub ↗
(labelItem: LabelDesc, hostEl?: Element)

Source from the content-addressed store, hash-verified

131}
132
133function prepareLayoutCallbackParams(labelItem: LabelDesc, hostEl?: Element): LabelLayoutOptionCallbackParams {
134 const label = labelItem.label;
135 const labelLine = hostEl && hostEl.getTextGuideLine();
136 return {
137 dataIndex: labelItem.dataIndex,
138 dataType: labelItem.dataType,
139 seriesIndex: labelItem.seriesModel.seriesIndex,
140 text: labelItem.label.style.text,
141 rect: labelItem.hostRect,
142 labelRect: labelItem.rect,
143 // x: labelAttr.x,
144 // y: labelAttr.y,
145 align: label.style.align,
146 verticalAlign: label.style.verticalAlign,
147 labelLinePoints: cloneArr(labelLine && labelLine.shape.points)
148 };
149}
150
151const LABEL_OPTION_TO_STYLE_KEYS = ['align', 'verticalAlign', 'width', 'height', 'fontSize'] as const;
152

Callers 1

updateLayoutConfigMethod · 0.85

Calls 1

cloneArrFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…