@visactor/vseed 0.0.7 → 0.0.8

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 (40) hide show
  1. package/dist/builder/builder/builder.d.ts +5752 -0
  2. package/dist/dataReshape/index.d.ts +1 -0
  3. package/dist/index.cjs +979 -168
  4. package/dist/index.cjs.map +1 -1
  5. package/dist/index.js +946 -168
  6. package/dist/index.js.map +1 -1
  7. package/dist/pipeline/advanced/pipes/config/config.d.ts +11 -0
  8. package/dist/pipeline/advanced/pipes/config/index.d.ts +1 -0
  9. package/dist/pipeline/advanced/pipes/index.d.ts +2 -1
  10. package/dist/types/advancedVSeed.d.ts +1438 -0
  11. package/dist/types/chartType/area/area.d.ts +11 -1
  12. package/dist/types/chartType/areaPercent/areaPercent.d.ts +11 -1
  13. package/dist/types/chartType/bar/bar.d.ts +11 -1
  14. package/dist/types/chartType/barParallel/barParallel.d.ts +11 -1
  15. package/dist/types/chartType/barPercent/barPercent.d.ts +11 -1
  16. package/dist/types/chartType/column/column.d.ts +11 -1
  17. package/dist/types/chartType/columnParallel/columnParallel.d.ts +11 -1
  18. package/dist/types/chartType/columnPercent/columnPercent.d.ts +11 -1
  19. package/dist/types/chartType/donut/donut.d.ts +1 -1
  20. package/dist/types/chartType/dualAxis/dualAxis.d.ts +1 -1
  21. package/dist/types/chartType/line/line.d.ts +11 -1
  22. package/dist/types/chartType/pie/pie.d.ts +4 -4
  23. package/dist/types/chartType/pivotTable/pivotTable.d.ts +1 -1
  24. package/dist/types/chartType/rose/rose.d.ts +4 -4
  25. package/dist/types/chartType/table/table.d.ts +1 -1
  26. package/dist/types/properties/chartType/index.d.ts +2 -2
  27. package/dist/types/properties/config/axis.d.ts +257 -0
  28. package/dist/types/properties/config/bandAxis.d.ts +82 -0
  29. package/dist/types/properties/config/config.d.ts +721 -0
  30. package/dist/types/properties/config/index.d.ts +4 -0
  31. package/dist/types/properties/config/linearAxis.d.ts +80 -0
  32. package/dist/types/properties/index.d.ts +1 -0
  33. package/dist/types/properties/theme/customTheme.d.ts +1438 -0
  34. package/package.json +1 -1
  35. package/dist/pipeline/advanced/pipeline/line copy.d.ts +0 -2
  36. package/dist/pipeline/advanced/pipes/encoding/encodingXY copy.d.ts +0 -2
  37. package/dist/pipeline/spec/pipes/init/line copy.d.ts +0 -2
  38. package/dist/pipeline/spec/pipes/pivotChart/pivotGridStyle copy.d.ts +0 -2
  39. package/dist/pipeline/spec/pipes/pivotChart/pivotRowDimensions copy.d.ts +0 -2
  40. /package/dist/types/properties/chartType/{zChartType.d.ts → chartType.d.ts} +0 -0
