diff options
| author | James Barnett <noreply@jamesbarnett.xyz> | 2025-08-01 22:03:50 +0100 |
|---|---|---|
| committer | James Barnett <noreply@jamesbarnett.xyz> | 2025-08-01 22:03:50 +0100 |
| commit | 64114d594042bd63f0dd3878d6fef31bdca7d245 (patch) | |
| tree | 3949644a11d4345dd4bf551386a3174d544b5004 /src/ui/benchmarkCharts.ts | |
| parent | 4ed6cae45c96166f22b1d295bda12dd9913385a8 (diff) | |
| download | js-raytracer-64114d594042bd63f0dd3878d6fef31bdca7d245.tar.xz js-raytracer-64114d594042bd63f0dd3878d6fef31bdca7d245.zip | |
Tree-shake chart imports. Minify bundle and generate sourcemaps.
Diffstat (limited to 'src/ui/benchmarkCharts.ts')
| -rw-r--r-- | src/ui/benchmarkCharts.ts | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/ui/benchmarkCharts.ts b/src/ui/benchmarkCharts.ts index d272567..ad8cf4b 100644 --- a/src/ui/benchmarkCharts.ts +++ b/src/ui/benchmarkCharts.ts @@ -1,6 +1,17 @@ -import * as echarts from 'echarts'; -import {EChartsOption, EChartsType} from "echarts"; +import * as echarts from 'echarts/core'; +import {EChartsOption} from "echarts"; +import { CanvasRenderer } from 'echarts/renderers'; +import { BarChart } from 'echarts/charts'; +import { GridComponent, LegendComponent, DatasetComponent} from 'echarts/components'; +echarts.use([ + BarChart, + CanvasRenderer, + GridComponent, + LegendComponent, + DatasetComponent +]); +type EChartsType = ReturnType<typeof echarts.init>; let scoreChart: EChartsType; const userDeviceLabel = 'Your device'; |