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

Method renderLines

apps/chart/src/component/plot.ts:53–66  ·  view source on GitHub ↗
(axes: Axes, categories: string[], lines: PlotLine[] = [])

Source from the content-addressed store, hash-verified

51 }
52
53 renderLines(axes: Axes, categories: string[], lines: PlotLine[] = []): LineModel[] {
54 return lines.map(({ value, color }) => {
55 const { offsetSize } = this.getPlotAxisSize(true);
56 const position = validXPosition({
57 axisData: getPlotAxisData(true, axes) as LabelAxisData,
58 offsetSize,
59 value,
60 categories,
61 startIndex: this.startIndex,
62 });
63
64 return this.makeLineModel(true, position, { color });
65 });
66 }
67
68 renderBands(axes: Axes, categories: string[], bands: PlotBand[] = []): RectModel[] {
69 const { offsetSize, anchorSize } = this.getPlotAxisSize(true);

Callers 1

renderMethod · 0.95

Calls 4

getPlotAxisSizeMethod · 0.95
makeLineModelMethod · 0.95
validXPositionFunction · 0.85
getPlotAxisDataFunction · 0.85

Tested by

no test coverage detected