chartgpu 0.1.0 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +141 -9
  3. package/dist/ChartGPU.d.ts +5 -3
  4. package/dist/ChartGPU.d.ts.map +1 -1
  5. package/dist/assets/ChartGPU-zgkjfPqp.js +15 -0
  6. package/dist/assets/GPUContext-CgqhC6W6.js +1 -0
  7. package/dist/assets/basic-line-DfRo2Pom.js +1 -0
  8. package/dist/assets/chart-sync-Bjf8c5Oo.js +1 -0
  9. package/dist/assets/createChartSync-BUGadH_x.js +1 -0
  10. package/dist/assets/createDataZoomSlider-DLbAKjVh.js +162 -0
  11. package/dist/assets/data-update-animation-BYhFrQqE.js +1 -0
  12. package/dist/assets/grid-test-6lXNOD1c.js +1 -0
  13. package/dist/assets/grouped-bar-pr-ZGxGI.js +1 -0
  14. package/dist/assets/hello-world-B3dB8WNo.js +9 -0
  15. package/dist/assets/interactive-aPGxN-b-.js +14 -0
  16. package/dist/assets/live-streaming-N4vKWEcJ.js +1 -0
  17. package/dist/assets/million-points-DVnJu39j.js +1 -0
  18. package/dist/assets/pie-BR5SmRvW.js +1 -0
  19. package/dist/assets/pie-c06rKDKR.js +321 -0
  20. package/dist/assets/sampling-F-iafT6-.js +1 -0
  21. package/dist/assets/scales-D-5MHN10.js +37 -0
  22. package/dist/assets/scatter-CVFSpSfu.js +1 -0
  23. package/dist/components/formatTooltip.d.ts +7 -0
  24. package/dist/components/formatTooltip.d.ts.map +1 -1
  25. package/dist/config/OptionResolver.d.ts +21 -2
  26. package/dist/config/OptionResolver.d.ts.map +1 -1
  27. package/dist/config/defaults.d.ts +16 -0
  28. package/dist/config/defaults.d.ts.map +1 -1
  29. package/dist/config/types.d.ts +49 -4
  30. package/dist/config/types.d.ts.map +1 -1
  31. package/dist/core/createRenderCoordinator.d.ts +2 -2
  32. package/dist/core/createRenderCoordinator.d.ts.map +1 -1
  33. package/dist/data/ohlcSample.d.ts +21 -0
  34. package/dist/data/ohlcSample.d.ts.map +1 -0
  35. package/dist/examples/basic-line/index.html +90 -0
  36. package/dist/examples/chart-sync/index.html +102 -0
  37. package/dist/examples/data-update-animation/index.html +193 -0
  38. package/dist/examples/grid-test/index.html +90 -0
  39. package/dist/examples/grouped-bar/index.html +91 -0
  40. package/dist/examples/hello-world/index.html +32 -0
  41. package/dist/examples/index.html +142 -0
  42. package/dist/examples/interactive/index.html +101 -0
  43. package/dist/examples/live-streaming/index.html +150 -0
  44. package/dist/examples/million-points/index.html +220 -0
  45. package/dist/examples/pie/index.html +132 -0
  46. package/dist/examples/sampling/index.html +249 -0
  47. package/dist/examples/scatter/index.html +91 -0
  48. package/dist/index.d.ts +3 -3
  49. package/dist/index.d.ts.map +1 -1
  50. package/dist/index.js +4035 -2996
  51. package/dist/index.js.map +1 -1
  52. package/dist/interaction/createInsideZoom.d.ts.map +1 -1
  53. package/dist/interaction/findCandlestick.d.ts +41 -0
  54. package/dist/interaction/findCandlestick.d.ts.map +1 -0
  55. package/dist/renderers/createAxisRenderer.d.ts +1 -1
  56. package/dist/renderers/createAxisRenderer.d.ts.map +1 -1
  57. package/dist/renderers/createCandlestickRenderer.d.ts +19 -0
  58. package/dist/renderers/createCandlestickRenderer.d.ts.map +1 -0
  59. package/package.json +3 -1
