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

Function getLabelPositionForVertical

src/chart/bar/BarView.ts:1283–1290  ·  view source on GitHub ↗
(layout: RectLayout, coordSys: CoordSysOfBar)

Source from the content-addressed store, hash-verified

1281}
1282
1283function getLabelPositionForVertical(layout: RectLayout, coordSys: CoordSysOfBar): 'left' | 'right' {
1284 if (layout.width === 0) {
1285 // For zero width, determine position based on axis inverse status
1286 const valueAxis = (coordSys as Cartesian2D).getOtherAxis((coordSys as Cartesian2D).getBaseAxis());
1287 return valueAxis.inverse ? 'left' : 'right';
1288 }
1289 return layout.width >= 0 ? 'right' : 'left';
1290}
1291
1292export default BarView;

Callers 1

updateStyleFunction · 0.85

Calls 2

getBaseAxisMethod · 0.65
getOtherAxisMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…