package/dist/index.cjs CHANGED
@@ -36,14 +36,20 @@ __webpack_require__.d(__webpack_exports__, {
36
36
  zMeasureGroup: ()=>zMeasureGroup,
37
37
  zUnfoldInfo: ()=>zUnfoldInfo,
38
38
  zMeasures: ()=>zMeasures,
39
+ FoldMeasureName: ()=>FoldMeasureName,
39
40
  darkTheme: ()=>darkTheme,
40
41
  columnPercentAdvancedPipeline: ()=>columnPercentAdvancedPipeline,
42
+ zAxis: ()=>zAxis,
41
43
  isVTable: ()=>isVTable,
42
44
  columnSpecPipeline: ()=>columnSpecPipeline,
43
- zFoldInfo: ()=>zFoldInfo,
45
+ UnfoldDimensionGroup: ()=>UnfoldDimensionGroup,
44
46
  zDatasetReshapeInfo: ()=>zDatasetReshapeInfo,
45
- columnParallelSpecPipeline: ()=>columnParallelSpecPipeline,
47
+ zFoldInfo: ()=>zFoldInfo,
48
+ zYBandAxis: ()=>zYBandAxis,
49
+ zYLinearAxis: ()=>zYLinearAxis,
50
+ Separator: ()=>Separator,
46
51
  columnAdvancedPipeline: ()=>columnAdvancedPipeline,
52
+ columnParallelSpecPipeline: ()=>columnParallelSpecPipeline,
47
53
  zLabel: ()=>zLabel,
48
54
  registerColumn: ()=>registerColumn,
49
55
  zDimension: ()=>zDimension,
@@ -51,6 +57,7 @@ __webpack_require__.d(__webpack_exports__, {
51
57
  registerColumnParallel: ()=>registerColumnParallel,
52
58
  isPivotChart: ()=>isPivotChart,
53
59
  zCustomTheme: ()=>zCustomTheme,
60
+ zXBandAxis: ()=>zXBandAxis,
54
61
  dataReshapeFor1D1M: ()=>dataReshapeFor1D1M,
55
62
  registerArea: ()=>registerArea,
56
63
  zDataset: ()=>zDataset,
@@ -61,9 +68,12 @@ __webpack_require__.d(__webpack_exports__, {
61
68
  zMeasure: ()=>zMeasure,
62
69
  zDimensions: ()=>zDimensions,
63
70
  zLegend: ()=>zLegend,
71
+ FoldMeasureId: ()=>FoldMeasureId,
64
72
  zTheme: ()=>zTheme,
65
73
  zEncoding: ()=>zEncoding,
66
74
  registerAreaPercent: ()=>registerAreaPercent,
75
+ zXLinearAxis: ()=>zXLinearAxis,
76
+ zConfig: ()=>zConfig,
67
77
  zDatum: ()=>zDatum,
68
78
  barAdvancedPipeline: ()=>barAdvancedPipeline,
69
79
  zCustomThemeConfig: ()=>zCustomThemeConfig,
@@ -73,15 +83,16 @@ __webpack_require__.d(__webpack_exports__, {
73
83
  foldMeasures: ()=>foldMeasures,
74
84
  dataReshapeFor2D1M: ()=>dataReshapeFor2D1M,
75
85
  registerLightTheme: ()=>registerLightTheme,
76
- registerDarkTheme: ()=>registerDarkTheme,
77
86
  zChartType: ()=>zChartType,
87
+ registerDarkTheme: ()=>registerDarkTheme,
78
88
  barParallelAdvancedPipeline: ()=>barParallelAdvancedPipeline,
89
+ FoldMeasureValue: ()=>FoldMeasureValue,
79
90
  barPercentSpecPipeline: ()=>barPercentSpecPipeline,
80
91
  lineAdvancedPipeline: ()=>lineAdvancedPipeline,
81
92
  pieSpecPipeline: ()=>pieSpecPipeline,
82
- zTooltip: ()=>zTooltip,
83
93
  barSpecPipeline: ()=>barSpecPipeline,
84
94
  lineSpecPipeline: ()=>lineSpecPipeline,
95
+ zTooltip: ()=>zTooltip,
85
96
  zBaseConfig: ()=>zBaseConfig,
86
97
  unfoldDimensions: ()=>unfoldDimensions,
87
98
  areaAdvancedPipeline: ()=>areaAdvancedPipeline,
@@ -90,6 +101,125 @@ __webpack_require__.d(__webpack_exports__, {
90
101
  barParallelSpecPipeline: ()=>barParallelSpecPipeline,
91
102
  registerAll: ()=>all_registerAll
92
103
  });
104
+ const initAdvancedVSeed = (advancedVSeed, context)=>{
105
+ const { vseed } = context;
106
+ const { chartType = 'table' } = vseed;
107
+ return {
108
+ ...advancedVSeed,
109
+ chartType
110
+ };
111
+ };
112
+ const isVTable = (chartType)=>[
113
+ 'table',
114
+ 'pivotTable'
115
+ ].includes(chartType);
116
+ const isVChart = (chartType)=>!isVTable(chartType);
117
+ const isPivotChart = (vseed)=>{
118
+ const { measures, dimensions } = vseed;
119
+ const hasRowOrColumnDimension = dimensions && dimensions.some((dimension)=>'rowDimension' === dimension.location || 'columnDimension' === dimension.location);
120
+ const hasMeasureGroup = measures && measures.find((measure)=>measure && measure.children);
121
+ return hasRowOrColumnDimension || hasMeasureGroup;
122
+ };
123
+ const autoMeasures = (advancedVSeed, context)=>{
124
+ const result = {
125
+ ...advancedVSeed
126
+ };
127
+ const { vseed } = context;
128
+ const { measures, dataset } = vseed;
129
+ if (!dataset) throw new Error('dataset is required');
130
+ if (0 === dataset.length) return result;
131
+ if (isPivotChart(vseed)) return autoMeasureGroup(advancedVSeed, context);
132
+ if (measures) {
133
+ result.measures = measures;
134
+ return result;
135
+ }
136
+ const top100dataset = dataset.slice(0, 100);
137
+ const sample = top100dataset.reduce((prev, cur)=>({
138
+ ...prev,
139
+ ...cur
140
+ }), {});
141
+ result.measures = Object.keys(sample).filter((key)=>top100dataset.some((item)=>'number' == typeof item[key]) && ![
142
+ '',
143
+ null,
144
+ void 0
145
+ ].includes(key)).map((measure)=>({
146
+ id: measure,
147
+ alias: measure
148
+ }));
149
+ return result;
150
+ };
151
+ const autoMeasureGroup = (advancedVSeed, context)=>{
152
+ const { vseed } = context;
153
+ const { measures } = vseed;
154
+ const hasMeasureGroup = measures?.some((measure)=>measure.children);
155
+ if (!measures) return advancedVSeed;
156
+ if (!hasMeasureGroup) {
157
+ const newMeasures = [
158
+ {
159
+ id: 'measureGroup',
160
+ alias: 'measureGroup',
161
+ children: measures
162
+ }
163
+ ];
164
+ return {
165
+ ...advancedVSeed,
166
+ measures: newMeasures
167
+ };
168
+ }
169
+ let currentGroup = createEmptyMeasureGroup();
170
+ const measureGroups = [];
171
+ for (const measure of measures)if ('children' in measure) {
172
+ if (currentGroup.children?.length) {
173
+ currentGroup.id = currentGroup.children.map((item)=>item.id).join('-');
174
+ currentGroup.alias = currentGroup.children.map((item)=>item.alias).join('-');
175
+ measureGroups.push(currentGroup);
176
+ currentGroup = createEmptyMeasureGroup();
177
+ }
178
+ measureGroups.push(measure);
179
+ } else currentGroup.children?.push(measure);
180
+ if (currentGroup.children?.length) {
181
+ currentGroup.id = currentGroup.children.map((item)=>item.id).join('-');
182
+ currentGroup.alias = currentGroup.children.map((item)=>item.alias).join('-');
183
+ measureGroups.push(currentGroup);
184
+ currentGroup = createEmptyMeasureGroup();
185
+ }
186
+ advancedVSeed.measures = measureGroups;
187
+ return advancedVSeed;
188
+ };
189
+ const createEmptyMeasureGroup = ()=>({
190
+ id: '',
191
+ alias: '',
192
+ children: []
193
+ });
194
+ const autoDimensions = (advancedVSeed, context)=>{
195
+ const result = {
196
+ ...advancedVSeed
197
+ };
198
+ const { vseed } = context;
199
+ const { dimensions, dataset } = vseed;
200
+ const { measures = [] } = advancedVSeed;
201
+ if (!dataset) throw new Error('dataset is required');
202
+ if (0 === dataset.length) return result;
203
+ if (dimensions) {
204
+ result.dimensions = dimensions;
205
+ return result;
206
+ }
207
+ const top100dataset = dataset.slice(0, 100);
208
+ const sample = top100dataset.reduce((prev, cur)=>({
209
+ ...prev,
210
+ ...cur
211
+ }), {});
212
+ result.dimensions = Object.keys(sample).filter((key)=>top100dataset.some((item)=>'string' == typeof item[key]) && ![
213
+ '',
214
+ null,
215
+ void 0
216
+ ].includes(key) && !measures.some((measure)=>measure.id === key)).map((dim)=>({
217
+ id: dim,
218
+ alias: dim,
219
+ location: 'dimension'
220
+ }));
221
+ return result;
222
+ };
93
223
  const FoldMeasureName = '__MeaName__';
94
224
  const FoldMeasureValue = '__MeaValue__';
95
225
  const FoldMeasureId = '__MeaId__';
@@ -374,10 +504,10 @@ const pivotReshapeTo2D1M = (advancedVSeed, context)=>{
374
504
  if (!measures) return;
375
505
  const groupId = measureGroup.id;
376
506
  const { dataset: newSubDataset, foldInfo, unfoldInfo } = dataReshapeFor2D1M(dataset, commonDimensions, measures, {
377
- foldMeasureId: FoldMeasureId + groupId,
378
- foldMeasureName: FoldMeasureName + groupId,
507
+ foldMeasureId: FoldMeasureId,
508
+ foldMeasureName: FoldMeasureName,
379
509
  foldMeasureValue: FoldMeasureValue + groupId,
380
- unfoldDimensionGroup: UnfoldDimensionGroup + groupId
510
+ unfoldDimensionGroup: UnfoldDimensionGroup
381
511
  });
382
512
  const reshapeInfo = {
383
513
  id: groupId,
@@ -500,158 +630,89 @@ const encodingPolar = (advancedVSeed)=>{
500
630
  encoding
501
631
  };
502
632
  };
503
- const initAdvancedVSeed = (advancedVSeed, context)=>{
633
+ const vchartBaseConfig = (advancedVSeed, context)=>{
504
634
  const { vseed } = context;
505
- const { chartType = 'table' } = vseed;
506
- return {
507
- ...advancedVSeed,
508
- chartType
509
- };
510
- };
511
- const isVTable = (chartType)=>[
512
- 'table',
513
- 'pivotTable'
514
- ].includes(chartType);
515
- const isVChart = (chartType)=>!isVTable(chartType);
516
- const isPivotChart = (vseed)=>{
517
- const { measures, dimensions } = vseed;
518
- const hasRowOrColumnDimension = dimensions && dimensions.some((dimension)=>'rowDimension' === dimension.location || 'columnDimension' === dimension.location);
519
- const hasMeasureGroup = measures && measures.find((measure)=>measure && measure.children);
520
- return hasRowOrColumnDimension || hasMeasureGroup;
521
- };
522
- const autoMeasures = (advancedVSeed, context)=>{
523
635
  const result = {
524
636
  ...advancedVSeed
525
637
  };
526
- const { vseed } = context;
527
- const { measures, dataset } = vseed;
528
- if (!dataset) throw new Error('dataset is required');
529
- if (0 === dataset.length) return result;
530
- if (isPivotChart(vseed)) return autoMeasureGroup(advancedVSeed, context);
531
- if (measures) {
532
- result.measures = measures;
533
- return result;
534
- }
535
- const top100dataset = dataset.slice(0, 100);
536
- const sample = top100dataset.reduce((prev, cur)=>({
537
- ...prev,
538
- ...cur
539
- }), {});
540
- result.measures = Object.keys(sample).filter((key)=>top100dataset.some((item)=>'number' == typeof item[key]) && ![
541
- '',
542
- null,
543
- void 0
544
- ].includes(key)).map((measure)=>({
545
- id: measure,
546
- alias: measure
547
- }));
638
+ const config = (0, external_remeda_namespaceObject.pick)(vseed, [
639
+ 'backgroundColor',
640
+ 'color',
641
+ 'label',
642
+ 'legend',
643
+ 'tooltip'
644
+ ]);
645
+ result.baseConfig = {
646
+ vchart: {
647
+ ...config
648
+ }
649
+ };
548
650
  return result;
549
651
  };
550
- const autoMeasureGroup = (advancedVSeed, context)=>{
652
+ const lineConfig = (advancedVSeed, context)=>{
551
653
  const { vseed } = context;
552
- const { measures } = vseed;
553
- const hasMeasureGroup = measures?.some((measure)=>measure.children);
554
- if (!measures) return advancedVSeed;
555
- if (!hasMeasureGroup) {
556
- const newMeasures = [
557
- {
558
- id: 'measureGroup',
559
- alias: 'measureGroup',
560
- children: measures
561
- }
562
- ];
563
- return {
564
- ...advancedVSeed,
565
- measures: newMeasures
566
- };
567
- }
568
- let currentGroup = createEmptyMeasureGroup();
569
- const measureGroups = [];
570
- for (const measure of measures)if ('children' in measure) {
571
- if (currentGroup.children?.length) {
572
- currentGroup.id = currentGroup.children.map((item)=>item.id).join('-');
573
- currentGroup.alias = currentGroup.children.map((item)=>item.alias).join('-');
574
- measureGroups.push(currentGroup);
575
- currentGroup = createEmptyMeasureGroup();
576
- }
577
- measureGroups.push(measure);
578
- } else currentGroup.children?.push(measure);
579
- if (currentGroup.children?.length) {
580
- currentGroup.id = currentGroup.children.map((item)=>item.id).join('-');
581
- currentGroup.alias = currentGroup.children.map((item)=>item.alias).join('-');
582
- measureGroups.push(currentGroup);
583
- currentGroup = createEmptyMeasureGroup();
584
- }
585
- advancedVSeed.measures = measureGroups;
586
- return advancedVSeed;
587
- };
588
- const createEmptyMeasureGroup = ()=>({
589
- id: '',
590
- alias: '',
591
- children: []
592
- });
593
- const autoDimensions = (advancedVSeed, context)=>{
654
+ const { chartType } = vseed;
594
655
  const result = {
595
656
  ...advancedVSeed
596
657
  };
597
- const { vseed } = context;
598
- const { dimensions, dataset } = vseed;
599
- const { measures = [] } = advancedVSeed;
600
- if (!dataset) throw new Error('dataset is required');
601
- if (0 === dataset.length) return result;
602
- if (dimensions) {
603
- result.dimensions = dimensions;
604
- return result;
605
- }
606
- const top100dataset = dataset.slice(0, 100);
607
- const sample = top100dataset.reduce((prev, cur)=>({
608
- ...prev,
609
- ...cur
610
- }), {});
611
- result.dimensions = Object.keys(sample).filter((key)=>top100dataset.some((item)=>'string' == typeof item[key]) && ![
612
- '',
613
- null,
614
- void 0
615
- ].includes(key) && !measures.some((measure)=>measure.id === key)).map((dim)=>({
616
- id: dim,
617
- alias: dim,
618
- location: 'dimension'
619
- }));
658
+ const config = (0, external_remeda_namespaceObject.pick)(vseed, [
659
+ 'xAxis',
660
+ 'yAxis'
661
+ ]);
662
+ result.config = {
663
+ ...result.config || {},
664
+ [chartType]: {
665
+ ...config
666
+ }
667
+ };
620
668
  return result;
621
669
  };
622
- const vchartBaseConfig = (advancedVSeed, context)=>{
670
+ const pieConfig = (advancedVSeed, context)=>{
623
671
  const { vseed } = context;
672
+ const { chartType } = vseed;
624
673
  const result = {
625
674
  ...advancedVSeed
626
675
  };
627
- const config = (0, external_remeda_namespaceObject.pick)(vseed, [
628
- 'backgroundColor',
629
- 'color',
630
- 'label',
631
- 'legend',
632
- 'tooltip'
633
- ]);
634
- result.baseConfig = {
635
- vchart: {
676
+ const config = (0, external_remeda_namespaceObject.pick)(vseed, []);
677
+ result.config = {
678
+ ...result.config || {},
679
+ [chartType]: {
636
680
  ...config
637
681
  }
638
682
  };
639
683
  return result;
640
684
  };
685
+ const barConfig = lineConfig;
686
+ const barParallelConfig = lineConfig;
687
+ const barPercentConfig = lineConfig;
688
+ const columnConfig = lineConfig;
689
+ const columnParallelConfig = lineConfig;
690
+ const columnPercentConfig = lineConfig;
691
+ const areaConfig = lineConfig;
692
+ const areaPercentConfig = lineConfig;
641
693
  const vchartTheme = (advancedVSeed, context)=>{
642
694
  const { customTheme, vseed } = context;
643
- const { theme = 'light' } = vseed;
695
+ const { theme = 'light', chartType } = vseed;
644
696
  const result = {
645
697
  ...advancedVSeed
646
698
  };
647
699
  if (!customTheme || !customTheme[theme]) return result;
648
- const config = result.baseConfig?.vchart;
649
- const themeConfig = customTheme?.[theme].baseConfig?.vchart;
650
- if (!themeConfig || !config) return result;
651
- const mergedConfig = (0, external_remeda_namespaceObject.mergeDeep)(themeConfig, (0, external_remeda_namespaceObject.clone)(config));
652
- result.baseConfig = {
653
- vchart: mergedConfig
654
- };
700
+ const baseConfigVChartTheme = customTheme?.[theme].baseConfig?.vchart;
701
+ if (baseConfigVChartTheme) {
702
+ const baseConfigVChart = result.baseConfig?.vchart || {};
703
+ const mergedConfig = (0, external_remeda_namespaceObject.mergeDeep)(baseConfigVChartTheme, (0, external_remeda_namespaceObject.clone)(baseConfigVChart));
704
+ result.baseConfig = {
705
+ vchart: mergedConfig
706
+ };
707
+ }
708
+ const chartConfigTheme = customTheme?.[theme].config?.[chartType];
709
+ if (chartConfigTheme) {
710
+ const chartConfig = result.config?.[chartType] || {};
711
+ const mergedConfig = (0, external_remeda_namespaceObject.mergeDeep)(chartConfigTheme, (0, external_remeda_namespaceObject.clone)(chartConfig));
712
+ result.config = {
713
+ [chartType]: mergedConfig
714
+ };
715
+ }
655
716
  return result;
656
717
  };
657
718
  const execPipeline = (pipeline, context, initialValue = {})=>{
@@ -675,6 +736,7 @@ const lineAdvancedPipeline = [
675
736
  ]),
676
737
  encodingXY,
677
738
  vchartBaseConfig,
739
+ lineConfig,
678
740
  vchartTheme
679
741
  ];
680
742
  const barAdvancedPipeline = [
@@ -687,6 +749,7 @@ const barAdvancedPipeline = [
687
749
  pivotReshapeTo2D1M
688
750
  ]),
689
751
  encodingYX,
752
+ barConfig,
690
753
  vchartBaseConfig,
691
754
  vchartTheme
692
755
  ];
@@ -700,6 +763,7 @@ const barParallelAdvancedPipeline = [
700
763
  pivotReshapeTo2D1M
701
764
  ]),
702
765
  encodingYX,
766
+ barParallelConfig,
703
767
  vchartBaseConfig,
704
768
  vchartTheme
705
769
  ];
@@ -713,6 +777,7 @@ const barPercentAdvancedPipeline = [
713
777
  pivotReshapeTo2D1M
714
778
  ]),
715
779
  encodingYX,
780
+ barPercentConfig,
716
781
  vchartBaseConfig,
717
782
  vchartTheme
718
783
  ];
@@ -726,6 +791,7 @@ const columnAdvancedPipeline = [
726
791
  pivotReshapeTo2D1M
727
792
  ]),
728
793
  encodingXY,
794
+ columnConfig,
729
795
  vchartBaseConfig,
730
796
  vchartTheme
731
797
  ];
@@ -739,6 +805,7 @@ const columnParallelAdvancedPipeline = [
739
805
  pivotReshapeTo2D1M
740
806
  ]),
741
807
  encodingXY,
808
+ columnParallelConfig,
742
809
  vchartBaseConfig,
743
810
  vchartTheme
744
811
  ];
@@ -752,6 +819,7 @@ const columnPercentAdvancedPipeline = [
752
819
  pivotReshapeTo2D1M
753
820
  ]),
754
821
  encodingXY,
822
+ columnPercentConfig,
755
823
  vchartBaseConfig,
756
824
  vchartTheme
757
825
  ];
@@ -765,6 +833,7 @@ const areaAdvancedPipeline = [
765
833
  pivotReshapeTo2D1M
766
834
  ]),
767
835
  encodingXY,
836
+ areaConfig,
768
837
  vchartBaseConfig,
769
838
  vchartTheme
770
839
  ];
