@keneth80/k-chart 1.26.1 → 1.28.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.
- package/CHANGELOG.md +79 -0
- package/README.md +131 -1100
- package/docs/code-graph-handoff.md +19 -37
- package/docs/configuration-reference.md +16 -1
- package/docs/functional-api.md +87 -0
- package/docs/react-nextjs.md +62 -8
- package/docs/refactor-plan.md +39 -23
- package/docs/release.md +9 -4
- package/examples/stackblitz-simple-api-basic/package-lock.json +96 -4
- package/examples/stackblitz-simple-api-basic/package.json +1 -1
- package/examples/stackblitz-subcell-heatmap-basic/README.md +48 -0
- package/examples/stackblitz-subcell-heatmap-basic/index.html +13 -0
- package/examples/stackblitz-subcell-heatmap-basic/package-lock.json +1788 -0
- package/examples/stackblitz-subcell-heatmap-basic/package.json +23 -0
- package/examples/stackblitz-subcell-heatmap-basic/src/app.ts +212 -0
- package/examples/stackblitz-subcell-heatmap-basic/src/component.css +169 -0
- package/examples/stackblitz-subcell-heatmap-basic/src/heatmap-demo-core.ts +505 -0
- package/examples/stackblitz-subcell-heatmap-basic/src/heatmap-demo.ts +23 -0
- package/examples/stackblitz-subcell-heatmap-basic/src/main.ts +15 -0
- package/examples/stackblitz-subcell-heatmap-basic/src/maplibre-compat.ts +6 -0
- package/examples/stackblitz-subcell-heatmap-basic/src/model.ts +242 -0
- package/examples/stackblitz-subcell-heatmap-basic/src/raster.ts +121 -0
- package/examples/stackblitz-subcell-heatmap-basic/src/style.css +15 -0
- package/examples/stackblitz-subcell-heatmap-basic/src/synthetic.ts +72 -0
- package/examples/stackblitz-subcell-heatmap-basic/src/vendor.d.ts +3 -0
- package/examples/stackblitz-subcell-heatmap-basic/src/vite-env.d.ts +1 -0
- package/examples/stackblitz-topology-basic/package-lock.json +96 -4
- package/examples/stackblitz-topology-basic/package.json +1 -1
- package/examples/stackblitz-webgl-line-basic/package-lock.json +96 -4
- package/examples/stackblitz-webgl-line-basic/package.json +1 -1
- package/examples/stackblitz-world-activity-map/package.json +1 -1
- package/lib/core/contracts.d.ts +14 -2
- package/lib/core/contracts.d.ts.map +1 -1
- package/lib/internal/map-move-end.d.ts +8 -0
- package/lib/internal/map-move-end.d.ts.map +1 -0
- package/lib/internal/map-move-end.js +33 -0
- package/lib/internal/map-move-end.js.map +1 -0
- package/lib/series/svg-globe.d.ts.map +1 -1
- package/lib/series/svg-globe.js +66 -8
- package/lib/series/svg-globe.js.map +1 -1
- package/lib/series/svg-graph.d.ts +29 -0
- package/lib/series/svg-graph.d.ts.map +1 -1
- package/lib/series/svg-graph.js +509 -80
- package/lib/series/svg-graph.js.map +1 -1
- package/lib/series/svg-region-map.d.ts.map +1 -1
- package/lib/series/svg-region-map.js +72 -1
- package/lib/series/svg-region-map.js.map +1 -1
- package/package.json +4 -3
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"name": "kchart-stackblitz-simple-api-basic",
|
|
9
9
|
"version": "0.0.0",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@keneth80/k-chart": "^1.
|
|
11
|
+
"@keneth80/k-chart": "^1.26.1"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
14
|
"typescript": "^6.0.3",
|
|
@@ -458,14 +458,18 @@
|
|
|
458
458
|
}
|
|
459
459
|
},
|
|
460
460
|
"node_modules/@keneth80/k-chart": {
|
|
461
|
-
"version": "1.
|
|
462
|
-
"resolved": "https://registry.npmjs.org/@keneth80/k-chart/-/k-chart-1.
|
|
463
|
-
"integrity": "sha512-
|
|
461
|
+
"version": "1.26.1",
|
|
462
|
+
"resolved": "https://registry.npmjs.org/@keneth80/k-chart/-/k-chart-1.26.1.tgz",
|
|
463
|
+
"integrity": "sha512-UbAabIe1bsN0oXCecT7HWbJaHc2Mgu7F+aO6iT0v+ukEwKB91xCX5sLcOEsCiLcmXGcWe6UDwym6zhpojowuMg==",
|
|
464
464
|
"license": "MIT",
|
|
465
465
|
"dependencies": {
|
|
466
466
|
"d3-array": "^3.2.4",
|
|
467
467
|
"d3-axis": "^3.0.0",
|
|
468
|
+
"d3-brush": "^3.0.0",
|
|
469
|
+
"d3-force": "^3.0.0",
|
|
468
470
|
"d3-geo": "^3.1.1",
|
|
471
|
+
"d3-hierarchy": "^3.1.2",
|
|
472
|
+
"d3-sankey": "^0.12.3",
|
|
469
473
|
"d3-scale": "^4.0.2",
|
|
470
474
|
"d3-scale-chromatic": "^3.1.0",
|
|
471
475
|
"d3-selection": "^3.0.0",
|
|
@@ -898,6 +902,22 @@
|
|
|
898
902
|
"node": ">=12"
|
|
899
903
|
}
|
|
900
904
|
},
|
|
905
|
+
"node_modules/d3-brush": {
|
|
906
|
+
"version": "3.0.0",
|
|
907
|
+
"resolved": "https://registry.npmjs.org/d3-brush/-/d3-brush-3.0.0.tgz",
|
|
908
|
+
"integrity": "sha512-ALnjWlVYkXsVIGlOsuWH1+3udkYFI48Ljihfnh8FZPF2QS9o+PzGLBslO0PjzVoHLZ2KCVgAM8NVkXPJB2aNnQ==",
|
|
909
|
+
"license": "ISC",
|
|
910
|
+
"dependencies": {
|
|
911
|
+
"d3-dispatch": "1 - 3",
|
|
912
|
+
"d3-drag": "2 - 3",
|
|
913
|
+
"d3-interpolate": "1 - 3",
|
|
914
|
+
"d3-selection": "3",
|
|
915
|
+
"d3-transition": "3"
|
|
916
|
+
},
|
|
917
|
+
"engines": {
|
|
918
|
+
"node": ">=12"
|
|
919
|
+
}
|
|
920
|
+
},
|
|
901
921
|
"node_modules/d3-color": {
|
|
902
922
|
"version": "3.1.0",
|
|
903
923
|
"resolved": "https://registry.npmjs.org/d3-color/-/d3-color-3.1.0.tgz",
|
|
@@ -938,6 +958,20 @@
|
|
|
938
958
|
"node": ">=12"
|
|
939
959
|
}
|
|
940
960
|
},
|
|
961
|
+
"node_modules/d3-force": {
|
|
962
|
+
"version": "3.0.0",
|
|
963
|
+
"resolved": "https://registry.npmjs.org/d3-force/-/d3-force-3.0.0.tgz",
|
|
964
|
+
"integrity": "sha512-zxV/SsA+U4yte8051P4ECydjD/S+qeYtnaIyAs9tgHCqfguma/aAQDjo85A9Z6EKhBirHRJHXIgJUlffT4wdLg==",
|
|
965
|
+
"license": "ISC",
|
|
966
|
+
"dependencies": {
|
|
967
|
+
"d3-dispatch": "1 - 3",
|
|
968
|
+
"d3-quadtree": "1 - 3",
|
|
969
|
+
"d3-timer": "1 - 3"
|
|
970
|
+
},
|
|
971
|
+
"engines": {
|
|
972
|
+
"node": ">=12"
|
|
973
|
+
}
|
|
974
|
+
},
|
|
941
975
|
"node_modules/d3-format": {
|
|
942
976
|
"version": "3.1.2",
|
|
943
977
|
"resolved": "https://registry.npmjs.org/d3-format/-/d3-format-3.1.2.tgz",
|
|
@@ -959,6 +993,15 @@
|
|
|
959
993
|
"node": ">=12"
|
|
960
994
|
}
|
|
961
995
|
},
|
|
996
|
+
"node_modules/d3-hierarchy": {
|
|
997
|
+
"version": "3.1.2",
|
|
998
|
+
"resolved": "https://registry.npmjs.org/d3-hierarchy/-/d3-hierarchy-3.1.2.tgz",
|
|
999
|
+
"integrity": "sha512-FX/9frcub54beBdugHjDCdikxThEqjnR93Qt7PvQTOHxyiNCAlvMrHhclk3cD5VeAaq9fxmfRp+CnWw9rEMBuA==",
|
|
1000
|
+
"license": "ISC",
|
|
1001
|
+
"engines": {
|
|
1002
|
+
"node": ">=12"
|
|
1003
|
+
}
|
|
1004
|
+
},
|
|
962
1005
|
"node_modules/d3-interpolate": {
|
|
963
1006
|
"version": "3.0.1",
|
|
964
1007
|
"resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-3.0.1.tgz",
|
|
@@ -980,6 +1023,55 @@
|
|
|
980
1023
|
"node": ">=12"
|
|
981
1024
|
}
|
|
982
1025
|
},
|
|
1026
|
+
"node_modules/d3-quadtree": {
|
|
1027
|
+
"version": "3.0.1",
|
|
1028
|
+
"resolved": "https://registry.npmjs.org/d3-quadtree/-/d3-quadtree-3.0.1.tgz",
|
|
1029
|
+
"integrity": "sha512-04xDrxQTDTCFwP5H6hRhsRcb9xxv2RzkcsygFzmkSIOJy3PeRJP7sNk3VRIbKXcog561P9oU0/rVH6vDROAgUw==",
|
|
1030
|
+
"license": "ISC",
|
|
1031
|
+
"engines": {
|
|
1032
|
+
"node": ">=12"
|
|
1033
|
+
}
|
|
1034
|
+
},
|
|
1035
|
+
"node_modules/d3-sankey": {
|
|
1036
|
+
"version": "0.12.3",
|
|
1037
|
+
"resolved": "https://registry.npmjs.org/d3-sankey/-/d3-sankey-0.12.3.tgz",
|
|
1038
|
+
"integrity": "sha512-nQhsBRmM19Ax5xEIPLMY9ZmJ/cDvd1BG3UVvt5h3WRxKg5zGRbvnteTyWAbzeSvlh3tW7ZEmq4VwR5mB3tutmQ==",
|
|
1039
|
+
"license": "BSD-3-Clause",
|
|
1040
|
+
"dependencies": {
|
|
1041
|
+
"d3-array": "1 - 2",
|
|
1042
|
+
"d3-shape": "^1.2.0"
|
|
1043
|
+
}
|
|
1044
|
+
},
|
|
1045
|
+
"node_modules/d3-sankey/node_modules/d3-array": {
|
|
1046
|
+
"version": "2.12.1",
|
|
1047
|
+
"resolved": "https://registry.npmjs.org/d3-array/-/d3-array-2.12.1.tgz",
|
|
1048
|
+
"integrity": "sha512-B0ErZK/66mHtEsR1TkPEEkwdy+WDesimkM5gpZr5Dsg54BiTA5RXtYW5qTLIAcekaS9xfZrzBLF/OAkB3Qn1YQ==",
|
|
1049
|
+
"license": "BSD-3-Clause",
|
|
1050
|
+
"dependencies": {
|
|
1051
|
+
"internmap": "^1.0.0"
|
|
1052
|
+
}
|
|
1053
|
+
},
|
|
1054
|
+
"node_modules/d3-sankey/node_modules/d3-path": {
|
|
1055
|
+
"version": "1.0.9",
|
|
1056
|
+
"resolved": "https://registry.npmjs.org/d3-path/-/d3-path-1.0.9.tgz",
|
|
1057
|
+
"integrity": "sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg==",
|
|
1058
|
+
"license": "BSD-3-Clause"
|
|
1059
|
+
},
|
|
1060
|
+
"node_modules/d3-sankey/node_modules/d3-shape": {
|
|
1061
|
+
"version": "1.3.7",
|
|
1062
|
+
"resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-1.3.7.tgz",
|
|
1063
|
+
"integrity": "sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw==",
|
|
1064
|
+
"license": "BSD-3-Clause",
|
|
1065
|
+
"dependencies": {
|
|
1066
|
+
"d3-path": "1"
|
|
1067
|
+
}
|
|
1068
|
+
},
|
|
1069
|
+
"node_modules/d3-sankey/node_modules/internmap": {
|
|
1070
|
+
"version": "1.0.1",
|
|
1071
|
+
"resolved": "https://registry.npmjs.org/internmap/-/internmap-1.0.1.tgz",
|
|
1072
|
+
"integrity": "sha512-lDB5YccMydFBtasVtxnZ3MRBHuaoE8GKsppq+EchKL2U4nK/DmEpPHNH8MZe5HkMtpSiTSOZwfN0tzYjO/lJEw==",
|
|
1073
|
+
"license": "ISC"
|
|
1074
|
+
},
|
|
983
1075
|
"node_modules/d3-scale": {
|
|
984
1076
|
"version": "4.0.2",
|
|
985
1077
|
"resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-4.0.2.tgz",
|
|
@@ -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>
|