mnfst 0.5.160 → 0.5.162
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/lib/manifest.charts.js
CHANGED
|
@@ -829,7 +829,9 @@
|
|
|
829
829
|
const xx = pos(tk);
|
|
830
830
|
if (xx == null || isNaN(xx)) return;
|
|
831
831
|
if (cfg.grid) svg('line', { x1: xx, x2: xx, y1: 0, y2: ih }, plot);
|
|
832
|
-
|
|
832
|
+
// Edge ticks anchor inward so labels never spill past the plot.
|
|
833
|
+
const anchor = xx <= 1 ? 'start' : xx >= iw - 1 ? 'end' : 'middle';
|
|
834
|
+
text(plot, fmt(tk), { x: xx, y: ih + 14, 'text-anchor': anchor });
|
|
833
835
|
});
|
|
834
836
|
|
|
835
837
|
// Status → colour, stable across tracks. A per-segment `color` wins;
|
|
@@ -977,15 +979,17 @@
|
|
|
977
979
|
}
|
|
978
980
|
});
|
|
979
981
|
|
|
980
|
-
//
|
|
981
|
-
//
|
|
982
|
+
// Point markers (proportional symbols) — projected through the same
|
|
983
|
+
// projection. `points: [{ lat, lng, value?, label?, color? }]`, or a
|
|
984
|
+
// `name` resolved against `places` (`city` is a legacy alias).
|
|
982
985
|
const pts = Array.isArray(cfg.points) ? cfg.points : [];
|
|
983
986
|
if (pts.length) {
|
|
987
|
+
const placeKey = (p) => String(p.name != null ? p.name : (p.city != null ? p.city : '')).toLowerCase();
|
|
984
988
|
const coord = (p) => {
|
|
985
989
|
let lat = p.lat != null ? p.lat : p.latitude;
|
|
986
990
|
let lng = p.lng != null ? p.lng : (p.lon != null ? p.lon : (p.long != null ? p.long : p.longitude));
|
|
987
991
|
if ((lat == null || lng == null) && places) {
|
|
988
|
-
const hit = places[
|
|
992
|
+
const hit = places[placeKey(p)];
|
|
989
993
|
if (hit) { if (Array.isArray(hit)) { lat = hit[0]; lng = hit[1]; } else { lat = hit.lat; lng = hit.lng; } }
|
|
990
994
|
}
|
|
991
995
|
return (lat == null || lng == null) ? null : [+lng, +lat];
|
|
@@ -998,7 +1002,7 @@
|
|
|
998
1002
|
pts.forEach(p => {
|
|
999
1003
|
const c = coord(p), xy = c && projection(c);
|
|
1000
1004
|
if (!xy) return;
|
|
1001
|
-
const label = p.label || p.
|
|
1005
|
+
const label = p.label || p.name || p.city || '';
|
|
1002
1006
|
const dot = svg('circle', { class: 'map-point', cx: xy[0], cy: xy[1], r: rOf(p.value), style: p.color ? `--color-chart-color:${p.color}` : '' }, plot);
|
|
1003
1007
|
applyTip(dot, label + (p.value != null ? (label ? ': ' : '') + p.value : ''), cfg);
|
|
1004
1008
|
animate(dot, [{ opacity: 0 }, { opacity: 1 }], { duration: 250 });
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"manifest.appwrite.auth.js": "sha384-1Kz/Dlerds1/7iKrEVDIRbFDyngZ0L+f81td9eW3w4t3nGFU+w4gjyGhwn+IiTRM",
|
|
3
3
|
"manifest.appwrite.data.js": "sha384-00ulLT+GAIuPHA/rRT9p98vYlsyDzkyKXtg86BDQ6FGQa5vVVN+W6kuforniBAsz",
|
|
4
4
|
"manifest.appwrite.presence.js": "sha384-uxRpx9/Jj0kGtklH5QmUlAzD3zdSvFRfK6bcJQqxl+Bsf5tOo4zgwqJTQgtZoHQP",
|
|
5
|
-
"manifest.charts.js": "sha384-
|
|
5
|
+
"manifest.charts.js": "sha384-VLLBR7we7mgEQSQDmtNXeLufly3Ru8MzAbAgUGVpOUZk/3w0se/DXSMvf3gmC8A/",
|
|
6
6
|
"manifest.code.js": "sha384-BJSRJ7txA6fY660qX+SfEEBrEB0dOChHdHI4/9iNGz3rGqohEZdzs7qA3LuR1GJW",
|
|
7
7
|
"manifest.color.js": "sha384-6Rv3LxyTcZNjrhtayQfqRdCx0uSZ4BiEbgEI98I62eTvp8Aw7LBIoNJ0Je1oktwL",
|
|
8
8
|
"manifest.colorpicker.js": "sha384-Wqz0ZIbeIi7KarqqqSLsQk+7E/fMaKhb32hrq5/eWzX1yjqMrpPZKH8y+jZ3mfg+",
|