(state: ChartState<Options>)
| 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, |
no test coverage detected