@@ -0,0 +1,142 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>ChartGPU Examples</title>
7
+ <style>
8
+ body {
9
+ margin: 0;
10
+ padding: 0;
11
+ display: flex;
12
+ flex-direction: column;
13
+ justify-content: center;
14
+ align-items: center;
15
+ min-height: 100vh;
16
+ background-color: #0a0a0a;
17
+ color: #e0e0e0;
18
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
19
+ }
20
+ .container {
21
+ max-width: 800px;
22
+ padding: 2rem;
23
+ }
24
+ h1 {
25
+ margin-top: 0;
26
+ color: #fff;
27
+ font-size: 2.5rem;
28
+ }
29
+ .examples-list {
30
+ list-style: none;
31
+ padding: 0;
32
+ margin: 2rem 0;
33
+ }
34
+ .example-item {
35
+ margin: 1rem 0;
36
+ }
37
+ .example-link {
38
+ display: inline-block;
39
+ padding: 1rem 1.5rem;
40
+ background-color: #1a1a2e;
41
+ color: #e0e0e0;
42
+ text-decoration: none;
43
+ border-radius: 8px;
44
+ border: 1px solid #333;
45
+ transition: all 0.2s;
46
+ }
47
+ .example-link:hover {
48
+ background-color: #2a2a3e;
49
+ border-color: #555;
50
+ transform: translateY(-2px);
51
+ }
52
+ .example-title {
53
+ font-size: 1.2rem;
54
+ font-weight: 600;
55
+ margin-bottom: 0.25rem;
56
+ }
57
+ .example-description {
58
+ font-size: 0.9rem;
59
+ color: #aaa;
60
+ }
61
+ </style>
62
+ </head>
63
+ <body>
64
+ <div class="container">
65
+ <h1>ChartGPU Examples</h1>
66
+ <ul class="examples-list">
67
+ <li class="example-item">
68
+ <a href="./hello-world/index.html" class="example-link">
69
+ <div class="example-title">Hello World</div>
70
+ <div class="example-description">Animated clear color cycling through the color spectrum - demonstrates continuous rendering</div>
71
+ </a>
72
+ </li>
73
+ <li class="example-item">
74
+ <a href="./basic-line/index.html" class="example-link">
75
+ <div class="example-title">Basic Line</div>
76
+ <div class="example-description">Sine wave line series (100 points) with grid + axes - demonstrates ChartGPU.create + setOption + resize</div>
77
+ </a>
78
+ </li>
79
+ <li class="example-item">
80
+ <a href="./scatter/index.html" class="example-link">
81
+ <div class="example-title">Scatter</div>
82
+ <div class="example-description">Scatter plot with ~10k points - fixed symbolSize, per-point [x,y,size], and symbolSize function</div>
83
+ </a>
84
+ </li>
85
+ <li class="example-item">
86
+ <a href="./sampling/index.html" class="example-link">
87
+ <div class="example-title">Zoom-aware Sampling</div>
88
+ <div class="example-description">Zoom in for more detail, zoom out for performance (debounced re-sampling of visible range)</div>
89
+ </a>
90
+ </li>
91
+ <li class="example-item">
92
+ <a href="./million-points/index.html" class="example-link">
93
+ <div class="example-title">Million Point Benchmark</div>
94
+ <div class="example-description">1M points benchmark with sampling toggle and FPS comparison (raw vs sampled)</div>
95
+ </a>
96
+ </li>
97
+ <li class="example-item">
98
+ <a href="./live-streaming/index.html" class="example-link">
99
+ <div class="example-title">Live Streaming</div>
100
+ <div class="example-description">Streaming appendData demo with autoScroll toggle + dataZoom slider</div>
101
+ </a>
102
+ </li>
103
+ <li class="example-item">
104
+ <a href="./grouped-bar/index.html" class="example-link">
105
+ <div class="example-title">Grouped Bar</div>
106
+ <div class="example-description">Clustered + stacked bars (stack + barWidth/barGap/barCategoryGap + negative values)</div>
107
+ </a>
108
+ </li>
109
+ <li class="example-item">
110
+ <a href="./pie/index.html" class="example-link">
111
+ <div class="example-title">Pie / Donut</div>
112
+ <div class="example-description">Two charts: a pie (inner radius 0) and a donut (inner radius &gt; 0) with per-slice colors</div>
113
+ </a>
114
+ </li>
115
+ <li class="example-item">
116
+ <a href="./data-update-animation/index.html" class="example-link">
117
+ <div class="example-title">Data Update Animation</div>
118
+ <div class="example-description">Story 5.17 visual check: subsequent setOption() updates animate (cartesian y + scale/domain, pie slice angles)</div>
119
+ </a>
120
+ </li>
121
+ <li class="example-item">
122
+ <a href="./grid-test/index.html" class="example-link">
123
+ <div class="example-title">Grid Renderer Test</div>
124
+ <div class="example-description">Interactive grid renderer with configurable line counts - demonstrates grid rendering and clip-space coordinates</div>
125
+ </a>
126
+ </li>
127
+ <li class="example-item">
128
+ <a href="./chart-sync/index.html" class="example-link">
129
+ <div class="example-title">Chart Sync</div>
130
+ <div class="example-description">Two charts with synced crosshair x-position and axis tooltip x-value (via connectCharts)</div>
131
+ </a>
132
+ </li>
133
+ <li class="example-item">
134
+ <a href="./interactive/index.html" class="example-link">
135
+ <div class="example-title">Interactive</div>
136
+ <div class="example-description">Two stacked charts with synced crosshair and axis tooltip, plus click logging for interactions</div>
137
+ </a>
138
+ </li>
139
+ </ul>
140
+ </div>
141
+ </body>
142
+ </html>
@@ -0,0 +1,101 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>Interactive - ChartGPU</title>
7
+ <style>
8
+ :root { color-scheme: dark; }
9
+ html, body { height: 100%; }
10
+ body {
11
+ margin: 0;
12
+ padding: 0;
13
+ background-color: #0a0a0a;
14
+ color: #e0e0e0;
15
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
16
+ }
17
+ .page {
18
+ min-height: 100%;
19
+ display: grid;
20
+ grid-template-rows: auto 1fr;
21
+ gap: 16px;
22
+ padding: 20px;
23
+ box-sizing: border-box;
24
+ max-width: 1200px;
25
+ margin: 0 auto;
26
+ }
27
+ header h1 {
28
+ margin: 0;
29
+ font-size: 1.4rem;
30
+ color: #fff;
31
+ }
32
+ header p {
33
+ margin: 8px 0 0;
34
+ color: #aaa;
35
+ line-height: 1.4;
36
+ }
37
+ .back {
38
+ display: inline-block;
39
+ margin-top: 10px;
40
+ color: #aaa;
41
+ text-decoration: none;
42
+ }
43
+ .back:hover { color: #fff; }
44
+
45
+ .stack {
46
+ display: grid;
47
+ grid-template-columns: 1fr;
48
+ gap: 14px;
49
+ align-items: stretch;
50
+ }
51
+ .chart-shell {
52
+ border: 1px solid #333;
53
+ border-radius: 12px;
54
+ background: #0f0f14;
55
+ overflow: hidden;
56
+ height: clamp(260px, 34vh, 520px);
57
+ }
58
+ .chart {
59
+ width: 100%;
60
+ height: 100%;
61
+ }
62
+ .error {
63
+ padding: 16px;
64
+ color: #ffb4b4;
65
+ white-space: pre-wrap;
66
+ }
67
+ </style>
68
+ <script type="module" crossorigin src="/chartgpu/assets/interactive-aPGxN-b-.js"></script>
69
+ <link rel="modulepreload" crossorigin href="/chartgpu/assets/GPUContext-CgqhC6W6.js">
70
+ <link rel="modulepreload" crossorigin href="/chartgpu/assets/scales-D-5MHN10.js">
71
+ <link rel="modulepreload" crossorigin href="/chartgpu/assets/pie-c06rKDKR.js">
72
+ <link rel="modulepreload" crossorigin href="/chartgpu/assets/createDataZoomSlider-DLbAKjVh.js">
73
+ <link rel="modulepreload" crossorigin href="/chartgpu/assets/ChartGPU-zgkjfPqp.js">
74
+ <link rel="modulepreload" crossorigin href="/chartgpu/assets/createChartSync-BUGadH_x.js">
75
+ </head>
76
+ <body>
77
+ <div class="page">
78
+ <header>
79
+ <h1>Interactive</h1>
80
+ <p>
81
+ Two vertically stacked charts with synced crosshair/tooltip behavior, plus x-axis dataZoom (inside + slider).
82
+ Use the slider handles (bottom), mouse-wheel to zoom (while over the plot), and shift+drag (or middle-mouse drag) to pan.
83
+ The inside zoom and slider should stay in sync.
84
+ </p>
85
+ <a class="back" href="../index.html">← Back to examples</a>
86
+ </header>
87
+
88
+ <div class="stack">
89
+ <div class="chart-shell">
90
+ <div id="chart-top" class="chart"></div>
91
+ </div>
92
+ <div class="chart-shell">
93
+ <div id="chart-bottom" class="chart"></div>
94
+ </div>
95
+ </div>
96
+
97
+ <div id="error" class="error" style="display:none;"></div>
98
+ </div>
99
+
100
+ </body>
101
+ </html>
@@ -0,0 +1,150 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>Live Streaming - ChartGPU</title>
7
+ <style>
8
+ :root {
9
+ color-scheme: dark;
10
+ }
11
+ html, body {
12
+ height: 100%;
13
+ }
14
+ body {
15
+ margin: 0;
16
+ padding: 0;
17
+ background-color: #0a0a0a;
18
+ color: #e0e0e0;
19
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
20
+ }
21
+ .page {
22
+ min-height: 100%;
23
+ display: grid;
24
+ grid-template-rows: auto auto 1fr;
25
+ gap: 12px;
26
+ padding: 20px;
27
+ box-sizing: border-box;
28
+ max-width: 1200px;
29
+ margin: 0 auto;
30
+ }
31
+ header h1 {
32
+ margin: 0;
33
+ font-size: 1.4rem;
34
+ color: #fff;
35
+ }
36
+ header p {
37
+ margin: 8px 0 0;
38
+ color: #aaa;
39
+ line-height: 1.4;
40
+ }
41
+ .back {
42
+ display: inline-block;
43
+ margin-top: 10px;
44
+ color: #aaa;
45
+ text-decoration: none;
46
+ }
47
+ .back:hover {
48
+ color: #fff;
49
+ }
50
+ .controls {
51
+ display: flex;
52
+ align-items: center;
53
+ gap: 12px;
54
+ flex-wrap: wrap;
55
+ padding: 12px;
56
+ border: 1px solid #333;
57
+ border-radius: 12px;
58
+ background: #0f0f14;
59
+ }
60
+ .controls label {
61
+ display: inline-flex;
62
+ align-items: center;
63
+ gap: 8px;
64
+ color: #ddd;
65
+ font-size: 0.95rem;
66
+ }
67
+ .controls input[type="checkbox"] {
68
+ transform: translateY(0.5px);
69
+ }
70
+ .controls button {
71
+ appearance: none;
72
+ border: 1px solid #333;
73
+ background: #1a1a2e;
74
+ color: #e0e0e0;
75
+ border-radius: 10px;
76
+ padding: 8px 12px;
77
+ cursor: pointer;
78
+ }
79
+ .controls button:hover {
80
+ background: #2a2a3e;
81
+ border-color: #555;
82
+ }
83
+ .stat {
84
+ font-size: 0.9rem;
85
+ color: #aaa;
86
+ white-space: nowrap;
87
+ }
88
+ .hint {
89
+ width: 100%;
90
+ color: #9aa3b2;
91
+ font-size: 0.9rem;
92
+ line-height: 1.35;
93
+ }
94
+ .hint strong { color: #e0e0e0; }
95
+ .chart-shell {
96
+ border: 1px solid #333;
97
+ border-radius: 12px;
98
+ background: #0f0f14;
99
+ overflow: hidden;
100
+ min-height: 420px;
101
+ height: min(72vh, 760px);
102
+ }
103
+ .chart {
104
+ width: 100%;
105
+ height: 100%;
106
+ }
107
+ .error {
108
+ padding: 16px;
109
+ color: #ffb4b4;
110
+ white-space: pre-wrap;
111
+ }
112
+ </style>
113
+ <script type="module" crossorigin src="/chartgpu/assets/live-streaming-N4vKWEcJ.js"></script>
114
+ <link rel="modulepreload" crossorigin href="/chartgpu/assets/GPUContext-CgqhC6W6.js">
115
+ <link rel="modulepreload" crossorigin href="/chartgpu/assets/scales-D-5MHN10.js">
116
+ <link rel="modulepreload" crossorigin href="/chartgpu/assets/pie-c06rKDKR.js">
117
+ <link rel="modulepreload" crossorigin href="/chartgpu/assets/createDataZoomSlider-DLbAKjVh.js">
118
+ <link rel="modulepreload" crossorigin href="/chartgpu/assets/ChartGPU-zgkjfPqp.js">
119
+ </head>
120
+ <body>
121
+ <div class="page">
122
+ <header>
123
+ <h1>Live Streaming</h1>
124
+ <p>Single line series with repeated <code>chart.appendData(...)</code>. Toggle auto-scroll and use the slider to see “pinned to end” vs “panned away”.</p>
125
+ <a class="back" href="../index.html">← Back to examples</a>
126
+ </header>
127
+
128
+ <div class="controls">
129
+ <label>
130
+ <input id="autoScroll" type="checkbox" checked />
131
+ autoScroll
132
+ </label>
133
+ <button id="reset">Reset</button>
134
+ <div class="stat">Points: <span id="pointCount">0</span></div>
135
+ <div class="stat">Zoom: <span id="zoomRange">—</span></div>
136
+ <div class="hint">
137
+ <strong>Tip:</strong> drag the slider handles so the right edge is &lt; 100%. With autoScroll on, new data should <em>not</em> yank the view back to the end.
138
+ Drag the right edge back to ~100% to re-pin and watch it follow the stream.
139
+ </div>
140
+ </div>
141
+
142
+ <div class="chart-shell">
143
+ <div id="chart" class="chart"></div>
144
+ <div id="error" class="error" style="display:none;"></div>
145
+ </div>
146
+ </div>
147
+
148
+ </body>
149
+ </html>
150
+
@@ -0,0 +1,220 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>Million Points - ChartGPU</title>
7
+ <style>
8
+ :root {
9
+ color-scheme: dark;
10
+ }
11
+ html, body {
12
+ height: 100%;
13
+ }
14
+ body {
15
+ margin: 0;
16
+ padding: 0;
17
+ background-color: #0a0a0a;
18
+ color: #e0e0e0;
19
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
20
+ }
21
+ .page {
22
+ min-height: 100%;
23
+ display: grid;
24
+ grid-template-rows: auto auto 1fr;
25
+ gap: 16px;
26
+ padding: 20px;
27
+ box-sizing: border-box;
28
+ max-width: 1200px;
29
+ margin: 0 auto;
30
+ }
31
+ header h1 {
32
+ margin: 0;
33
+ font-size: 1.4rem;
34
+ color: #fff;
35
+ }
36
+ header p {
37
+ margin: 8px 0 0;
38
+ color: #aaa;
39
+ line-height: 1.4;
40
+ max-width: 72ch;
41
+ }
42
+ .back {
43
+ display: inline-block;
44
+ margin-top: 10px;
45
+ color: #aaa;
46
+ text-decoration: none;
47
+ }
48
+ .back:hover {
49
+ color: #fff;
50
+ }
51
+
52
+ .controls {
53
+ display: grid;
54
+ grid-template-columns: 1fr;
55
+ gap: 12px;
56
+ border: 1px solid #333;
57
+ border-radius: 12px;
58
+ background: #0f0f14;
59
+ padding: 14px;
60
+ }
61
+ .controls-row {
62
+ display: flex;
63
+ flex-wrap: wrap;
64
+ gap: 10px 14px;
65
+ align-items: center;
66
+ }
67
+ label {
68
+ display: inline-flex;
69
+ align-items: center;
70
+ gap: 8px;
71
+ color: #ddd;
72
+ font-size: 0.95rem;
73
+ }
74
+ input[type="checkbox"] {
75
+ transform: translateY(0.5px);
76
+ }
77
+ button {
78
+ font: inherit;
79
+ color: #e0e0e0;
80
+ background: linear-gradient(180deg, #1b1b2a 0%, #141420 100%);
81
+ border: 1px solid #2b2b3a;
82
+ border-radius: 10px;
83
+ padding: 8px 12px;
84
+ cursor: pointer;
85
+ outline: none;
86
+ }
87
+ button:hover {
88
+ border-color: #3a3a50;
89
+ background: linear-gradient(180deg, #23233a 0%, #151525 100%);
90
+ }
91
+ button:focus {
92
+ border-color: #4a9eff;
93
+ box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.15);
94
+ }
95
+
96
+ /* Numeric readability: prevents width "jitter" as values update */
97
+ .tabular-nums {
98
+ font-variant-numeric: tabular-nums;
99
+ font-feature-settings: "tnum" 1;
100
+ }
101
+
102
+ .readouts {
103
+ display: grid;
104
+ grid-template-columns: repeat(2, minmax(0, 1fr));
105
+ gap: 12px;
106
+ }
107
+ .readout-card {
108
+ border: 1px solid #2b2b3a;
109
+ border-radius: 12px;
110
+ padding: 12px;
111
+ background: rgba(255, 255, 255, 0.02);
112
+ min-width: 0;
113
+ }
114
+ .readout-title {
115
+ font-weight: 600;
116
+ color: #fff;
117
+ margin: 0 0 8px;
118
+ font-size: 0.95rem;
119
+ }
120
+ .kv {
121
+ display: grid;
122
+ grid-template-columns: 170px 1fr;
123
+ gap: 6px 10px;
124
+ font-size: 0.92rem;
125
+ color: #cfcfe6;
126
+ }
127
+ .kv .k {
128
+ color: #a8a8c8;
129
+ }
130
+
131
+ .charts {
132
+ display: grid;
133
+ grid-template-columns: 1fr;
134
+ gap: 14px;
135
+ }
136
+ .chart-shell {
137
+ border: 1px solid #333;
138
+ border-radius: 12px;
139
+ background: #0f0f14;
140
+ overflow: hidden;
141
+ min-height: 420px;
142
+ height: min(72vh, 760px);
143
+ position: relative;
144
+ }
145
+ .chart {
146
+ width: 100%;
147
+ height: 100%;
148
+ }
149
+ .error {
150
+ padding: 16px;
151
+ color: #ffb4b4;
152
+ white-space: pre-wrap;
153
+ position: absolute;
154
+ inset: 0;
155
+ background: rgba(10, 10, 10, 0.85);
156
+ }
157
+ @media (max-width: 900px) {
158
+ .readouts {
159
+ grid-template-columns: 1fr;
160
+ }
161
+ .kv {
162
+ grid-template-columns: 150px 1fr;
163
+ }
164
+ }
165
+ </style>
166
+ <script type="module" crossorigin src="/chartgpu/assets/million-points-DVnJu39j.js"></script>
167
+ <link rel="modulepreload" crossorigin href="/chartgpu/assets/GPUContext-CgqhC6W6.js">
168
+ <link rel="modulepreload" crossorigin href="/chartgpu/assets/scales-D-5MHN10.js">
169
+ <link rel="modulepreload" crossorigin href="/chartgpu/assets/pie-c06rKDKR.js">
170
+ <link rel="modulepreload" crossorigin href="/chartgpu/assets/createDataZoomSlider-DLbAKjVh.js">
171
+ </head>
172
+ <body>
173
+ <div class="page">
174
+ <header>
175
+ <h1>Million Points</h1>
176
+ <p>
177
+ Stress test with <strong>1,000,000 points</strong>. Toggle sampling to compare performance and verify that interactive zoom stays responsive.
178
+ </p>
179
+ <a class="back" href="../index.html">← Back to examples</a>
180
+ </header>
181
+
182
+ <section class="controls">
183
+ <div class="controls-row">
184
+ <label>
185
+ <input id="samplingEnabled" type="checkbox" checked />
186
+ sampling
187
+ </label>
188
+ <button id="resetZoom">Reset zoom</button>
189
+ </div>
190
+
191
+ <div class="readouts">
192
+ <div class="readout-card">
193
+ <div class="readout-title">Performance</div>
194
+ <div class="kv tabular-nums">
195
+ <div class="k">FPS</div><div><span id="fps">—</span></div>
196
+ <div class="k">CPU submit (ms)</div><div><span id="renderTimeMs">—</span></div>
197
+ <div class="k">GPU time (ms)</div><div><span id="gpuTimeMs">—</span></div>
198
+ </div>
199
+ </div>
200
+
201
+ <div class="readout-card">
202
+ <div class="readout-title">Points</div>
203
+ <div class="kv tabular-nums">
204
+ <div class="k">Total points</div><div><span id="pointCount">1,000,000</span></div>
205
+ <div class="k">Rendered points</div><div><span id="renderedPointCount">—</span></div>
206
+ </div>
207
+ </div>
208
+ </div>
209
+ </section>
210
+
211
+ <section class="charts">
212
+ <div class="chart-shell">
213
+ <div id="chart" class="chart"></div>
214
+ <div id="error" class="error" style="display:none;"></div>
215
+ </div>
216
+ </section>
217
+ </div>
218
+
219
+ </body>
220
+ </html>