@visactor/vseed 0.4.25 → 0.4.26
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/cjs/index.cjs +2 -2
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/config/column.js +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/config/column.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/config/line.js +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/config/line.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/area.js +5 -1
- package/dist/esm/pipeline/spec/chart/pipeline/area.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/areaPercent.js +3 -1
- package/dist/esm/pipeline/spec/chart/pipeline/areaPercent.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/bar.js +3 -1
- package/dist/esm/pipeline/spec/chart/pipeline/bar.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/barParallel.js +3 -1
- package/dist/esm/pipeline/spec/chart/pipeline/barParallel.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/barPercent.js +3 -1
- package/dist/esm/pipeline/spec/chart/pipeline/barPercent.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/column.js +3 -1
- package/dist/esm/pipeline/spec/chart/pipeline/column.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/columnParallel.js +3 -1
- package/dist/esm/pipeline/spec/chart/pipeline/columnParallel.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/columnPercent.js +3 -1
- package/dist/esm/pipeline/spec/chart/pipeline/columnPercent.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/line.js +5 -1
- package/dist/esm/pipeline/spec/chart/pipeline/line.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationDifferenceLine.js +157 -73
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationDifferenceLine.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationDifferenceLineCommon.d.ts +19 -4
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationDifferenceLineCommon.js +56 -10
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationDifferenceLineCommon.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/region/index.d.ts +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/region/index.js +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/region/regionPadding.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/region/regionPadding.js +20 -0
- package/dist/esm/pipeline/spec/chart/pipes/region/regionPadding.js.map +1 -0
- package/dist/esm/types/chartType/area/area.d.ts +11 -1
- package/dist/esm/types/chartType/area/zArea.d.ts +309 -0
- package/dist/esm/types/chartType/area/zArea.js +3 -1
- package/dist/esm/types/chartType/area/zArea.js.map +1 -1
- package/dist/esm/types/chartType/areaPercent/areaPercent.d.ts +6 -1
- package/dist/esm/types/chartType/areaPercent/zAreaPercent.d.ts +6 -0
- package/dist/esm/types/chartType/areaPercent/zAreaPercent.js +2 -1
- package/dist/esm/types/chartType/areaPercent/zAreaPercent.js.map +1 -1
- package/dist/esm/types/chartType/bar/bar.d.ts +6 -1
- package/dist/esm/types/chartType/bar/zBar.d.ts +6 -0
- package/dist/esm/types/chartType/bar/zBar.js +2 -1
- package/dist/esm/types/chartType/bar/zBar.js.map +1 -1
- package/dist/esm/types/chartType/barParallel/barParallel.d.ts +6 -1
- package/dist/esm/types/chartType/barParallel/zBarParallel.d.ts +6 -0
- package/dist/esm/types/chartType/barParallel/zBarParallel.js +2 -1
- package/dist/esm/types/chartType/barParallel/zBarParallel.js.map +1 -1
- package/dist/esm/types/chartType/barPercent/barPercent.d.ts +6 -1
- package/dist/esm/types/chartType/barPercent/zBarPercent.d.ts +6 -0
- package/dist/esm/types/chartType/barPercent/zBarPercent.js +2 -1
- package/dist/esm/types/chartType/barPercent/zBarPercent.js.map +1 -1
- package/dist/esm/types/chartType/column/column.d.ts +6 -1
- package/dist/esm/types/chartType/column/zColumn.d.ts +6 -0
- package/dist/esm/types/chartType/column/zColumn.js +2 -1
- package/dist/esm/types/chartType/column/zColumn.js.map +1 -1
- package/dist/esm/types/chartType/columnParallel/columnParallel.d.ts +6 -1
- package/dist/esm/types/chartType/columnParallel/zColumnParallel.d.ts +6 -0
- package/dist/esm/types/chartType/columnParallel/zColumnParallel.js +2 -1
- package/dist/esm/types/chartType/columnParallel/zColumnParallel.js.map +1 -1
- package/dist/esm/types/chartType/columnPercent/columnPercent.d.ts +6 -1
- package/dist/esm/types/chartType/columnPercent/zColumnPercent.d.ts +6 -0
- package/dist/esm/types/chartType/columnPercent/zColumnPercent.js +2 -1
- package/dist/esm/types/chartType/columnPercent/zColumnPercent.js.map +1 -1
- package/dist/esm/types/chartType/line/line.d.ts +11 -1
- package/dist/esm/types/chartType/line/zLine.d.ts +309 -0
- package/dist/esm/types/chartType/line/zLine.js +3 -1
- package/dist/esm/types/chartType/line/zLine.js.map +1 -1
- package/dist/esm/types/properties/config/area.d.ts +12 -0
- package/dist/esm/types/properties/config/area.js +2 -0
- package/dist/esm/types/properties/config/area.js.map +1 -1
- package/dist/esm/types/properties/config/bar.d.ts +18 -0
- package/dist/esm/types/properties/config/bar.js +2 -0
- package/dist/esm/types/properties/config/bar.js.map +1 -1
- package/dist/esm/types/properties/config/column.d.ts +18 -0
- package/dist/esm/types/properties/config/column.js +2 -0
- package/dist/esm/types/properties/config/column.js.map +1 -1
- package/dist/esm/types/properties/config/config.d.ts +66 -0
- package/dist/esm/types/properties/config/line.d.ts +6 -0
- package/dist/esm/types/properties/config/line.js +2 -0
- package/dist/esm/types/properties/config/line.js.map +1 -1
- package/dist/esm/types/properties/config/race.d.ts +12 -0
- package/dist/esm/types/properties/index.d.ts +1 -0
- package/dist/esm/types/properties/index.js +1 -0
- package/dist/esm/types/properties/regionPadding/index.d.ts +2 -0
- package/dist/esm/types/properties/regionPadding/index.js +1 -0
- package/dist/esm/types/properties/regionPadding/regionPadding.d.ts +6 -0
- package/dist/esm/types/properties/regionPadding/regionPadding.js +0 -0
- package/dist/esm/types/properties/regionPadding/zRegionPadding.d.ts +7 -0
- package/dist/esm/types/properties/regionPadding/zRegionPadding.js +11 -0
- package/dist/esm/types/properties/regionPadding/zRegionPadding.js.map +1 -0
- package/dist/esm/types/properties/theme/customTheme.d.ts +132 -0
- package/dist/umd/index.js +485 -291
- package/dist/umd/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const regionPadding = (spec, context)=>{
|
|
2
|
+
const chartConfig = context.advancedVSeed.config?.[context.vseed.chartType];
|
|
3
|
+
const padding = chartConfig?.regionPadding;
|
|
4
|
+
if (null == padding || !Array.isArray(spec.region)) return spec;
|
|
5
|
+
const region = spec.region;
|
|
6
|
+
if (0 === region.length) return spec;
|
|
7
|
+
return {
|
|
8
|
+
...spec,
|
|
9
|
+
region: [
|
|
10
|
+
{
|
|
11
|
+
...region[0],
|
|
12
|
+
padding
|
|
13
|
+
},
|
|
14
|
+
...region.slice(1)
|
|
15
|
+
]
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export { regionPadding };
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=regionPadding.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/region/regionPadding.js","sources":["../../../../../../../src/pipeline/spec/chart/pipes/region/regionPadding.ts"],"sourcesContent":["import type { RegionPadding, VChartSpecPipe } from 'src/types'\n\ntype RegionPaddingConfig = {\n regionPadding?: RegionPadding\n}\n\nexport const regionPadding: VChartSpecPipe = (spec, context) => {\n const chartConfig = context.advancedVSeed.config?.[context.vseed.chartType] as RegionPaddingConfig | undefined\n const padding = chartConfig?.regionPadding\n\n if (padding == null || !Array.isArray((spec as { region?: unknown }).region)) {\n return spec\n }\n\n const region = (spec as { region: Array<Record<string, unknown>> }).region\n if (region.length === 0) {\n return spec\n }\n\n return {\n ...spec,\n region: [\n {\n ...region[0],\n padding,\n },\n ...region.slice(1),\n ],\n }\n}\n"],"names":["regionPadding","spec","context","chartConfig","padding","Array","region"],"mappings":"AAMO,MAAMA,gBAAgC,CAACC,MAAMC;IAClD,MAAMC,cAAcD,QAAQ,aAAa,CAAC,MAAM,EAAE,CAACA,QAAQ,KAAK,CAAC,SAAS,CAAC;IAC3E,MAAME,UAAUD,aAAa;IAE7B,IAAIC,AAAW,QAAXA,WAAmB,CAACC,MAAM,OAAO,CAAEJ,KAA8B,MAAM,GACzE,OAAOA;IAGT,MAAMK,SAAUL,KAAoD,MAAM;IAC1E,IAAIK,AAAkB,MAAlBA,OAAO,MAAM,EACf,OAAOL;IAGT,OAAO;QACL,GAAGA,IAAI;QACP,QAAQ;YACN;gBACE,GAAGK,MAAM,CAAC,EAAE;gBACZF;YACF;eACGE,OAAO,KAAK,CAAC;SACjB;IACH;AACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Locale } from '../../i18n';
|
|
2
|
-
import type { AnnotationArea, AnnotationHorizontalLine, AnnotationPoint, AnnotationVerticalLine, AreaStyle, BackgroundColor, Brush, Color, Dataset, Label, Legend, LineStyle, PointStyle, Theme, Tooltip, XBandAxis, YLinearAxis, CrosshairLine, Sort, SortLegend, DimensionLinkage, ColumnDimension, ColumnMeasure, Page } from '../../properties';
|
|
2
|
+
import type { AnnotationArea, AnnotationDifferenceLine, AnnotationHorizontalLine, AnnotationPoint, AnnotationVerticalLine, AreaStyle, BackgroundColor, Brush, Color, Dataset, Label, Legend, LineStyle, PointStyle, Theme, Tooltip, XBandAxis, YLinearAxis, CrosshairLine, Sort, SortLegend, DimensionLinkage, ColumnDimension, ColumnMeasure, Page, RegionPadding } from '../../properties';
|
|
3
3
|
/**
|
|
4
4
|
* @recommend
|
|
5
5
|
* - 推荐字段配置: `1`个指标, `2`个维度
|
|
@@ -85,6 +85,11 @@ export interface Area {
|
|
|
85
85
|
* @description 图例配置, 用于定义图表的图例, 包括图例的位置, 格式, 样式等.
|
|
86
86
|
*/
|
|
87
87
|
legend?: Legend;
|
|
88
|
+
/**
|
|
89
|
+
* 绘图区内边距
|
|
90
|
+
* @description 映射到 VChart 的 region[0].padding,用于为标注、标签等绘图区外扩元素预留空间。
|
|
91
|
+
*/
|
|
92
|
+
regionPadding?: RegionPadding;
|
|
88
93
|
/**
|
|
89
94
|
* 提示信息
|
|
90
95
|
* @description 提示信息配置, 用于定义图表的提示信息, 包括提示信息的位置, 格式, 样式等.
|
|
@@ -184,6 +189,11 @@ export interface Area {
|
|
|
184
189
|
* @description 标注区域配置, 根据选择的数据, 定义图表的标注区域, 包括标注区域的位置, 样式等.
|
|
185
190
|
*/
|
|
186
191
|
annotationArea?: AnnotationArea | AnnotationArea[];
|
|
192
|
+
/**
|
|
193
|
+
* 差异标注线
|
|
194
|
+
* @description 根据两个选中的数据点,绘制差异标注线并自动计算差异文本。
|
|
195
|
+
*/
|
|
196
|
+
annotationDifferenceLine?: AnnotationDifferenceLine | AnnotationDifferenceLine[];
|
|
187
197
|
/**
|
|
188
198
|
* @description 当图表开启透视功能或者指标组合的是否,是否开启维度联动功能
|
|
189
199
|
* 当hover 到某个维度值时,联动高亮其他图表中相同维度值的数据
|
|
@@ -422,6 +422,12 @@ export declare const zArea: z.ZodObject<{
|
|
|
422
422
|
labelFontSize: z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodNumber>>>;
|
|
423
423
|
labelFontWeight: z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>>;
|
|
424
424
|
}, z.core.$strip>>>;
|
|
425
|
+
regionPadding: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodObject<{
|
|
426
|
+
top: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
427
|
+
right: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
428
|
+
bottom: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
429
|
+
left: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
430
|
+
}, z.core.$strip>]>>>;
|
|
425
431
|
tooltip: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
426
432
|
enable: z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodBoolean>>>;
|
|
427
433
|
borderColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -2357,6 +2363,309 @@ export declare const zArea: z.ZodObject<{
|
|
|
2357
2363
|
areaLineDash: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber>>>;
|
|
2358
2364
|
outerPadding: z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodNumber>>>;
|
|
2359
2365
|
}, z.core.$strip>]>>>;
|
|
2366
|
+
annotationDifferenceLine: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodArray<z.ZodObject<{
|
|
2367
|
+
start: z.ZodObject<{
|
|
2368
|
+
selector: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodRecord<z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodAny>, z.ZodObject<{
|
|
2369
|
+
field: z.ZodString;
|
|
2370
|
+
operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
2371
|
+
"=": "=";
|
|
2372
|
+
"==": "==";
|
|
2373
|
+
"!=": "!=";
|
|
2374
|
+
">": ">";
|
|
2375
|
+
"<": "<";
|
|
2376
|
+
">=": ">=";
|
|
2377
|
+
"<=": "<=";
|
|
2378
|
+
between: "between";
|
|
2379
|
+
}>>>;
|
|
2380
|
+
op: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
2381
|
+
"=": "=";
|
|
2382
|
+
"==": "==";
|
|
2383
|
+
"!=": "!=";
|
|
2384
|
+
">": ">";
|
|
2385
|
+
"<": "<";
|
|
2386
|
+
">=": ">=";
|
|
2387
|
+
"<=": "<=";
|
|
2388
|
+
between: "between";
|
|
2389
|
+
}>>>;
|
|
2390
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
|
|
2391
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2392
|
+
field: z.ZodString;
|
|
2393
|
+
operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
2394
|
+
in: "in";
|
|
2395
|
+
"not in": "not in";
|
|
2396
|
+
}>>>;
|
|
2397
|
+
op: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
2398
|
+
in: "in";
|
|
2399
|
+
"not in": "not in";
|
|
2400
|
+
}>>>;
|
|
2401
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
|
|
2402
|
+
}, z.core.$strip>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodRecord<z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodAny>, z.ZodObject<{
|
|
2403
|
+
field: z.ZodString;
|
|
2404
|
+
operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
2405
|
+
"=": "=";
|
|
2406
|
+
"==": "==";
|
|
2407
|
+
"!=": "!=";
|
|
2408
|
+
">": ">";
|
|
2409
|
+
"<": "<";
|
|
2410
|
+
">=": ">=";
|
|
2411
|
+
"<=": "<=";
|
|
2412
|
+
between: "between";
|
|
2413
|
+
}>>>;
|
|
2414
|
+
op: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
2415
|
+
"=": "=";
|
|
2416
|
+
"==": "==";
|
|
2417
|
+
"!=": "!=";
|
|
2418
|
+
">": ">";
|
|
2419
|
+
"<": "<";
|
|
2420
|
+
">=": ">=";
|
|
2421
|
+
"<=": "<=";
|
|
2422
|
+
between: "between";
|
|
2423
|
+
}>>>;
|
|
2424
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
|
|
2425
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2426
|
+
field: z.ZodString;
|
|
2427
|
+
operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
2428
|
+
in: "in";
|
|
2429
|
+
"not in": "not in";
|
|
2430
|
+
}>>>;
|
|
2431
|
+
op: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
2432
|
+
in: "in";
|
|
2433
|
+
"not in": "not in";
|
|
2434
|
+
}>>>;
|
|
2435
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
|
|
2436
|
+
}, z.core.$strip>]>>]>;
|
|
2437
|
+
}, z.core.$strip>;
|
|
2438
|
+
end: z.ZodObject<{
|
|
2439
|
+
selector: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodRecord<z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodAny>, z.ZodObject<{
|
|
2440
|
+
field: z.ZodString;
|
|
2441
|
+
operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
2442
|
+
"=": "=";
|
|
2443
|
+
"==": "==";
|
|
2444
|
+
"!=": "!=";
|
|
2445
|
+
">": ">";
|
|
2446
|
+
"<": "<";
|
|
2447
|
+
">=": ">=";
|
|
2448
|
+
"<=": "<=";
|
|
2449
|
+
between: "between";
|
|
2450
|
+
}>>>;
|
|
2451
|
+
op: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
2452
|
+
"=": "=";
|
|
2453
|
+
"==": "==";
|
|
2454
|
+
"!=": "!=";
|
|
2455
|
+
">": ">";
|
|
2456
|
+
"<": "<";
|
|
2457
|
+
">=": ">=";
|
|
2458
|
+
"<=": "<=";
|
|
2459
|
+
between: "between";
|
|
2460
|
+
}>>>;
|
|
2461
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
|
|
2462
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2463
|
+
field: z.ZodString;
|
|
2464
|
+
operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
2465
|
+
in: "in";
|
|
2466
|
+
"not in": "not in";
|
|
2467
|
+
}>>>;
|
|
2468
|
+
op: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
2469
|
+
in: "in";
|
|
2470
|
+
"not in": "not in";
|
|
2471
|
+
}>>>;
|
|
2472
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
|
|
2473
|
+
}, z.core.$strip>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodRecord<z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodAny>, z.ZodObject<{
|
|
2474
|
+
field: z.ZodString;
|
|
2475
|
+
operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
2476
|
+
"=": "=";
|
|
2477
|
+
"==": "==";
|
|
2478
|
+
"!=": "!=";
|
|
2479
|
+
">": ">";
|
|
2480
|
+
"<": "<";
|
|
2481
|
+
">=": ">=";
|
|
2482
|
+
"<=": "<=";
|
|
2483
|
+
between: "between";
|
|
2484
|
+
}>>>;
|
|
2485
|
+
op: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
2486
|
+
"=": "=";
|
|
2487
|
+
"==": "==";
|
|
2488
|
+
"!=": "!=";
|
|
2489
|
+
">": ">";
|
|
2490
|
+
"<": "<";
|
|
2491
|
+
">=": ">=";
|
|
2492
|
+
"<=": "<=";
|
|
2493
|
+
between: "between";
|
|
2494
|
+
}>>>;
|
|
2495
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
|
|
2496
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2497
|
+
field: z.ZodString;
|
|
2498
|
+
operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
2499
|
+
in: "in";
|
|
2500
|
+
"not in": "not in";
|
|
2501
|
+
}>>>;
|
|
2502
|
+
op: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
2503
|
+
in: "in";
|
|
2504
|
+
"not in": "not in";
|
|
2505
|
+
}>>>;
|
|
2506
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
|
|
2507
|
+
}, z.core.$strip>]>>]>;
|
|
2508
|
+
}, z.core.$strip>;
|
|
2509
|
+
differenceType: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
2510
|
+
percent: "percent";
|
|
2511
|
+
absolute: "absolute";
|
|
2512
|
+
}>>>;
|
|
2513
|
+
textFontSize: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2514
|
+
textColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2515
|
+
textBackgroundColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2516
|
+
lineColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2517
|
+
}, z.core.$strip>>, z.ZodObject<{
|
|
2518
|
+
start: z.ZodObject<{
|
|
2519
|
+
selector: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodRecord<z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodAny>, z.ZodObject<{
|
|
2520
|
+
field: z.ZodString;
|
|
2521
|
+
operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
2522
|
+
"=": "=";
|
|
2523
|
+
"==": "==";
|
|
2524
|
+
"!=": "!=";
|
|
2525
|
+
">": ">";
|
|
2526
|
+
"<": "<";
|
|
2527
|
+
">=": ">=";
|
|
2528
|
+
"<=": "<=";
|
|
2529
|
+
between: "between";
|
|
2530
|
+
}>>>;
|
|
2531
|
+
op: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
2532
|
+
"=": "=";
|
|
2533
|
+
"==": "==";
|
|
2534
|
+
"!=": "!=";
|
|
2535
|
+
">": ">";
|
|
2536
|
+
"<": "<";
|
|
2537
|
+
">=": ">=";
|
|
2538
|
+
"<=": "<=";
|
|
2539
|
+
between: "between";
|
|
2540
|
+
}>>>;
|
|
2541
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
|
|
2542
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2543
|
+
field: z.ZodString;
|
|
2544
|
+
operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
2545
|
+
in: "in";
|
|
2546
|
+
"not in": "not in";
|
|
2547
|
+
}>>>;
|
|
2548
|
+
op: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
2549
|
+
in: "in";
|
|
2550
|
+
"not in": "not in";
|
|
2551
|
+
}>>>;
|
|
2552
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
|
|
2553
|
+
}, z.core.$strip>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodRecord<z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodAny>, z.ZodObject<{
|
|
2554
|
+
field: z.ZodString;
|
|
2555
|
+
operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
2556
|
+
"=": "=";
|
|
2557
|
+
"==": "==";
|
|
2558
|
+
"!=": "!=";
|
|
2559
|
+
">": ">";
|
|
2560
|
+
"<": "<";
|
|
2561
|
+
">=": ">=";
|
|
2562
|
+
"<=": "<=";
|
|
2563
|
+
between: "between";
|
|
2564
|
+
}>>>;
|
|
2565
|
+
op: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
2566
|
+
"=": "=";
|
|
2567
|
+
"==": "==";
|
|
2568
|
+
"!=": "!=";
|
|
2569
|
+
">": ">";
|
|
2570
|
+
"<": "<";
|
|
2571
|
+
">=": ">=";
|
|
2572
|
+
"<=": "<=";
|
|
2573
|
+
between: "between";
|
|
2574
|
+
}>>>;
|
|
2575
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
|
|
2576
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2577
|
+
field: z.ZodString;
|
|
2578
|
+
operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
2579
|
+
in: "in";
|
|
2580
|
+
"not in": "not in";
|
|
2581
|
+
}>>>;
|
|
2582
|
+
op: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
2583
|
+
in: "in";
|
|
2584
|
+
"not in": "not in";
|
|
2585
|
+
}>>>;
|
|
2586
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
|
|
2587
|
+
}, z.core.$strip>]>>]>;
|
|
2588
|
+
}, z.core.$strip>;
|
|
2589
|
+
end: z.ZodObject<{
|
|
2590
|
+
selector: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodRecord<z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodAny>, z.ZodObject<{
|
|
2591
|
+
field: z.ZodString;
|
|
2592
|
+
operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
2593
|
+
"=": "=";
|
|
2594
|
+
"==": "==";
|
|
2595
|
+
"!=": "!=";
|
|
2596
|
+
">": ">";
|
|
2597
|
+
"<": "<";
|
|
2598
|
+
">=": ">=";
|
|
2599
|
+
"<=": "<=";
|
|
2600
|
+
between: "between";
|
|
2601
|
+
}>>>;
|
|
2602
|
+
op: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
2603
|
+
"=": "=";
|
|
2604
|
+
"==": "==";
|
|
2605
|
+
"!=": "!=";
|
|
2606
|
+
">": ">";
|
|
2607
|
+
"<": "<";
|
|
2608
|
+
">=": ">=";
|
|
2609
|
+
"<=": "<=";
|
|
2610
|
+
between: "between";
|
|
2611
|
+
}>>>;
|
|
2612
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
|
|
2613
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2614
|
+
field: z.ZodString;
|
|
2615
|
+
operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
2616
|
+
in: "in";
|
|
2617
|
+
"not in": "not in";
|
|
2618
|
+
}>>>;
|
|
2619
|
+
op: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
2620
|
+
in: "in";
|
|
2621
|
+
"not in": "not in";
|
|
2622
|
+
}>>>;
|
|
2623
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
|
|
2624
|
+
}, z.core.$strip>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodRecord<z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodAny>, z.ZodObject<{
|
|
2625
|
+
field: z.ZodString;
|
|
2626
|
+
operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
2627
|
+
"=": "=";
|
|
2628
|
+
"==": "==";
|
|
2629
|
+
"!=": "!=";
|
|
2630
|
+
">": ">";
|
|
2631
|
+
"<": "<";
|
|
2632
|
+
">=": ">=";
|
|
2633
|
+
"<=": "<=";
|
|
2634
|
+
between: "between";
|
|
2635
|
+
}>>>;
|
|
2636
|
+
op: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
2637
|
+
"=": "=";
|
|
2638
|
+
"==": "==";
|
|
2639
|
+
"!=": "!=";
|
|
2640
|
+
">": ">";
|
|
2641
|
+
"<": "<";
|
|
2642
|
+
">=": ">=";
|
|
2643
|
+
"<=": "<=";
|
|
2644
|
+
between: "between";
|
|
2645
|
+
}>>>;
|
|
2646
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
|
|
2647
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2648
|
+
field: z.ZodString;
|
|
2649
|
+
operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
2650
|
+
in: "in";
|
|
2651
|
+
"not in": "not in";
|
|
2652
|
+
}>>>;
|
|
2653
|
+
op: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
2654
|
+
in: "in";
|
|
2655
|
+
"not in": "not in";
|
|
2656
|
+
}>>>;
|
|
2657
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
|
|
2658
|
+
}, z.core.$strip>]>>]>;
|
|
2659
|
+
}, z.core.$strip>;
|
|
2660
|
+
differenceType: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
2661
|
+
percent: "percent";
|
|
2662
|
+
absolute: "absolute";
|
|
2663
|
+
}>>>;
|
|
2664
|
+
textFontSize: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2665
|
+
textColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2666
|
+
textBackgroundColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2667
|
+
lineColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2668
|
+
}, z.core.$strip>]>>>;
|
|
2360
2669
|
dimensionLinkage: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
2361
2670
|
enable: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
2362
2671
|
showTooltip: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { zLocale } from "../../i18n/index.js";
|
|
3
|
-
import { zAnnotationArea, zAnnotationHorizontalLine, zAnnotationPoint, zAnnotationVerticalLine, zAreaStyle, zBackgroundColor, zBrush, zColor, zCrosshairLine, zDataset, zDimensionLinkage, zDimensions, zEncoding, zLabel, zLegend, zLineStyle, zMeasures, zPage, zPointStyle, zTheme, zTooltip, zXBandAxis, zYLinearAxis } from "../../properties/index.js";
|
|
3
|
+
import { zAnnotationArea, zAnnotationDifferenceLine, zAnnotationHorizontalLine, zAnnotationPoint, zAnnotationVerticalLine, zAreaStyle, zBackgroundColor, zBrush, zColor, zCrosshairLine, zDataset, zDimensionLinkage, zDimensions, zEncoding, zLabel, zLegend, zLineStyle, zMeasures, zPage, zPointStyle, zRegionPadding, zTheme, zTooltip, zXBandAxis, zYLinearAxis } from "../../properties/index.js";
|
|
4
4
|
const zArea = z.object({
|
|
5
5
|
chartType: z.literal('area'),
|
|
6
6
|
dataset: zDataset.nullish(),
|
|
@@ -12,6 +12,7 @@ const zArea = z.object({
|
|
|
12
12
|
color: zColor.nullish(),
|
|
13
13
|
label: zLabel.nullish(),
|
|
14
14
|
legend: zLegend.nullish(),
|
|
15
|
+
regionPadding: zRegionPadding.nullish(),
|
|
15
16
|
tooltip: zTooltip.nullish(),
|
|
16
17
|
brush: zBrush.nullish(),
|
|
17
18
|
xAxis: zXBandAxis.nullish(),
|
|
@@ -25,6 +26,7 @@ const zArea = z.object({
|
|
|
25
26
|
annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
|
|
26
27
|
annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
|
|
27
28
|
annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).nullish(),
|
|
29
|
+
annotationDifferenceLine: z.array(zAnnotationDifferenceLine).or(zAnnotationDifferenceLine).nullish(),
|
|
28
30
|
dimensionLinkage: zDimensionLinkage.nullish(),
|
|
29
31
|
locale: zLocale.nullish()
|
|
30
32
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types/chartType/area/zArea.js","sources":["../../../../../src/types/chartType/area/zArea.ts"],"sourcesContent":["import { z } from 'zod'\nimport { zLocale } from '../../i18n'\nimport {\n zAnnotationArea,\n zAnnotationHorizontalLine,\n zAnnotationPoint,\n zAnnotationVerticalLine,\n zAreaStyle,\n zBackgroundColor,\n zColor,\n zCrosshairLine,\n zDataset,\n zDimensionLinkage,\n zDimensions,\n zEncoding,\n zLabel,\n zLegend,\n zLineStyle,\n zMeasures,\n zPointStyle,\n zTheme,\n zTooltip,\n zBrush,\n zXBandAxis,\n zYLinearAxis,\n zPage,\n} from '../../properties'\n\nexport const zArea = z.object({\n chartType: z.literal('area'),\n dataset: zDataset.nullish(),\n encoding: zEncoding.nullish(),\n dimensions: zDimensions.nullish(),\n measures: zMeasures.nullish(),\n page: zPage.nullish(),\n\n backgroundColor: zBackgroundColor.nullish(),\n color: zColor.nullish(),\n label: zLabel.nullish(),\n legend: zLegend.nullish(),\n tooltip: zTooltip.nullish(),\n brush: zBrush.nullish(),\n xAxis: zXBandAxis.nullish(),\n yAxis: zYLinearAxis.nullish(),\n crosshairLine: zCrosshairLine.nullish(),\n theme: zTheme.nullish(),\n pointStyle: z.array(zPointStyle).or(zPointStyle).nullish(),\n lineStyle: z.array(zLineStyle).or(zLineStyle).nullish(),\n areaStyle: z.array(zAreaStyle).or(zAreaStyle).nullish(),\n annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).nullish(),\n annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),\n annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),\n annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).nullish(),\n dimensionLinkage: zDimensionLinkage.nullish(),\n locale: zLocale.nullish(),\n})\n"],"names":["zArea","z","zDataset","zEncoding","zDimensions","zMeasures","zPage","zBackgroundColor","zColor","zLabel","zLegend","zTooltip","zBrush","zXBandAxis","zYLinearAxis","zCrosshairLine","zTheme","zPointStyle","zLineStyle","zAreaStyle","zAnnotationPoint","zAnnotationVerticalLine","zAnnotationHorizontalLine","zAnnotationArea","zDimensionLinkage","zLocale"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"types/chartType/area/zArea.js","sources":["../../../../../src/types/chartType/area/zArea.ts"],"sourcesContent":["import { z } from 'zod'\nimport { zLocale } from '../../i18n'\nimport {\n zAnnotationArea,\n zAnnotationDifferenceLine,\n zAnnotationHorizontalLine,\n zAnnotationPoint,\n zAnnotationVerticalLine,\n zAreaStyle,\n zBackgroundColor,\n zColor,\n zCrosshairLine,\n zDataset,\n zDimensionLinkage,\n zDimensions,\n zEncoding,\n zLabel,\n zLegend,\n zLineStyle,\n zMeasures,\n zPointStyle,\n zRegionPadding,\n zTheme,\n zTooltip,\n zBrush,\n zXBandAxis,\n zYLinearAxis,\n zPage,\n} from '../../properties'\n\nexport const zArea = z.object({\n chartType: z.literal('area'),\n dataset: zDataset.nullish(),\n encoding: zEncoding.nullish(),\n dimensions: zDimensions.nullish(),\n measures: zMeasures.nullish(),\n page: zPage.nullish(),\n\n backgroundColor: zBackgroundColor.nullish(),\n color: zColor.nullish(),\n label: zLabel.nullish(),\n legend: zLegend.nullish(),\n regionPadding: zRegionPadding.nullish(),\n tooltip: zTooltip.nullish(),\n brush: zBrush.nullish(),\n xAxis: zXBandAxis.nullish(),\n yAxis: zYLinearAxis.nullish(),\n crosshairLine: zCrosshairLine.nullish(),\n theme: zTheme.nullish(),\n pointStyle: z.array(zPointStyle).or(zPointStyle).nullish(),\n lineStyle: z.array(zLineStyle).or(zLineStyle).nullish(),\n areaStyle: z.array(zAreaStyle).or(zAreaStyle).nullish(),\n annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).nullish(),\n annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),\n annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),\n annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).nullish(),\n annotationDifferenceLine: z.array(zAnnotationDifferenceLine).or(zAnnotationDifferenceLine).nullish(),\n dimensionLinkage: zDimensionLinkage.nullish(),\n locale: zLocale.nullish(),\n})\n"],"names":["zArea","z","zDataset","zEncoding","zDimensions","zMeasures","zPage","zBackgroundColor","zColor","zLabel","zLegend","zRegionPadding","zTooltip","zBrush","zXBandAxis","zYLinearAxis","zCrosshairLine","zTheme","zPointStyle","zLineStyle","zAreaStyle","zAnnotationPoint","zAnnotationVerticalLine","zAnnotationHorizontalLine","zAnnotationArea","zAnnotationDifferenceLine","zDimensionLinkage","zLocale"],"mappings":";;;AA8BO,MAAMA,QAAQC,EAAE,MAAM,CAAC;IAC5B,WAAWA,EAAE,OAAO,CAAC;IACrB,SAASC,SAAS,OAAO;IACzB,UAAUC,UAAU,OAAO;IAC3B,YAAYC,YAAY,OAAO;IAC/B,UAAUC,UAAU,OAAO;IAC3B,MAAMC,MAAM,OAAO;IAEnB,iBAAiBC,iBAAiB,OAAO;IACzC,OAAOC,OAAO,OAAO;IACrB,OAAOC,OAAO,OAAO;IACrB,QAAQC,QAAQ,OAAO;IACvB,eAAeC,eAAe,OAAO;IACrC,SAASC,SAAS,OAAO;IACzB,OAAOC,OAAO,OAAO;IACrB,OAAOC,WAAW,OAAO;IACzB,OAAOC,aAAa,OAAO;IAC3B,eAAeC,eAAe,OAAO;IACrC,OAAOC,OAAO,OAAO;IACrB,YAAYhB,EAAE,KAAK,CAACiB,aAAa,EAAE,CAACA,aAAa,OAAO;IACxD,WAAWjB,EAAE,KAAK,CAACkB,YAAY,EAAE,CAACA,YAAY,OAAO;IACrD,WAAWlB,EAAE,KAAK,CAACmB,YAAY,EAAE,CAACA,YAAY,OAAO;IACrD,iBAAiBnB,EAAE,KAAK,CAACoB,kBAAkB,EAAE,CAACA,kBAAkB,OAAO;IACvE,wBAAwBpB,EAAE,KAAK,CAACqB,yBAAyB,EAAE,CAACA,yBAAyB,OAAO;IAC5F,0BAA0BrB,EAAE,KAAK,CAACsB,2BAA2B,EAAE,CAACA,2BAA2B,OAAO;IAClG,gBAAgBtB,EAAE,KAAK,CAACuB,iBAAiB,EAAE,CAACA,iBAAiB,OAAO;IACpE,0BAA0BvB,EAAE,KAAK,CAACwB,2BAA2B,EAAE,CAACA,2BAA2B,OAAO;IAClG,kBAAkBC,kBAAkB,OAAO;IAC3C,QAAQC,QAAQ,OAAO;AACzB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Locale } from '../../i18n';
|
|
2
|
-
import type { AnnotationArea, AnnotationHorizontalLine, AnnotationPoint, AnnotationVerticalLine, AreaStyle, BackgroundColor, Brush, Color, Dataset, Label, Legend, LineStyle, PointStyle, Theme, Tooltip, XBandAxis, YLinearAxis, CrosshairLine, Sort, SortLegend, DimensionLinkage, ColumnDimension, ColumnMeasure, Page } from '../../properties';
|
|
2
|
+
import type { AnnotationArea, AnnotationHorizontalLine, AnnotationPoint, AnnotationVerticalLine, AreaStyle, BackgroundColor, Brush, Color, Dataset, Label, Legend, LineStyle, PointStyle, Theme, Tooltip, XBandAxis, YLinearAxis, CrosshairLine, Sort, SortLegend, DimensionLinkage, ColumnDimension, ColumnMeasure, Page, RegionPadding } from '../../properties';
|
|
3
3
|
/**
|
|
4
4
|
* @description 百分比面积图,适用于展示多类别占比随时间变化的趋势,Y轴以百分比形式展示占比关系
|
|
5
5
|
* 适用场景:
|
|
@@ -77,6 +77,11 @@ export interface AreaPercent {
|
|
|
77
77
|
* @description 图例配置, 用于定义图表的图例, 包括图例的位置, 格式, 样式等.
|
|
78
78
|
*/
|
|
79
79
|
legend?: Legend;
|
|
80
|
+
/**
|
|
81
|
+
* 绘图区内边距
|
|
82
|
+
* @description 映射到 VChart 的 region[0].padding,用于为标注、标签等绘图区外扩元素预留空间。
|
|
83
|
+
*/
|
|
84
|
+
regionPadding?: RegionPadding;
|
|
80
85
|
/**
|
|
81
86
|
* 提示信息
|
|
82
87
|
* @description 提示信息配置, 用于定义图表的提示信息, 包括提示信息的位置, 格式, 样式等.
|
|
@@ -422,6 +422,12 @@ export declare const zAreaPercent: z.ZodObject<{
|
|
|
422
422
|
labelFontSize: z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodNumber>>>;
|
|
423
423
|
labelFontWeight: z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>>;
|
|
424
424
|
}, z.core.$strip>>>;
|
|
425
|
+
regionPadding: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodObject<{
|
|
426
|
+
top: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
427
|
+
right: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
428
|
+
bottom: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
429
|
+
left: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
430
|
+
}, z.core.$strip>]>>>;
|
|
425
431
|
tooltip: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
426
432
|
enable: z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodBoolean>>>;
|
|
427
433
|
borderColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { zLocale } from "../../i18n/index.js";
|
|
2
|
-
import { zAnnotationArea, zAnnotationHorizontalLine, zAnnotationPoint, zAnnotationVerticalLine, zAreaStyle, zBackgroundColor, zBrush, zColor, zCrosshairLine, zDataset, zDimensionLinkage, zDimensions, zEncoding, zLabel, zLegend, zLineStyle, zMeasures, zPage, zPointStyle, zTheme, zTooltip, zXBandAxis, zYLinearAxis } from "../../properties/index.js";
|
|
2
|
+
import { zAnnotationArea, zAnnotationHorizontalLine, zAnnotationPoint, zAnnotationVerticalLine, zAreaStyle, zBackgroundColor, zBrush, zColor, zCrosshairLine, zDataset, zDimensionLinkage, zDimensions, zEncoding, zLabel, zLegend, zLineStyle, zMeasures, zPage, zPointStyle, zRegionPadding, zTheme, zTooltip, zXBandAxis, zYLinearAxis } from "../../properties/index.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
const zAreaPercent = z.object({
|
|
5
5
|
chartType: z.literal('areaPercent'),
|
|
@@ -12,6 +12,7 @@ const zAreaPercent = z.object({
|
|
|
12
12
|
color: zColor.nullish(),
|
|
13
13
|
label: zLabel.nullish(),
|
|
14
14
|
legend: zLegend.nullish(),
|
|
15
|
+
regionPadding: zRegionPadding.nullish(),
|
|
15
16
|
tooltip: zTooltip.nullish(),
|
|
16
17
|
brush: zBrush.nullish(),
|
|
17
18
|
xAxis: zXBandAxis.nullish(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types/chartType/areaPercent/zAreaPercent.js","sources":["../../../../../src/types/chartType/areaPercent/zAreaPercent.ts"],"sourcesContent":["import { zLocale } from '../../i18n'\nimport {\n zAnnotationArea,\n zAnnotationHorizontalLine,\n zAnnotationPoint,\n zAnnotationVerticalLine,\n zAreaStyle,\n zBackgroundColor,\n zColor,\n zCrosshairLine,\n zDataset,\n zDimensionLinkage,\n zDimensions,\n zEncoding,\n zLabel,\n zLegend,\n zLineStyle,\n zMeasures,\n zPointStyle,\n zTheme,\n zTooltip,\n zBrush,\n zXBandAxis,\n zYLinearAxis,\n zPage,\n} from '../../properties'\n\nimport { z } from 'zod'\n\nexport const zAreaPercent = z.object({\n chartType: z.literal('areaPercent'),\n dataset: zDataset.nullish(),\n encoding: zEncoding.nullish(),\n dimensions: zDimensions.nullish(),\n measures: zMeasures.nullish(),\n page: zPage.nullish(),\n\n backgroundColor: zBackgroundColor.nullish(),\n color: zColor.nullish(),\n label: zLabel.nullish(),\n legend: zLegend.nullish(),\n tooltip: zTooltip.nullish(),\n brush: zBrush.nullish(),\n xAxis: zXBandAxis.nullish(),\n yAxis: zYLinearAxis.nullish(),\n crosshairLine: zCrosshairLine.nullish(),\n theme: zTheme.nullish(),\n pointStyle: z.array(zPointStyle).or(zPointStyle).nullish(),\n lineStyle: z.array(zLineStyle).or(zLineStyle).nullish(),\n areaStyle: z.array(zAreaStyle).or(zAreaStyle).nullish(),\n annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).nullish(),\n annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),\n annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),\n annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).nullish(),\n dimensionLinkage: zDimensionLinkage.nullish(),\n locale: zLocale.nullish(),\n})\n"],"names":["zAreaPercent","z","zDataset","zEncoding","zDimensions","zMeasures","zPage","zBackgroundColor","zColor","zLabel","zLegend","zTooltip","zBrush","zXBandAxis","zYLinearAxis","zCrosshairLine","zTheme","zPointStyle","zLineStyle","zAreaStyle","zAnnotationPoint","zAnnotationVerticalLine","zAnnotationHorizontalLine","zAnnotationArea","zDimensionLinkage","zLocale"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"types/chartType/areaPercent/zAreaPercent.js","sources":["../../../../../src/types/chartType/areaPercent/zAreaPercent.ts"],"sourcesContent":["import { zLocale } from '../../i18n'\nimport {\n zAnnotationArea,\n zAnnotationHorizontalLine,\n zAnnotationPoint,\n zAnnotationVerticalLine,\n zAreaStyle,\n zBackgroundColor,\n zColor,\n zCrosshairLine,\n zDataset,\n zDimensionLinkage,\n zDimensions,\n zEncoding,\n zLabel,\n zLegend,\n zLineStyle,\n zMeasures,\n zPointStyle,\n zRegionPadding,\n zTheme,\n zTooltip,\n zBrush,\n zXBandAxis,\n zYLinearAxis,\n zPage,\n} from '../../properties'\n\nimport { z } from 'zod'\n\nexport const zAreaPercent = z.object({\n chartType: z.literal('areaPercent'),\n dataset: zDataset.nullish(),\n encoding: zEncoding.nullish(),\n dimensions: zDimensions.nullish(),\n measures: zMeasures.nullish(),\n page: zPage.nullish(),\n\n backgroundColor: zBackgroundColor.nullish(),\n color: zColor.nullish(),\n label: zLabel.nullish(),\n legend: zLegend.nullish(),\n regionPadding: zRegionPadding.nullish(),\n tooltip: zTooltip.nullish(),\n brush: zBrush.nullish(),\n xAxis: zXBandAxis.nullish(),\n yAxis: zYLinearAxis.nullish(),\n crosshairLine: zCrosshairLine.nullish(),\n theme: zTheme.nullish(),\n pointStyle: z.array(zPointStyle).or(zPointStyle).nullish(),\n lineStyle: z.array(zLineStyle).or(zLineStyle).nullish(),\n areaStyle: z.array(zAreaStyle).or(zAreaStyle).nullish(),\n annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).nullish(),\n annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),\n annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),\n annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).nullish(),\n dimensionLinkage: zDimensionLinkage.nullish(),\n locale: zLocale.nullish(),\n})\n"],"names":["zAreaPercent","z","zDataset","zEncoding","zDimensions","zMeasures","zPage","zBackgroundColor","zColor","zLabel","zLegend","zRegionPadding","zTooltip","zBrush","zXBandAxis","zYLinearAxis","zCrosshairLine","zTheme","zPointStyle","zLineStyle","zAreaStyle","zAnnotationPoint","zAnnotationVerticalLine","zAnnotationHorizontalLine","zAnnotationArea","zDimensionLinkage","zLocale"],"mappings":";;;AA8BO,MAAMA,eAAeC,EAAE,MAAM,CAAC;IACnC,WAAWA,EAAE,OAAO,CAAC;IACrB,SAASC,SAAS,OAAO;IACzB,UAAUC,UAAU,OAAO;IAC3B,YAAYC,YAAY,OAAO;IAC/B,UAAUC,UAAU,OAAO;IAC3B,MAAMC,MAAM,OAAO;IAEnB,iBAAiBC,iBAAiB,OAAO;IACzC,OAAOC,OAAO,OAAO;IACrB,OAAOC,OAAO,OAAO;IACrB,QAAQC,QAAQ,OAAO;IACvB,eAAeC,eAAe,OAAO;IACrC,SAASC,SAAS,OAAO;IACzB,OAAOC,OAAO,OAAO;IACrB,OAAOC,WAAW,OAAO;IACzB,OAAOC,aAAa,OAAO;IAC3B,eAAeC,eAAe,OAAO;IACrC,OAAOC,OAAO,OAAO;IACrB,YAAYhB,EAAE,KAAK,CAACiB,aAAa,EAAE,CAACA,aAAa,OAAO;IACxD,WAAWjB,EAAE,KAAK,CAACkB,YAAY,EAAE,CAACA,YAAY,OAAO;IACrD,WAAWlB,EAAE,KAAK,CAACmB,YAAY,EAAE,CAACA,YAAY,OAAO;IACrD,iBAAiBnB,EAAE,KAAK,CAACoB,kBAAkB,EAAE,CAACA,kBAAkB,OAAO;IACvE,wBAAwBpB,EAAE,KAAK,CAACqB,yBAAyB,EAAE,CAACA,yBAAyB,OAAO;IAC5F,0BAA0BrB,EAAE,KAAK,CAACsB,2BAA2B,EAAE,CAACA,2BAA2B,OAAO;IAClG,gBAAgBtB,EAAE,KAAK,CAACuB,iBAAiB,EAAE,CAACA,iBAAiB,OAAO;IACpE,kBAAkBC,kBAAkB,OAAO;IAC3C,QAAQC,QAAQ,OAAO;AACzB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Locale } from '../../i18n';
|
|
2
|
-
import type { BarDimension, BarMaxWidth, BarMeasure, DimensionLinkage, Sort, SortLegend } from '../../properties';
|
|
2
|
+
import type { BarDimension, BarMaxWidth, BarMeasure, DimensionLinkage, RegionPadding, Sort, SortLegend } from '../../properties';
|
|
3
3
|
import { type AnnotationArea, type AnnotationDifferenceLine, type AnnotationHorizontalLine, type AnnotationPoint, type AnnotationVerticalLine, type BackgroundColor, type Brush, type BarStyle, type Color, type CrosshairRect, type Dataset, type Label, type Legend, type StackCornerRadius, type Theme, type Tooltip, type XLinearAxis, type YBandAxis, type Page } from '../../properties';
|
|
4
4
|
/**
|
|
5
5
|
* @description 条形图,适用于横向数据对比场景,Y轴为类目轴(分类数据),X轴为数值轴(连续数据),柱子横向排列
|
|
@@ -72,6 +72,11 @@ export interface Bar {
|
|
|
72
72
|
* @description 图例配置, 用于定义图表的图例, 包括图例的位置, 格式, 样式等.
|
|
73
73
|
*/
|
|
74
74
|
legend?: Legend;
|
|
75
|
+
/**
|
|
76
|
+
* 绘图区内边距
|
|
77
|
+
* @description 映射到 VChart 的 region[0].padding,用于为标注、标签等绘图区外扩元素预留空间。
|
|
78
|
+
*/
|
|
79
|
+
regionPadding?: RegionPadding;
|
|
75
80
|
/**
|
|
76
81
|
* @description 提示信息配置, 用于定义图表的提示信息, 包括提示信息的位置, 格式, 样式等.
|
|
77
82
|
*/
|
|
@@ -422,6 +422,12 @@ export declare const zBar: z.ZodObject<{
|
|
|
422
422
|
labelFontSize: z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodNumber>>>;
|
|
423
423
|
labelFontWeight: z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>>;
|
|
424
424
|
}, z.core.$strip>>>;
|
|
425
|
+
regionPadding: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodObject<{
|
|
426
|
+
top: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
427
|
+
right: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
428
|
+
bottom: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
429
|
+
left: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
430
|
+
}, z.core.$strip>]>>>;
|
|
425
431
|
tooltip: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
426
432
|
enable: z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodBoolean>>>;
|
|
427
433
|
borderColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { zLocale } from "../../i18n/index.js";
|
|
2
|
-
import { zAnnotationArea, zAnnotationDifferenceLine, zAnnotationHorizontalLine, zAnnotationPoint, zAnnotationVerticalLine, zBackgroundColor, zBarMaxWidth, zBarStyle, zBrush, zColor, zCrosshairRect, zDataset, zDimensionLinkage, zDimensions, zEncoding, zLabel, zLegend, zMeasures, zPage, zStackCornerRadius, zTheme, zTooltip, zXLinearAxis, zYBandAxis } from "../../properties/index.js";
|
|
2
|
+
import { zAnnotationArea, zAnnotationDifferenceLine, zAnnotationHorizontalLine, zAnnotationPoint, zAnnotationVerticalLine, zBackgroundColor, zBarMaxWidth, zBarStyle, zBrush, zColor, zCrosshairRect, zDataset, zDimensionLinkage, zDimensions, zEncoding, zLabel, zLegend, zMeasures, zPage, zRegionPadding, zStackCornerRadius, zTheme, zTooltip, zXLinearAxis, zYBandAxis } from "../../properties/index.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
const zBar = z.object({
|
|
5
5
|
chartType: z.literal('bar'),
|
|
@@ -12,6 +12,7 @@ const zBar = z.object({
|
|
|
12
12
|
color: zColor.nullish(),
|
|
13
13
|
label: zLabel.nullish(),
|
|
14
14
|
legend: zLegend.nullish(),
|
|
15
|
+
regionPadding: zRegionPadding.nullish(),
|
|
15
16
|
tooltip: zTooltip.nullish(),
|
|
16
17
|
brush: zBrush.nullish(),
|
|
17
18
|
xAxis: zXLinearAxis.nullish(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types/chartType/bar/zBar.js","sources":["../../../../../src/types/chartType/bar/zBar.ts"],"sourcesContent":["import { zLocale } from '../../i18n'\nimport {\n zAnnotationArea,\n zAnnotationDifferenceLine,\n zAnnotationHorizontalLine,\n zAnnotationPoint,\n zAnnotationVerticalLine,\n zBackgroundColor,\n zBarMaxWidth,\n zBarStyle,\n zColor,\n zCrosshairRect,\n zDataset,\n zDimensionLinkage,\n zDimensions,\n zEncoding,\n zLabel,\n zLegend,\n zMeasures,\n zStackCornerRadius,\n zTheme,\n zTooltip,\n zBrush,\n zXLinearAxis,\n zYBandAxis,\n zPage,\n} from '../../properties'\n\nimport { z } from 'zod'\n\nexport const zBar = z.object({\n chartType: z.literal('bar'),\n dataset: zDataset.nullish(),\n encoding: zEncoding.nullish(),\n dimensions: zDimensions.nullish(),\n measures: zMeasures.nullish(),\n page: zPage.nullish(),\n\n backgroundColor: zBackgroundColor.nullish(),\n color: zColor.nullish(),\n label: zLabel.nullish(),\n legend: zLegend.nullish(),\n tooltip: zTooltip.nullish(),\n brush: zBrush.nullish(),\n xAxis: zXLinearAxis.nullish(),\n yAxis: zYBandAxis.nullish(),\n crosshairRect: zCrosshairRect.nullish(),\n stackCornerRadius: zStackCornerRadius.nullish(),\n barMaxWidth: zBarMaxWidth.nullish(),\n theme: zTheme.nullish(),\n barStyle: z.array(zBarStyle).or(zBarStyle).nullish(),\n annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).nullish(),\n annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),\n annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),\n annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).nullish(),\n annotationDifferenceLine: z.array(zAnnotationDifferenceLine).or(zAnnotationDifferenceLine).nullish(),\n dimensionLinkage: zDimensionLinkage.nullish(),\n locale: zLocale.nullish(),\n})\n"],"names":["zBar","z","zDataset","zEncoding","zDimensions","zMeasures","zPage","zBackgroundColor","zColor","zLabel","zLegend","zTooltip","zBrush","zXLinearAxis","zYBandAxis","zCrosshairRect","zStackCornerRadius","zBarMaxWidth","zTheme","zBarStyle","zAnnotationPoint","zAnnotationVerticalLine","zAnnotationHorizontalLine","zAnnotationArea","zAnnotationDifferenceLine","zDimensionLinkage","zLocale"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"types/chartType/bar/zBar.js","sources":["../../../../../src/types/chartType/bar/zBar.ts"],"sourcesContent":["import { zLocale } from '../../i18n'\nimport {\n zAnnotationArea,\n zAnnotationDifferenceLine,\n zAnnotationHorizontalLine,\n zAnnotationPoint,\n zAnnotationVerticalLine,\n zBackgroundColor,\n zBarMaxWidth,\n zBarStyle,\n zColor,\n zCrosshairRect,\n zDataset,\n zDimensionLinkage,\n zDimensions,\n zEncoding,\n zLabel,\n zLegend,\n zMeasures,\n zRegionPadding,\n zStackCornerRadius,\n zTheme,\n zTooltip,\n zBrush,\n zXLinearAxis,\n zYBandAxis,\n zPage,\n} from '../../properties'\n\nimport { z } from 'zod'\n\nexport const zBar = z.object({\n chartType: z.literal('bar'),\n dataset: zDataset.nullish(),\n encoding: zEncoding.nullish(),\n dimensions: zDimensions.nullish(),\n measures: zMeasures.nullish(),\n page: zPage.nullish(),\n\n backgroundColor: zBackgroundColor.nullish(),\n color: zColor.nullish(),\n label: zLabel.nullish(),\n legend: zLegend.nullish(),\n regionPadding: zRegionPadding.nullish(),\n tooltip: zTooltip.nullish(),\n brush: zBrush.nullish(),\n xAxis: zXLinearAxis.nullish(),\n yAxis: zYBandAxis.nullish(),\n crosshairRect: zCrosshairRect.nullish(),\n stackCornerRadius: zStackCornerRadius.nullish(),\n barMaxWidth: zBarMaxWidth.nullish(),\n theme: zTheme.nullish(),\n barStyle: z.array(zBarStyle).or(zBarStyle).nullish(),\n annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).nullish(),\n annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),\n annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),\n annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).nullish(),\n annotationDifferenceLine: z.array(zAnnotationDifferenceLine).or(zAnnotationDifferenceLine).nullish(),\n dimensionLinkage: zDimensionLinkage.nullish(),\n locale: zLocale.nullish(),\n})\n"],"names":["zBar","z","zDataset","zEncoding","zDimensions","zMeasures","zPage","zBackgroundColor","zColor","zLabel","zLegend","zRegionPadding","zTooltip","zBrush","zXLinearAxis","zYBandAxis","zCrosshairRect","zStackCornerRadius","zBarMaxWidth","zTheme","zBarStyle","zAnnotationPoint","zAnnotationVerticalLine","zAnnotationHorizontalLine","zAnnotationArea","zAnnotationDifferenceLine","zDimensionLinkage","zLocale"],"mappings":";;;AA+BO,MAAMA,OAAOC,EAAE,MAAM,CAAC;IAC3B,WAAWA,EAAE,OAAO,CAAC;IACrB,SAASC,SAAS,OAAO;IACzB,UAAUC,UAAU,OAAO;IAC3B,YAAYC,YAAY,OAAO;IAC/B,UAAUC,UAAU,OAAO;IAC3B,MAAMC,MAAM,OAAO;IAEnB,iBAAiBC,iBAAiB,OAAO;IACzC,OAAOC,OAAO,OAAO;IACrB,OAAOC,OAAO,OAAO;IACrB,QAAQC,QAAQ,OAAO;IACvB,eAAeC,eAAe,OAAO;IACrC,SAASC,SAAS,OAAO;IACzB,OAAOC,OAAO,OAAO;IACrB,OAAOC,aAAa,OAAO;IAC3B,OAAOC,WAAW,OAAO;IACzB,eAAeC,eAAe,OAAO;IACrC,mBAAmBC,mBAAmB,OAAO;IAC7C,aAAaC,aAAa,OAAO;IACjC,OAAOC,OAAO,OAAO;IACrB,UAAUlB,EAAE,KAAK,CAACmB,WAAW,EAAE,CAACA,WAAW,OAAO;IAClD,iBAAiBnB,EAAE,KAAK,CAACoB,kBAAkB,EAAE,CAACA,kBAAkB,OAAO;IACvE,wBAAwBpB,EAAE,KAAK,CAACqB,yBAAyB,EAAE,CAACA,yBAAyB,OAAO;IAC5F,0BAA0BrB,EAAE,KAAK,CAACsB,2BAA2B,EAAE,CAACA,2BAA2B,OAAO;IAClG,gBAAgBtB,EAAE,KAAK,CAACuB,iBAAiB,EAAE,CAACA,iBAAiB,OAAO;IACpE,0BAA0BvB,EAAE,KAAK,CAACwB,2BAA2B,EAAE,CAACA,2BAA2B,OAAO;IAClG,kBAAkBC,kBAAkB,OAAO;IAC3C,QAAQC,QAAQ,OAAO;AACzB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Locale } from '../../i18n';
|
|
2
|
-
import type { AnnotationArea, AnnotationDifferenceLine, AnnotationHorizontalLine, AnnotationPoint, AnnotationVerticalLine, BackgroundColor, Brush, BarStyle, Color, CrosshairRect, Dataset, Label, Legend, StackCornerRadius, Theme, Tooltip, XLinearAxis, YBandAxis, Sort, SortLegend, BarMaxWidth, BarGapInGroup, DimensionLinkage, BarDimension, BarMeasure, Page } from '../../properties';
|
|
2
|
+
import type { AnnotationArea, AnnotationDifferenceLine, AnnotationHorizontalLine, AnnotationPoint, AnnotationVerticalLine, BackgroundColor, Brush, BarStyle, Color, CrosshairRect, Dataset, Label, Legend, StackCornerRadius, Theme, Tooltip, XLinearAxis, YBandAxis, Sort, SortLegend, BarMaxWidth, BarGapInGroup, DimensionLinkage, BarDimension, BarMeasure, Page, RegionPadding } from '../../properties';
|
|
3
3
|
/**
|
|
4
4
|
* @description 并列条形图,适用于多指标横向并行对比场景,多个条形平行排列展示不同指标值
|
|
5
5
|
* 适用场景:
|
|
@@ -69,6 +69,11 @@ export interface BarParallel {
|
|
|
69
69
|
* @description 图例配置, 用于定义图表的图例, 包括图例的位置, 格式, 样式等.
|
|
70
70
|
*/
|
|
71
71
|
legend?: Legend;
|
|
72
|
+
/**
|
|
73
|
+
* 绘图区内边距
|
|
74
|
+
* @description 映射到 VChart 的 region[0].padding,用于为标注、标签等绘图区外扩元素预留空间。
|
|
75
|
+
*/
|
|
76
|
+
regionPadding?: RegionPadding;
|
|
72
77
|
/**
|
|
73
78
|
* @description 提示信息配置, 用于定义图表的提示信息, 包括提示信息的位置, 格式, 样式等.
|
|
74
79
|
*/
|
|
@@ -418,6 +418,12 @@ export declare const zBarParallel: z.ZodObject<{
|
|
|
418
418
|
labelFontSize: z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodNumber>>>;
|
|
419
419
|
labelFontWeight: z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>>;
|
|
420
420
|
}, z.core.$strip>>>;
|
|
421
|
+
regionPadding: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodObject<{
|
|
422
|
+
top: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
423
|
+
right: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
424
|
+
bottom: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
425
|
+
left: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
426
|
+
}, z.core.$strip>]>>>;
|
|
421
427
|
tooltip: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
422
428
|
enable: z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodBoolean>>>;
|
|
423
429
|
borderColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { zLocale } from "../../i18n/index.js";
|
|
3
|
-
import { zAnnotationArea, zAnnotationDifferenceLine, zAnnotationHorizontalLine, zAnnotationPoint, zAnnotationVerticalLine, zBackgroundColor, zBarGapInGroup, zBarMaxWidth, zBarStyle, zBrush, zColor, zCrosshairRect, zDataset, zDimensionLinkage, zDimensions, zEncoding, zLabel, zLegend, zMeasures, zPage, zStackCornerRadius, zTheme, zTooltip, zXLinearAxis, zYBandAxis } from "../../properties/index.js";
|
|
3
|
+
import { zAnnotationArea, zAnnotationDifferenceLine, zAnnotationHorizontalLine, zAnnotationPoint, zAnnotationVerticalLine, zBackgroundColor, zBarGapInGroup, zBarMaxWidth, zBarStyle, zBrush, zColor, zCrosshairRect, zDataset, zDimensionLinkage, zDimensions, zEncoding, zLabel, zLegend, zMeasures, zPage, zRegionPadding, zStackCornerRadius, zTheme, zTooltip, zXLinearAxis, zYBandAxis } from "../../properties/index.js";
|
|
4
4
|
const zBarParallel = z.object({
|
|
5
5
|
chartType: z.literal('barParallel'),
|
|
6
6
|
dataset: zDataset.nullish(),
|
|
@@ -11,6 +11,7 @@ const zBarParallel = z.object({
|
|
|
11
11
|
color: zColor.nullish(),
|
|
12
12
|
label: zLabel.nullish(),
|
|
13
13
|
legend: zLegend.nullish(),
|
|
14
|
+
regionPadding: zRegionPadding.nullish(),
|
|
14
15
|
tooltip: zTooltip.nullish(),
|
|
15
16
|
brush: zBrush.nullish(),
|
|
16
17
|
xAxis: zXLinearAxis.nullish(),
|