@keneth80/k-chart 1.26.1 → 1.27.0

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 (38) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/README.md +129 -1100
  3. package/docs/code-graph-handoff.md +19 -37
  4. package/docs/configuration-reference.md +8 -1
  5. package/docs/functional-api.md +77 -0
  6. package/docs/react-nextjs.md +62 -8
  7. package/docs/refactor-plan.md +39 -23
  8. package/docs/release.md +9 -4
  9. package/examples/stackblitz-simple-api-basic/package-lock.json +96 -4
  10. package/examples/stackblitz-simple-api-basic/package.json +1 -1
  11. package/examples/stackblitz-subcell-heatmap-basic/README.md +48 -0
  12. package/examples/stackblitz-subcell-heatmap-basic/index.html +13 -0
  13. package/examples/stackblitz-subcell-heatmap-basic/package-lock.json +1788 -0
  14. package/examples/stackblitz-subcell-heatmap-basic/package.json +23 -0
  15. package/examples/stackblitz-subcell-heatmap-basic/src/app.ts +212 -0
  16. package/examples/stackblitz-subcell-heatmap-basic/src/component.css +169 -0
  17. package/examples/stackblitz-subcell-heatmap-basic/src/heatmap-demo-core.ts +505 -0
  18. package/examples/stackblitz-subcell-heatmap-basic/src/heatmap-demo.ts +23 -0
  19. package/examples/stackblitz-subcell-heatmap-basic/src/main.ts +15 -0
  20. package/examples/stackblitz-subcell-heatmap-basic/src/maplibre-compat.ts +6 -0
  21. package/examples/stackblitz-subcell-heatmap-basic/src/model.ts +242 -0
  22. package/examples/stackblitz-subcell-heatmap-basic/src/raster.ts +121 -0
  23. package/examples/stackblitz-subcell-heatmap-basic/src/style.css +15 -0
  24. package/examples/stackblitz-subcell-heatmap-basic/src/synthetic.ts +72 -0
  25. package/examples/stackblitz-subcell-heatmap-basic/src/vendor.d.ts +3 -0
  26. package/examples/stackblitz-subcell-heatmap-basic/src/vite-env.d.ts +1 -0
  27. package/examples/stackblitz-topology-basic/package-lock.json +96 -4
  28. package/examples/stackblitz-topology-basic/package.json +1 -1
  29. package/examples/stackblitz-webgl-line-basic/package-lock.json +96 -4
  30. package/examples/stackblitz-webgl-line-basic/package.json +1 -1
  31. package/examples/stackblitz-world-activity-map/package.json +1 -1
  32. package/lib/core/contracts.d.ts +6 -2
  33. package/lib/core/contracts.d.ts.map +1 -1
  34. package/lib/series/svg-graph.d.ts +29 -0
  35. package/lib/series/svg-graph.d.ts.map +1 -1
  36. package/lib/series/svg-graph.js +509 -80
  37. package/lib/series/svg-graph.js.map +1 -1
  38. package/package.json +1 -1
@@ -0,0 +1,48 @@
1
+ # KChart Subcell Heat Field
2
+
3
+ This standalone example uses the real `@keneth80/k-chart-maplibre` adapter and
4
+ adds a bounded MapLibre `CanvasSource` to the returned map. It is a separate
5
+ example and does not replace any existing single-color grid or choropleth map.
6
+
7
+ Each 0.5-degree cell contains 51 x 51 scalar node samples. The renderer samples
8
+ the values in geographic space with bilinear interpolation and applies one fixed
9
+ 0-100 color scale across cells, frames, and zoom levels. It does not interpret
10
+ MapLibre point-density values as probabilities or percentages.
11
+
12
+ ## Run
13
+
14
+ ```bash
15
+ npm install
16
+ npm test
17
+ npm run typecheck
18
+ npm run build
19
+ npm run dev
20
+ ```
21
+
22
+ The map style and tiles come from OpenFreeMap, so runtime verification requires
23
+ network access and a working WebGL context.
24
+
25
+ ## Behavior
26
+
27
+ - `showGrid` controls only the 0.5-degree grid-line layer.
28
+ - `showCellOutline` independently controls the selected-cell border and defaults
29
+ to off, so the field remains the primary visual signal.
30
+ - `showLowValueBackground: false` removes the large low-value rectangle by
31
+ scaling pixel alpha from zero to the high-value maximum. Values remain
32
+ queryable even when their visual alpha is zero.
33
+ - The scalar raster, selected cell, probes, frame, and map position remain when
34
+ grid lines are hidden.
35
+ - Numeric zero is a valid low value; `null` remains transparent, reveals the
36
+ basemap as a rectangular no-data patch, and is never filled with zero.
37
+ - Coordinate clicks report the interpolated value at display time.
38
+ - The three frames are synthetic and are not disaster probabilities, damage
39
+ ratios, or observed public-safety data.
40
+ - World view shows a small region locator instead of allocating a global
41
+ high-resolution field.
42
+ - Antimeridian-crossing cells must be split before use, and input latitude is
43
+ restricted to the Web Mercator range used by the example.
44
+ - The source canvas is intentionally 511 x 511. MapLibre 5 has a known black
45
+ CanvasSource bug for square sizes shaped like `64 * 2^n` (including 512).
46
+
47
+ `createSubcellHeatmapDemo`, `mountSubcellHeatmapApp`, and their controller methods
48
+ are example-local APIs. They are not new KChart core or MapLibre adapter APIs.
@@ -0,0 +1,13 @@
1
+ <!doctype html>
2
+ <html lang="ko">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <meta name="description" content="KChart MapLibre subcell scalar-field example" />
7
+ <title>KChart Subcell Heat Field</title>
8
+ </head>
9
+ <body>
10
+ <div id="app"></div>
11
+ <script type="module" src="/src/main.ts"></script>
12
+ </body>
13
+ </html>