MCPcopy
hub / github.com/nhn/tui.chart / renderPlotsForCenterYAxis

Method renderPlotsForCenterYAxis

apps/chart/src/component/plot.ts:118–143  ·  view source on GitHub ↗
(axes: Axes)

Source from the content-addressed store, hash-verified

116 }
117
118 renderPlotsForCenterYAxis(axes: Axes): LineModel[] {
119 const { xAxisHalfSize, secondStartX, yAxisHeight } = axes.centerYAxis!;
120
121 // vertical
122 const xAxisTickCount = axes.xAxis.tickCount!;
123 const verticalLines = [
124 ...this.renderPlotLineModels(makeTickPixelPositions(xAxisHalfSize, xAxisTickCount), true),
125 ...this.renderPlotLineModels(
126 makeTickPixelPositions(xAxisHalfSize, xAxisTickCount, secondStartX),
127 true
128 ),
129 ];
130
131 // horizontal
132 const yAxisTickCount = axes.yAxis.tickCount!;
133 const yAxisTickPixelPositions = makeTickPixelPositions(yAxisHeight, yAxisTickCount);
134 const horizontalLines = [
135 ...this.renderPlotLineModels(yAxisTickPixelPositions, false, { size: xAxisHalfSize }),
136 ...this.renderPlotLineModels(yAxisTickPixelPositions, false, {
137 size: xAxisHalfSize,
138 startPosition: secondStartX,
139 }),
140 ];
141
142 return [...verticalLines, ...horizontalLines];
143 }
144
145 renderPlots(axes: Axes, scale?: Scale): LineModel[] {
146 const vertical = true;

Callers 1

renderPlotsMethod · 0.95

Calls 2

renderPlotLineModelsMethod · 0.95
makeTickPixelPositionsFunction · 0.90

Tested by

no test coverage detected