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

Method render

apps/chart/src/component/plot.ts:192–212  ·  view source on GitHub ↗
(state: ChartState<Options>)

Source from the content-addressed store, hash-verified

190 }
191
192 render(state: ChartState<Options>) {
193 const { layout, axes, plot, zoomRange, theme, scale } = state;
194
195 if (!plot) {
196 return;
197 }
198
199 this.rect = layout.plot;
200 this.startIndex = zoomRange?.[0] ?? 0;
201 this.theme = theme.plot! as Required<PlotTheme>;
202
203 const categories = (state.categories as string[]) ?? [];
204 const { lines, bands, visible } = plot;
205
206 this.models.line = this.renderLines(axes, categories, lines);
207 this.models.band = this.renderBands(axes, categories, bands);
208
209 if (visible) {
210 this.models.plot = [this.renderPlotBackgroundRect(), ...this.renderPlots(axes, scale)];
211 }
212 }
213
214 makeLineModel(
215 vertical: boolean,

Callers 15

procMethod · 0.45
pieSeries.spec.tsFile · 0.45
radialAxis.spec.tsFile · 0.45
areaSeries.spec.tsFile · 0.45
plot.spec.tsFile · 0.45
axes.spec.tsFile · 0.45

Calls 4

renderLinesMethod · 0.95
renderBandsMethod · 0.95
renderPlotsMethod · 0.95

Tested by

no test coverage detected