@@ -778,6 +847,7 @@ const areaPercentAdvancedPipeline = [
778
847
  pivotReshapeTo2D1M
779
848
  ]),
780
849
  encodingXY,
850
+ areaPercentConfig,
781
851
  vchartBaseConfig,
782
852
  vchartTheme
783
853
  ];
@@ -791,6 +861,7 @@ const pieAdvancedPipeline = [
791
861
  pivotReshapeTo1D1M
792
862
  ]),
793
863
  encodingPolar,
864
+ pieConfig,
794
865
  vchartBaseConfig,
795
866
  vchartTheme
796
867
  ];
@@ -838,6 +909,11 @@ const initColumn = (spec, context)=>{
838
909
  result.yField = encoding[0].y[0];
839
910
  result.seriesField = encoding[0].group[0];
840
911
  result.padding = 0;
912
+ result.region = [
913
+ {
914
+ clip: true
915
+ }
916
+ ];
841
917
  return result;
842
918
  };
843
919
  const initBar = (spec, context)=>{
@@ -853,6 +929,11 @@ const initBar = (spec, context)=>{
853
929
  result.xField = encoding[0].x?.[0];
854
930
  result.seriesField = encoding[0].group?.[0];
855
931
  result.padding = 0;
932
+ result.region = [
933
+ {
934
+ clip: true
935
+ }
936
+ ];
856
937
  return result;
857
938
  };
858
939
  const initBarParallel = (spec, context)=>{
@@ -872,6 +953,11 @@ const initBarParallel = (spec, context)=>{
872
953
  result.xField = encoding[0].x[0];
873
954
  result.seriesField = encoding[0].group[0];
874
955
  result.padding = 0;
956
+ result.region = [
957
+ {
958
+ clip: true
959
+ }
960
+ ];
875
961
  return result;
876
962
  };
877
963
  const initArea = (spec, context)=>{
@@ -887,6 +973,11 @@ const initArea = (spec, context)=>{
887
973
  result.yField = encoding[0].y[0];
888
974
  result.seriesField = encoding[0].group[0];
889
975
  result.padding = 0;
976
+ result.region = [
977
+ {
978
+ clip: true
979
+ }
980
+ ];
890
981
  return result;
891
982
  };
892
983
  const initLine = (spec, context)=>{
@@ -902,6 +993,11 @@ const initLine = (spec, context)=>{
902
993
  result.yField = encoding[0].y[0];
903
994
  result.seriesField = encoding[0].group[0];
904
995
  result.padding = 0;
996
+ result.region = [
997
+ {
998
+ clip: true
999
+ }
1000
+ ];
905
1001
  return result;
906
1002
  };
907
1003
  const initColumnParallel = (spec, context)=>{
@@ -921,6 +1017,11 @@ const initColumnParallel = (spec, context)=>{
921
1017
  result.yField = encoding[0].y[0];
922
1018
  result.seriesField = encoding[0].group[0];
923
1019
  result.padding = 0;
1020
+ result.region = [
1021
+ {
1022
+ clip: true
1023
+ }
1024
+ ];
924
1025
  return result;
925
1026
  };
926
1027
  const initPie = (spec, context)=>{
@@ -937,6 +1038,11 @@ const initPie = (spec, context)=>{
937
1038
  result.categoryField = encoding[0].angle[0];
938
1039
  result.seriesField = encoding[0].group[0];
939
1040
  result.padding = 0;
1041
+ result.region = [
1042
+ {
1043
+ clip: true
1044
+ }
1045
+ ];
940
1046
  return result;
941
1047
  };
942
1048
  const initPivot = (spec)=>{
@@ -954,67 +1060,328 @@ const initPivot = (spec)=>{
954
1060
  indicatorsAsCol: false
955
1061
  };
956
1062
  };
957
- const xBand = (spec)=>{
1063
+ const xBand = (spec, context)=>{
958
1064
  const result = {
959
1065
  ...spec
960
1066
  };
1067
+ const { advancedVSeed, vseed } = context;
1068
+ const { chartType } = vseed;
1069
+ const config = advancedVSeed.config?.[chartType]?.xAxis;
961
1070
  if (!result.axes) result.axes = [];
1071
+ if (!config) {
1072
+ result.axes = [
1073
+ ...result.axes,
1074
+ {
1075
+ visible: true,
1076
+ type: 'band',
1077
+ orient: 'bottom'
1078
+ }
1079
+ ];
1080
+ return result;
1081
+ }
1082
+ const { visible = true, label, tick, title, grid, line, labelAutoHide, labelAutoHideGap, labelAutoLimit, labelAutoLimitLength, labelAutoRotate, labelAutoRotateAngleRange } = config;
1083
+ const sampling = !(labelAutoHide || labelAutoRotate || labelAutoLimit);
1084
+ const bandAxis = {
1085
+ visible,
1086
+ type: 'band',
1087
+ orient: 'bottom',
1088
+ maxHeight: labelAutoLimitLength,
1089
+ sampling,
1090
+ hover: true,
1091
+ label: {
1092
+ visible: label?.visible,
1093
+ flush: true,
1094
+ space: 8,
1095
+ style: {
1096
+ maxLineWidth: labelAutoLimitLength,
1097
+ fill: label?.labelColor,
1098
+ angle: label?.labelAngle,
1099
+ fontSize: label?.labelFontSize,
1100
+ fontWeight: label?.labelFontWeight
1101
+ },
1102
+ minGap: labelAutoHideGap,
1103
+ autoHide: labelAutoHide,
1104
+ autoHideMethod: 'greedy',
1105
+ autoHideSeparation: labelAutoHideGap,
1106
+ autoLimit: labelAutoLimit,
1107
+ autoRotate: labelAutoRotate,
1108
+ autoRotateAngle: labelAutoRotateAngleRange,
1109
+ lastVisible: true
1110
+ },
1111
+ title: {
1112
+ visible: title?.visible,
1113
+ text: title?.titleText,
1114
+ style: {
1115
+ fill: title?.titleColor,
1116
+ fontSize: title?.titleFontSize,
1117
+ fontWeight: title?.titleFontWeight
1118
+ }
1119
+ },
1120
+ tick: {
1121
+ visible: tick?.visible,
1122
+ tickSize: tick?.tickSize,
1123
+ inside: tick?.tickInside,
1124
+ style: {
1125
+ stroke: tick?.tickColor
1126
+ }
1127
+ },
1128
+ grid: {
1129
+ visible: grid?.visible,
1130
+ style: {
1131
+ lineWidth: grid?.gridWidth,
1132
+ stroke: grid?.gridColor
1133
+ }
1134
+ },
1135
+ domainLine: {
1136
+ visible: line?.visible,
1137
+ style: {
1138
+ lineWidth: line?.lineWidth,
1139
+ stroke: line?.lineColor
1140
+ }
1141
+ }
1142
+ };
962
1143
  result.axes = [
963
1144
  ...result.axes,
964
- {
965
- visible: true,
966
- type: 'band',
967
- orient: 'bottom'
968
- }
1145
+ bandAxis
969
1146
  ];
970
1147
  return result;
971
1148
  };
972
- const xLinear = (spec)=>{
1149
+ const xLinear = (spec, context)=>{
973
1150
  const result = {
974
1151
  ...spec
975
1152
  };
1153
+ const { advancedVSeed, vseed } = context;
1154
+ const { chartType } = vseed;
1155
+ const config = advancedVSeed.config?.[chartType]?.xAxis;
976
1156
  if (!result.axes) result.axes = [];
1157
+ if (!config) {
1158
+ result.axes = [
1159
+ ...result.axes,
1160
+ {
1161
+ visible: true,
1162
+ type: 'linear',
1163
+ orient: 'bottom'
1164
+ }
1165
+ ];
1166
+ return result;
1167
+ }
1168
+ const { visible = true, label, tick, title, grid, line, zero, nice, inverse, max, min } = config;
1169
+ const linearAxis = {
1170
+ visible,
1171
+ type: 'linear',
1172
+ orient: 'bottom',
1173
+ nice,
1174
+ zero,
1175
+ inverse,
1176
+ max,
1177
+ min,
1178
+ label: {
1179
+ visible: label?.visible,
1180
+ style: {
1181
+ fill: label?.labelColor,
1182
+ angle: label?.labelAngle,
1183
+ fontSize: label?.labelFontSize,
1184
+ fontWeight: label?.labelFontWeight
1185
+ }
1186
+ },
1187
+ title: {
1188
+ visible: title?.visible,
1189
+ text: title?.titleText,
1190
+ style: {
1191
+ fill: title?.titleColor,
1192
+ fontSize: title?.titleFontSize,
1193
+ fontWeight: title?.titleFontWeight
1194
+ }
1195
+ },
1196
+ tick: {
1197
+ visible: tick?.visible,
1198
+ tickSize: tick?.tickSize,
1199
+ inside: tick?.tickInside,
1200
+ style: {
1201
+ stroke: tick?.tickColor
1202
+ }
1203
+ },
1204
+ grid: {
1205
+ visible: grid?.visible,
1206
+ style: {
1207
+ lineWidth: grid?.gridWidth,
1208
+ stroke: grid?.gridColor
1209
+ }
1210
+ },
1211
+ domainLine: {
1212
+ visible: line?.visible,
1213
+ style: {
1214
+ lineWidth: line?.lineWidth,
1215
+ stroke: line?.lineColor
1216
+ }
1217
+ }
1218
+ };
977
1219
  result.axes = [
978
1220
  ...result.axes,
979
- {
980
- visible: true,
981
- type: 'linear',
982
- orient: 'bottom',
983
- nice: true,
984
- zero: true
985
- }
1221
+ linearAxis
986
1222
  ];
987
1223
  return result;
988
1224
  };
989
- const yBand = (spec)=>{
1225
+ const yBand = (spec, context)=>{
990
1226
  const result = {
991
1227
  ...spec
992
1228
  };
1229
+ const { advancedVSeed, vseed } = context;
1230
+ const { chartType } = vseed;
1231
+ const config = advancedVSeed.config?.[chartType]?.yAxis;
993
1232
  if (!result.axes) result.axes = [];
1233
+ if (!config) {
1234
+ result.axes = [
1235
+ ...result.axes,
1236
+ {
1237
+ visible: true,
1238
+ type: 'band',
1239
+ orient: 'left'
1240
+ }
1241
+ ];
1242
+ return result;
1243
+ }
1244
+ const { visible = true, label, tick, title, grid, line, labelAutoHide, labelAutoHideGap, labelAutoLimit, labelAutoLimitLength, labelAutoRotate, labelAutoRotateAngleRange } = config;
1245
+ const sampling = !(labelAutoHide || labelAutoRotate || labelAutoLimit);
1246
+ const bandAxis = {
1247
+ visible,
1248
+ type: 'band',
1249
+ orient: 'left',
1250
+ maxWidth: labelAutoLimitLength,
1251
+ sampling,
1252
+ hover: true,
1253
+ label: {
1254
+ visible: label?.visible,
1255
+ flush: true,
1256
+ containerAlign: 'left',
1257
+ space: 8,
1258
+ style: {
1259
+ maxLineWidth: labelAutoLimitLength,
1260
+ fill: label?.labelColor,
1261
+ angle: label?.labelAngle,
1262
+ fontSize: label?.labelFontSize,
1263
+ fontWeight: label?.labelFontWeight
1264
+ },
1265
+ minGap: labelAutoHideGap,
1266
+ autoHide: labelAutoHide,
1267
+ autoHideMethod: 'greedy',
1268
+ autoHideSeparation: labelAutoHideGap,
1269
+ autoLimit: labelAutoLimit,
1270
+ autoRotate: labelAutoRotate,
1271
+ autoRotateAngle: labelAutoRotateAngleRange,
1272
+ lastVisible: true
1273
+ },
1274
+ title: {
1275
+ visible: title?.visible,
1276
+ text: title?.titleText,
1277
+ style: {
1278
+ fill: title?.titleColor,
1279
+ fontSize: title?.titleFontSize,
1280
+ fontWeight: title?.titleFontWeight
1281
+ }
1282
+ },
1283
+ tick: {
1284
+ visible: tick?.visible,
1285
+ tickSize: tick?.tickSize,
1286
+ inside: tick?.tickInside,
1287
+ style: {
1288
+ stroke: tick?.tickColor
1289
+ }
1290
+ },
1291
+ grid: {
1292
+ visible: grid?.visible,
1293
+ style: {
1294
+ lineWidth: grid?.gridWidth,
1295
+ stroke: grid?.gridColor
1296
+ }
1297
+ },
1298
+ domainLine: {
1299
+ visible: line?.visible,
1300
+ style: {
1301
+ lineWidth: line?.lineWidth,
1302
+ stroke: line?.lineColor
1303
+ }
1304
+ }
1305
+ };
994
1306
  result.axes = [
995
1307
  ...result.axes,
996
- {
997
- visible: true,
998
- type: 'band',
999
- orient: 'left'
1000
- }
1308
+ bandAxis
1001
1309
  ];
1002
1310
  return result;
1003
1311
  };
1004
- const yLinear = (spec)=>{
1312
+ const yLinear = (spec, context)=>{
1005
1313
  const result = {
1006
1314
  ...spec
1007
1315
  };
1316
+ const { advancedVSeed, vseed } = context;
1317
+ const { chartType } = vseed;
1318
+ const config = advancedVSeed.config?.[chartType]?.yAxis;
1008
1319
  if (!result.axes) result.axes = [];
1320
+ if (!config) {
1321
+ result.axes = [
1322
+ ...result.axes,
1323
+ {
1324
+ visible: true,
1325
+ type: 'linear',
1326
+ orient: 'left'
1327
+ }
1328
+ ];
1329
+ return result;
1330
+ }
1331
+ const { visible = true, label, tick, title, grid, line, zero, nice, inverse, max, min } = config;
1332
+ const linearAxis = {
1333
+ visible,
1334
+ type: 'linear',
1335
+ orient: 'left',
1336
+ nice,
1337
+ zero,
1338
+ inverse,
1339
+ max,
1340
+ min,
1341
+ label: {
1342
+ visible: label?.visible,
1343
+ style: {
1344
+ fill: label?.labelColor,
1345
+ angle: label?.labelAngle,
1346
+ fontSize: label?.labelFontSize,
1347
+ fontWeight: label?.labelFontWeight
1348
+ }
1349
+ },
1350
+ title: {
1351
+ visible: title?.visible,
1352
+ text: title?.titleText,
1353
+ style: {
1354
+ fill: title?.titleColor,
1355
+ fontSize: title?.titleFontSize,
1356
+ fontWeight: title?.titleFontWeight
1357
+ }
1358
+ },
1359
+ tick: {
1360
+ visible: tick?.visible,
1361
+ tickSize: tick?.tickSize,
1362
+ inside: tick?.tickInside,
1363
+ style: {
1364
+ stroke: tick?.tickColor
1365
+ }
1366
+ },
1367
+ grid: {
1368
+ visible: grid?.visible,
1369
+ style: {
1370
+ lineWidth: grid?.gridWidth,
1371
+ stroke: grid?.gridColor
1372
+ }
1373
+ },
1374
+ domainLine: {
1375
+ visible: line?.visible,
1376
+ style: {
1377
+ lineWidth: line?.lineWidth,
1378
+ stroke: line?.lineColor
1379
+ }
1380
+ }
1381
+ };
1009
1382
  result.axes = [
1010
1383
  ...result.axes,
1011
- {
1012
- visible: true,
1013
- type: 'linear',
1014
- orient: 'left',
1015
- nice: true,
1016
- zero: true
1017
- }
1384
+ linearAxis
1018
1385
  ];
1019
1386
  return result;
1020
1387
  };
@@ -1382,7 +1749,7 @@ const pivotRowDimensions = (spec, context)=>{
1382
1749
  rows: rows
1383
1750
  };
1384
1751
  };
1385
- const line = [
1752
+ const line_line = [
1386
1753
  initLine,
1387
1754
  color_color,
1388
1755
  background_backgroundColor,
@@ -1413,7 +1780,7 @@ const pivotLine = [
1413
1780
  pivotLegend
1414
1781
  ];
1415
1782
  const lineSpecPipeline = [
1416
- pivotAdapter_pivotAdapter(line, pivotLine)
1783
+ pivotAdapter_pivotAdapter(line_line, pivotLine)
1417
1784
  ];
1418
1785
  const column = [
1419
1786
  initColumn,
@@ -1827,7 +2194,98 @@ const registerPie = ()=>{
1827
2194
  Builder._advancedPipelineMap.pie = pieAdvancedPipeline;
1828
2195
  Builder._specPipelineMap.pie = pieSpecPipeline;
1829
2196
  };
1830
- const lightTheme = ()=>({
2197
+ const lightTheme = ()=>{
2198
+ const linearAxis = {
2199
+ nice: true,
2200
+ zero: true,
2201
+ inverse: false,
2202
+ label: {
2203
+ visible: true,
2204
+ labelAngle: 0,
2205
+ labelColor: '#797B85',
2206
+ labelFontSize: 12,
2207
+ labelFontWeight: 400
2208
+ },
2209
+ title: {
2210
+ visible: false,
2211
+ titleText: '',
2212
+ titleColor: '#646A73',
2213
+ titleFontSize: 12,
2214
+ titleFontWeight: 400
2215
+ },
2216
+ grid: {
2217
+ visible: true,
2218
+ gridColor: 'rgba(54, 65, 89, 0.15)',
2219
+ gridWidth: 0.5
2220
+ },
2221
+ tick: {
2222
+ visible: false,
2223
+ tickInside: false,
2224
+ tickSize: 4,
2225
+ tickColor: 'rgba(54, 65, 89, 0.30)'
2226
+ },
2227
+ line: {
2228
+ visible: false,
2229
+ lineColor: 'rgba(54, 65, 89, 0.30)',
2230
+ lineWidth: 1
2231
+ }
2232
+ };
2233
+ const bandAxis = {
2234
+ labelAutoHide: true,
2235
+ labelAutoHideGap: 4,
2236
+ labelAutoLimit: true,
2237
+ labelAutoLimitLength: 100,
2238
+ labelAutoRotate: true,
2239
+ labelAutoRotateAngleRange: [
2240
+ 0,
2241
+ -45,
2242
+ -90
2243
+ ],
2244
+ label: {
2245
+ visible: true,
2246
+ labelAngle: 0,
2247
+ labelColor: '#797B85',
2248
+ labelFontSize: 12,
2249
+ labelFontWeight: 400
2250
+ },
2251
+ title: {
2252
+ visible: false,
2253
+ titleText: '',
2254
+ titleColor: '#646A73',
2255
+ titleFontSize: 12,
2256
+ titleFontWeight: 400
2257
+ },
2258
+ grid: {
2259
+ visible: false,
2260
+ gridColor: 'rgba(54, 65, 89, 0.15)',
2261
+ gridWidth: 0.5
2262
+ },
2263
+ tick: {
2264
+ visible: false,
2265
+ tickInside: false,
2266
+ tickSize: 4,
2267
+ tickColor: 'rgba(54, 65, 89, 0.30)'
2268
+ },
2269
+ line: {
2270
+ visible: true,
2271
+ lineColor: 'rgba(54, 65, 89, 0.30)',
2272
+ lineWidth: 1
2273
+ }
2274
+ };
2275
+ const barBandAxis = {
2276
+ ...bandAxis,
2277
+ labelAutoHide: false,
2278
+ labelAutoHideGap: 1,
2279
+ labelAutoLimit: false,
2280
+ labelAutoLimitLength: void 0,
2281
+ labelAutoRotate: false,
2282
+ labelAutoRotateAngleRange: [
2283
+ 0,
2284
+ -45,
2285
+ -90
2286
+ ]
2287
+ };
2288
+ return {
1831
2289
  baseConfig: {
1832
2290
  vtable: {
1833
2291
  backgroundColor: '#ffffff'
@@ -1858,9 +2316,125 @@ const lightTheme = ()=>({
1858
2316
  enable: true
1859
2317
  }
1860
2318
  }
2319
+ },
2320
+ config: {
2321
+ line: {
2322
+ xAxis: bandAxis,
2323
+ yAxis: linearAxis
2324
+ },
2325
+ column: {
2326
+ xAxis: bandAxis,
2327
+ yAxis: linearAxis
2328
+ },
2329
+ columnParallel: {
2330
+ xAxis: bandAxis,
2331
+ yAxis: linearAxis
2332
+ },
2333
+ columnPercent: {
2334
+ xAxis: bandAxis,
2335
+ yAxis: linearAxis
2336
+ },
2337
+ bar: {
2338
+ xAxis: linearAxis,
2339
+ yAxis: barBandAxis
2340
+ },
2341
+ barParallel: {
2342
+ xAxis: linearAxis,
2343
+ yAxis: barBandAxis
2344
+ },
2345
+ barPercent: {
2346
+ xAxis: linearAxis,
2347
+ yAxis: barBandAxis
2348
+ },
2349
+ area: {
2350
+ xAxis: bandAxis,
2351
+ yAxis: linearAxis
2352
+ },
2353
+ areaPercent: {
2354
+ xAxis: bandAxis,
2355
+ yAxis: linearAxis
2356
+ }
1861
2357
  }
1862
- });
1863
- const darkTheme = ()=>({
2358
+ };
2359
+ };
2360
+ const darkTheme = ()=>{
2361
+ const linearAxis = {
2362
+ nice: true,
2363
+ zero: true,
2364
+ label: {
2365
+ visible: true,
2366
+ labelAngle: 0,
2367
+ labelColor: '#E2E3E6',
2368
+ labelFontSize: 12,
2369
+ labelFontWeight: 400
2370
+ },
2371
+ title: {
2372
+ visible: false,
2373
+ titleText: '',
2374
+ titleColor: '#FDFDFD',
2375
+ titleFontSize: 12,
2376
+ titleFontWeight: 400
2377
+ },
2378
+ grid: {
2379
+ visible: true,
2380
+ gridColor: '#404349',
2381
+ gridWidth: 0.5
2382
+ },
2383
+ tick: {
2384
+ visible: false,
2385
+ tickInside: false,
2386
+ tickSize: 4,
2387
+ tickColor: '#4B4F54'
2388
+ },
2389
+ line: {
2390
+ visible: false,
2391
+ lineColor: '#4B4F54',
2392
+ lineWidth: 1
2393
+ }
2394
+ };
2395
+ const bandAxis = {
2396
+ labelAutoHide: true,
2397
+ labelAutoHideGap: 4,
2398
+ labelAutoLimit: true,
2399
+ labelAutoLimitLength: 100,
2400
+ labelAutoRotate: true,
2401
+ labelAutoRotateAngleRange: [
2402
+ 0,
2403
+ -45,
2404
+ -90
2405
+ ],
2406
+ label: {
2407
+ visible: true,
2408
+ labelAngle: 0,
2409
+ labelColor: '#E2E3E6',
2410
+ labelFontSize: 12,
2411
+ labelFontWeight: 400
2412
+ },
2413
+ title: {
2414
+ visible: false,
2415
+ titleText: '',
2416
+ titleColor: '#FDFDFD',
2417
+ titleFontSize: 12,
2418
+ titleFontWeight: 400
2419
+ },
2420
+ grid: {
2421
+ visible: false,
2422
+ gridColor: '#404349',
2423
+ gridWidth: 0.5
2424
+ },
2425
+ tick: {
2426
+ visible: false,
2427
+ tickInside: false,
2428
+ tickSize: 4,
2429
+ tickColor: '#4B4F54'
2430
+ },
2431
+ line: {
2432
+ visible: true,
2433
+ lineColor: '#4B4F54',
2434
+ lineWidth: 1
2435
+ }
2436
+ };
2437
+ return {
1864
2438
  baseConfig: {
1865
2439
  vtable: {
1866
2440
  backgroundColor: '#141414'
@@ -1891,8 +2465,47 @@ const darkTheme = ()=>({
1891
2465
  enable: true
1892
2466
  }
1893
2467
  }
2468
+ },
2469
+ config: {
2470
+ line: {
2471
+ xAxis: bandAxis,
2472
+ yAxis: linearAxis
2473
+ },
2474
+ column: {
2475
+ xAxis: bandAxis,
2476
+ yAxis: linearAxis
2477
+ },
2478
+ columnParallel: {
2479
+ xAxis: bandAxis,
2480
+ yAxis: linearAxis
2481
+ },
2482
+ columnPercent: {
2483
+ xAxis: bandAxis,
2484
+ yAxis: linearAxis
2485
+ },
2486
+ bar: {
2487
+ xAxis: linearAxis,
2488
+ yAxis: bandAxis
2489
+ },
2490
+ barParallel: {
2491
+ xAxis: linearAxis,
2492
+ yAxis: bandAxis
2493
+ },
2494
+ barPercent: {
2495
+ xAxis: linearAxis,
2496
+ yAxis: bandAxis
2497
+ },
2498
+ area: {
2499
+ xAxis: bandAxis,
2500
+ yAxis: linearAxis
2501
+ },
2502
+ areaPercent: {
2503
+ xAxis: bandAxis,
2504
+ yAxis: linearAxis
2505
+ }
1894
2506
  }
1895
- });
2507
+ };
2508
+ };
1896
2509
  const registerCustomTheme = (key, themeConfig)=>{
1897
2510
  Builder._themeMap[key] = themeConfig;
1898
2511
  };
@@ -2032,12 +2645,193 @@ const zBaseConfig = external_zod_namespaceObject.z.object({
2032
2645
  vchart: zVChartBaseConfig.optional(),
2033
2646
  vtable: zVTableBaseConfig.optional()
2034
2647
  });
2648
+ const zAxis = external_zod_namespaceObject.z.object({
2649
+ visible: external_zod_namespaceObject.z.boolean().default(true).optional(),
2650
+ min: external_zod_namespaceObject.z.number().optional(),
2651
+ max: external_zod_namespaceObject.z.number().optional(),
2652
+ nice: external_zod_namespaceObject.z.boolean().default(true).optional(),
2653
+ zero: external_zod_namespaceObject.z.boolean().default(true).optional(),
2654
+ inverse: external_zod_namespaceObject.z.boolean().default(false).optional(),
2655
+ labelAutoHide: external_zod_namespaceObject.z.boolean().default(true).optional(),
2656
+ labelAutoHideGap: external_zod_namespaceObject.z.number().default(4).optional(),
2657
+ labelAutoRotate: external_zod_namespaceObject.z.boolean().default(true).optional(),
2658
+ labelAutoRotateAngleRange: external_zod_namespaceObject.z.array(external_zod_namespaceObject.z.number()).default([
2659
+ 0,
2660
+ -45,
2661
+ -90
2662
+ ]).optional(),
2663
+ labelAutoLimit: external_zod_namespaceObject.z.boolean().default(true).optional(),
2664
+ labelAutoLimitLength: external_zod_namespaceObject.z.number().default(100).optional(),
2665
+ label: external_zod_namespaceObject.z.object({
2666
+ visible: external_zod_namespaceObject.z.boolean().default(true).optional(),
2667
+ labelColor: external_zod_namespaceObject.z.string().default('#797B85').optional(),
2668
+ labelFontSize: external_zod_namespaceObject.z.number().default(12).optional(),
2669
+ labelFontWeight: external_zod_namespaceObject.z.number().default(400).optional(),
2670
+ labelAngle: external_zod_namespaceObject.z.number().default(0).optional()
2671
+ }).optional(),
2672
+ line: external_zod_namespaceObject.z.object({
2673
+ visible: external_zod_namespaceObject.z.boolean().default(true).optional(),
2674
+ lineColor: external_zod_namespaceObject.z.string().default('rgba(54, 65, 89, 0.30)').optional(),
2675
+ lineWidth: external_zod_namespaceObject.z.number().default(1).optional()
2676
+ }).optional(),
2677
+ tick: external_zod_namespaceObject.z.object({
2678
+ visible: external_zod_namespaceObject.z.boolean().default(true).optional(),
2679
+ tickInside: external_zod_namespaceObject.z.boolean().default(false).optional(),
2680
+ tickColor: external_zod_namespaceObject.z.string().default('rgba(54, 65, 89, 0.30)').optional(),
2681
+ tickSize: external_zod_namespaceObject.z.number().default(4).optional()
2682
+ }).optional(),
2683
+ title: external_zod_namespaceObject.z.object({
2684
+ visible: external_zod_namespaceObject.z.boolean().default(false).optional(),
2685
+ titleText: external_zod_namespaceObject.z.string().default('').optional(),
2686
+ titleColor: external_zod_namespaceObject.z.string().default('#646A73').optional(),
2687
+ titleFontSize: external_zod_namespaceObject.z.number().default(12).optional(),
2688
+ titleFontWeight: external_zod_namespaceObject.z.number().default(400).optional()
2689
+ }).optional(),
2690
+ grid: external_zod_namespaceObject.z.object({
2691
+ visible: external_zod_namespaceObject.z.boolean().default(false).optional(),
2692
+ gridColor: external_zod_namespaceObject.z.string().default('rgba(54, 65, 89, 0.15)').optional(),
2693
+ gridWidth: external_zod_namespaceObject.z.number().default(0.5).optional()
2694
+ }).optional()
2695
+ });
2696
+ const zXBandAxis = external_zod_namespaceObject.z.object({
2697
+ visible: external_zod_namespaceObject.z.boolean().default(true).optional(),
2698
+ labelAutoHide: external_zod_namespaceObject.z.boolean().default(true).optional(),
2699
+ labelAutoHideGap: external_zod_namespaceObject.z.number().default(0).optional(),
2700
+ labelAutoRotate: external_zod_namespaceObject.z.boolean().default(true).optional(),
2701
+ labelAutoRotateAngleRange: external_zod_namespaceObject.z.array(external_zod_namespaceObject.z.number()).default([
2702
+ 0,
2703
+ -45,
2704
+ -90
2705
+ ]).optional(),
2706
+ labelAutoLimit: external_zod_namespaceObject.z.boolean().default(true).optional(),
2707
+ labelAutoLimitLength: external_zod_namespaceObject.z.number().default(100).optional(),
2708
+ label: external_zod_namespaceObject.z.object({
2709
+ visible: external_zod_namespaceObject.z.boolean().default(true).optional(),
2710
+ labelColor: external_zod_namespaceObject.z.string().default('#797B85').optional(),
2711
+ labelFontSize: external_zod_namespaceObject.z.number().default(12).optional(),
2712
+ labelFontWeight: external_zod_namespaceObject.z.number().default(400).optional(),
2713
+ labelAngle: external_zod_namespaceObject.z.number().default(0).optional()
2714
+ }).optional(),
2715
+ line: external_zod_namespaceObject.z.object({
2716
+ visible: external_zod_namespaceObject.z.boolean().default(true).optional(),
2717
+ lineColor: external_zod_namespaceObject.z.string().default('rgba(54, 65, 89, 0.30)').optional(),
2718
+ lineWidth: external_zod_namespaceObject.z.number().default(1).optional()
2719
+ }).optional(),
2720
+ tick: external_zod_namespaceObject.z.object({
2721
+ visible: external_zod_namespaceObject.z.boolean().default(true).optional(),
2722
+ tickInside: external_zod_namespaceObject.z.boolean().default(false).optional(),
2723
+ tickColor: external_zod_namespaceObject.z.string().default('rgba(54, 65, 89, 0.30)').optional(),
2724
+ tickSize: external_zod_namespaceObject.z.number().default(4).optional()
2725
+ }).optional(),
2726
+ title: external_zod_namespaceObject.z.object({
2727
+ visible: external_zod_namespaceObject.z.boolean().default(false).optional(),
2728
+ titleText: external_zod_namespaceObject.z.string().default('').optional(),
2729
+ titleColor: external_zod_namespaceObject.z.string().default('#646A73').optional(),
2730
+ titleFontSize: external_zod_namespaceObject.z.number().default(12).optional(),
2731
+ titleFontWeight: external_zod_namespaceObject.z.number().default(400).optional()
2732
+ }).optional(),
2733
+ grid: external_zod_namespaceObject.z.object({
2734
+ visible: external_zod_namespaceObject.z.boolean().default(false).optional(),
2735
+ gridColor: external_zod_namespaceObject.z.string().default('rgba(54, 65, 89, 0.15)').optional(),
2736
+ gridWidth: external_zod_namespaceObject.z.number().default(0.5).optional()
2737
+ }).optional()
2738
+ });
2739
+ const zYBandAxis = zXBandAxis;
2740
+ const zXLinearAxis = external_zod_namespaceObject.z.object({
2741
+ visible: external_zod_namespaceObject.z.boolean().default(true).optional(),
2742
+ min: external_zod_namespaceObject.z.number().optional(),
2743
+ max: external_zod_namespaceObject.z.number().optional(),
2744
+ nice: external_zod_namespaceObject.z.boolean().default(true).optional(),
2745
+ zero: external_zod_namespaceObject.z.boolean().default(true).optional(),
2746
+ inverse: external_zod_namespaceObject.z.boolean().default(false).optional(),
2747
+ label: external_zod_namespaceObject.z.object({
2748
+ visible: external_zod_namespaceObject.z.boolean().default(true).optional(),
2749
+ labelColor: external_zod_namespaceObject.z.string().default('#797B85').optional(),
2750
+ labelFontSize: external_zod_namespaceObject.z.number().default(12).optional(),
2751
+ labelFontWeight: external_zod_namespaceObject.z.number().default(400).optional(),
2752
+ labelAngle: external_zod_namespaceObject.z.number().default(0).optional()
2753
+ }).optional(),
2754
+ line: external_zod_namespaceObject.z.object({
2755
+ visible: external_zod_namespaceObject.z.boolean().default(true).optional(),
2756
+ lineColor: external_zod_namespaceObject.z.string().default('rgba(54, 65, 89, 0.30)').optional(),
2757
+ lineWidth: external_zod_namespaceObject.z.number().default(1).optional()
2758
+ }).optional(),
2759
+ tick: external_zod_namespaceObject.z.object({
2760
+ visible: external_zod_namespaceObject.z.boolean().default(true).optional(),
2761
+ tickInside: external_zod_namespaceObject.z.boolean().default(false).optional(),
2762
+ tickColor: external_zod_namespaceObject.z.string().default('rgba(54, 65, 89, 0.30)').optional(),
2763
+ tickSize: external_zod_namespaceObject.z.number().default(4).optional()
2764
+ }).optional(),
2765
+ title: external_zod_namespaceObject.z.object({
2766
+ visible: external_zod_namespaceObject.z.boolean().default(false).optional(),
2767
+ titleText: external_zod_namespaceObject.z.string().default('').optional(),
2768
+ titleColor: external_zod_namespaceObject.z.string().default('#646A73').optional(),
2769
+ titleFontSize: external_zod_namespaceObject.z.number().default(12).optional(),
2770
+ titleFontWeight: external_zod_namespaceObject.z.number().default(400).optional()
2771
+ }).optional(),
2772
+ grid: external_zod_namespaceObject.z.object({
2773
+ visible: external_zod_namespaceObject.z.boolean().default(false).optional(),
2774
+ gridColor: external_zod_namespaceObject.z.string().default('rgba(54, 65, 89, 0.15)').optional(),
2775
+ gridWidth: external_zod_namespaceObject.z.number().default(0.5).optional()
2776
+ }).optional()
2777
+ });
2778
+ const zYLinearAxis = zXLinearAxis;
2779
+ const zConfig = external_zod_namespaceObject.z.object({
2780
+ line: external_zod_namespaceObject.z.object({
2781
+ xAxis: zXBandAxis,
2782
+ yAxis: zYLinearAxis
2783
+ }).optional(),
2784
+ column: external_zod_namespaceObject.z.object({
2785
+ xAxis: zXBandAxis,
2786
+ yAxis: zYLinearAxis
2787
+ }).optional(),
2788
+ columnParallel: external_zod_namespaceObject.z.object({
2789
+ xAxis: zXBandAxis,
2790
+ yAxis: zYLinearAxis
2791
+ }).optional(),
2792
+ columnPercent: external_zod_namespaceObject.z.object({
2793
+ xAxis: zXBandAxis,
2794
+ yAxis: zYLinearAxis
2795
+ }).optional(),
2796
+ bar: external_zod_namespaceObject.z.object({
2797
+ xAxis: zXLinearAxis,
2798
+ yAxis: zYBandAxis
2799
+ }).optional(),
2800
+ barParallel: external_zod_namespaceObject.z.object({
2801
+ xAxis: zXLinearAxis,
2802
+ yAxis: zYBandAxis
2803
+ }).optional(),
2804
+ barPercent: external_zod_namespaceObject.z.object({
2805
+ xAxis: zXLinearAxis,
2806
+ yAxis: zYBandAxis
2807
+ }).optional(),
2808
+ area: external_zod_namespaceObject.z.object({
2809
+ xAxis: zXBandAxis,
2810
+ yAxis: zYLinearAxis
2811
+ }).optional(),
2812
+ areaPercent: external_zod_namespaceObject.z.object({
2813
+ xAxis: zXBandAxis,
2814
+ yAxis: zYLinearAxis
2815
+ }).optional(),
2816
+ pie: external_zod_namespaceObject.z.object({}).optional(),
2817
+ donut: external_zod_namespaceObject.z.object({}).optional(),
2818
+ rose: external_zod_namespaceObject.z.object({}).optional(),
2819
+ dualAxis: external_zod_namespaceObject.z.object({}).optional(),
2820
+ table: external_zod_namespaceObject.z.object({}).optional(),
2821
+ pivotTable: external_zod_namespaceObject.z.object({}).optional()
2822
+ });
2035
2823
  const zCustomThemeConfig = external_zod_namespaceObject.z.object({
2036
- baseConfig: zBaseConfig.optional()
2824
+ baseConfig: zBaseConfig.optional(),
2825
+ config: zConfig.optional()
2037
2826
  });
2038
2827
  const zCustomTheme = external_zod_namespaceObject.z.record(external_zod_namespaceObject.z.string(), zCustomThemeConfig).optional();
2039
2828
  const zTheme = external_zod_namespaceObject.z.string();
2040
2829
  exports.Builder = __webpack_exports__.Builder;
2830
+ exports.FoldMeasureId = __webpack_exports__.FoldMeasureId;
2831
+ exports.FoldMeasureName = __webpack_exports__.FoldMeasureName;
2832
+ exports.FoldMeasureValue = __webpack_exports__.FoldMeasureValue;
2833
+ exports.Separator = __webpack_exports__.Separator;
2834
+ exports.UnfoldDimensionGroup = __webpack_exports__.UnfoldDimensionGroup;
2041
2835
  exports.areaAdvancedPipeline = __webpack_exports__.areaAdvancedPipeline;
2042
2836
  exports.areaPercentAdvancedPipeline = __webpack_exports__.areaPercentAdvancedPipeline;
2043
2837
  exports.areaPercentSpecPipeline = __webpack_exports__.areaPercentSpecPipeline;
@@ -2081,10 +2875,12 @@ exports.registerDarkTheme = __webpack_exports__.registerDarkTheme;
2081
2875
  exports.registerLightTheme = __webpack_exports__.registerLightTheme;
2082
2876
  exports.registerLine = __webpack_exports__.registerLine;
2083
2877
  exports.unfoldDimensions = __webpack_exports__.unfoldDimensions;
2878
+ exports.zAxis = __webpack_exports__.zAxis;
2084
2879
  exports.zBackgroundColor = __webpack_exports__.zBackgroundColor;
2085
2880
  exports.zBaseConfig = __webpack_exports__.zBaseConfig;
2086
2881
  exports.zChartType = __webpack_exports__.zChartType;
2087
2882
  exports.zColor = __webpack_exports__.zColor;
2883
+ exports.zConfig = __webpack_exports__.zConfig;
2088
2884
  exports.zCustomTheme = __webpack_exports__.zCustomTheme;
2089
2885
  exports.zCustomThemeConfig = __webpack_exports__.zCustomThemeConfig;
2090
2886
  exports.zDataset = __webpack_exports__.zDataset;
@@ -2102,8 +2898,17 @@ exports.zMeasures = __webpack_exports__.zMeasures;
2102
2898
  exports.zTheme = __webpack_exports__.zTheme;
2103
2899
  exports.zTooltip = __webpack_exports__.zTooltip;
2104
2900
  exports.zUnfoldInfo = __webpack_exports__.zUnfoldInfo;
2901
+ exports.zXBandAxis = __webpack_exports__.zXBandAxis;
2902
+ exports.zXLinearAxis = __webpack_exports__.zXLinearAxis;
2903
+ exports.zYBandAxis = __webpack_exports__.zYBandAxis;
2904
+ exports.zYLinearAxis = __webpack_exports__.zYLinearAxis;
2105
2905
  for(var __webpack_i__ in __webpack_exports__)if (-1 === [
2106
2906
  "Builder",
2907
+ "FoldMeasureId",
2908
+ "FoldMeasureName",
2909
+ "FoldMeasureValue",
2910
+ "Separator",
2911
+ "UnfoldDimensionGroup",
2107
2912
  "areaAdvancedPipeline",
2108
2913
  "areaPercentAdvancedPipeline",
2109
2914
  "areaPercentSpecPipeline",
@@ -2147,10 +2952,12 @@ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
2147
2952
  "registerLightTheme",
2148
2953
  "registerLine",
2149
2954
  "unfoldDimensions",
2955
+ "zAxis",
2150
2956
  "zBackgroundColor",
2151
2957
  "zBaseConfig",
2152
2958
  "zChartType",
2153
2959
  "zColor",
2960
+ "zConfig",
2154
2961
  "zCustomTheme",
2155
2962
  "zCustomThemeConfig",
2156
2963
  "zDataset",
@@ -2167,7 +2974,11 @@ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
2167
2974
  "zMeasures",
2168
2975
  "zTheme",
2169
2976
  "zTooltip",
2170
- "zUnfoldInfo"
2977
+ "zUnfoldInfo",
2978
+ "zXBandAxis",
2979
+ "zXLinearAxis",
2980
+ "zYBandAxis",
2981
+ "zYLinearAxis"
2171
2982
  ].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
2172
2983
  Object.defineProperty(exports, '__esModule', {
2173
2984
  value: true