@lionad/cx-comps-tanstack-charts 0.1.0-alpha.15 → 0.1.0-alpha.16

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/dist/index.mjs CHANGED
@@ -785,7 +785,23 @@ function translatePolarGuide(spec) {
785
785
  "shape",
786
786
  "labels",
787
787
  "labelAngle",
788
- "labelOffset"
788
+ "labelOffset",
789
+ "id",
790
+ "className",
791
+ "labelClassName",
792
+ "stroke",
793
+ "strokeOpacity",
794
+ "strokeWidth",
795
+ "strokeDasharray",
796
+ "fill",
797
+ "fillOpacity",
798
+ "labelFill",
799
+ "labelFontSize",
800
+ "labelAnchor",
801
+ "labelBaseline",
802
+ "labelDx",
803
+ "labelDy",
804
+ "labelRotate"
789
805
  ]) if (spec[key] !== void 0) options[key] = spec[key];
790
806
  return factory(options);
791
807
  }
@@ -1090,7 +1106,7 @@ const GEO_PROJECTION_FACTORIES = {
1090
1106
  equalEarth: geoEqualEarth,
1091
1107
  identity: geoIdentity
1092
1108
  };
1093
- /** geoShape:projection 名称枚举 → descriptor {type, fit, inset};fit:'data' 由库拟合数据本体 */
1109
+ /** geoShape:projection 名称枚举 → descriptor {type, fit, inset};fit:'data' 由库拟合数据本体,{data:'<name>'} 拟合另一命名数据集 */
1094
1110
  function translateGeoShape(spec, datasets) {
1095
1111
  const rows = resolveMarkData(spec.data, datasets);
1096
1112
  const projectionName = spec.projection ?? "mercator";
@@ -1098,7 +1114,10 @@ function translateGeoShape(spec, datasets) {
1098
1114
  if (!factory) throw new Error(`translateGeoShape: 未知投影 "${String(projectionName)}"`);
1099
1115
  const options = { projection: {
1100
1116
  type: factory,
1101
- fit: spec.fit ?? "data",
1117
+ fit: typeof spec.fit === "object" && spec.fit !== null ? {
1118
+ type: "FeatureCollection",
1119
+ features: resolveMarkData(spec.fit.data, datasets)
1120
+ } : spec.fit ?? "data",
1102
1121
  ...spec.inset !== void 0 ? { inset: spec.inset } : {}
1103
1122
  } };
1104
1123
  if (spec.id !== void 0) options.id = spec.id;
@@ -235,7 +235,9 @@ export interface CxChartMarkSpec {
235
235
  orientation?: 'left' | 'right' | 'top' | 'bottom';
236
236
  nodeSize?: [number, number];
237
237
  projection?: 'mercator' | 'orthographic' | 'naturalEarth1' | 'albersUsa' | 'equalEarth' | 'identity';
238
- fit?: 'data' | 'sphere';
238
+ fit?: 'data' | 'sphere' | {
239
+ data: string;
240
+ };
239
241
  by?: string;
240
242
  axes?: 'outer' | 'cell';
241
243
  minWidth?: number;
@@ -252,6 +254,22 @@ export interface CxChartPolarGuideSpec {
252
254
  labels?: boolean;
253
255
  labelAngle?: number;
254
256
  labelOffset?: number;
257
+ id?: string;
258
+ className?: string;
259
+ labelClassName?: string;
260
+ stroke?: string;
261
+ strokeOpacity?: number;
262
+ strokeWidth?: number;
263
+ strokeDasharray?: string;
264
+ fill?: string;
265
+ fillOpacity?: number;
266
+ labelFill?: string;
267
+ labelFontSize?: number;
268
+ labelAnchor?: 'start' | 'middle' | 'end';
269
+ labelBaseline?: 'auto' | 'middle' | 'hanging';
270
+ labelDx?: number;
271
+ labelDy?: number;
272
+ labelRotate?: number;
255
273
  }
256
274
  /**
257
275
  * forceGraph 力集声明式:库 ForceDescriptor 的 JSON 子集。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lionad/cx-comps-tanstack-charts",
3
- "version": "0.1.0-alpha.15",
3
+ "version": "0.1.0-alpha.16",
4
4
  "description": "cx material components wrapping TanStack Charts (@tanstack/charts/vue)",
5
5
  "keywords": [
6
6
  "charts",