@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.js CHANGED
@@ -1,5 +1,128 @@
1
1
  import { clone as external_remeda_clone, mergeDeep as external_remeda_mergeDeep, pick as external_remeda_pick, unique } from "remeda";
2
2
  import { z } from "zod";
3
+ const initAdvancedVSeed = (advancedVSeed, context)=>{
4
+ const { vseed } = context;
5
+ const { chartType = 'table' } = vseed;
6
+ return {
7
+ ...advancedVSeed,
8
+ chartType
9
+ };
10
+ };
11
+ const execPipeline = (pipeline, context, initialValue = {})=>{
12
+ const result = pipeline.reduce((prev, cur)=>cur(prev, context), initialValue);
13
+ return result;
14
+ };
15
+ const isVTable = (chartType)=>[
16
+ 'table',
17
+ 'pivotTable'
18
+ ].includes(chartType);
19
+ const isVChart = (chartType)=>!isVTable(chartType);
20
+ const isPivotChart = (vseed)=>{
21
+ const { measures, dimensions } = vseed;
22
+ const hasRowOrColumnDimension = dimensions && dimensions.some((dimension)=>'rowDimension' === dimension.location || 'columnDimension' === dimension.location);
23
+ const hasMeasureGroup = measures && measures.find((measure)=>measure && measure.children);
24
+ return hasRowOrColumnDimension || hasMeasureGroup;
25
+ };
26
+ const autoMeasures = (advancedVSeed, context)=>{
27
+ const result = {
28
+ ...advancedVSeed
29
+ };
30
+ const { vseed } = context;
31
+ const { measures, dataset } = vseed;
32
+ if (!dataset) throw new Error('dataset is required');
33
+ if (0 === dataset.length) return result;
34
+ if (isPivotChart(vseed)) return autoMeasureGroup(advancedVSeed, context);
35
+ if (measures) {
36
+ result.measures = measures;
37
+ return result;
38
+ }
39
+ const top100dataset = dataset.slice(0, 100);
40
+ const sample = top100dataset.reduce((prev, cur)=>({
41
+ ...prev,
42
+ ...cur
43
+ }), {});
44
+ result.measures = Object.keys(sample).filter((key)=>top100dataset.some((item)=>'number' == typeof item[key]) && ![
45
+ '',
46
+ null,
47
+ void 0
48
+ ].includes(key)).map((measure)=>({
49
+ id: measure,
50
+ alias: measure
51
+ }));
52
+ return result;
53
+ };
54
+ const autoMeasureGroup = (advancedVSeed, context)=>{
55
+ const { vseed } = context;
56
+ const { measures } = vseed;
57
+ const hasMeasureGroup = measures?.some((measure)=>measure.children);
58
+ if (!measures) return advancedVSeed;
59
+ if (!hasMeasureGroup) {
60
+ const newMeasures = [
61
+ {
62
+ id: 'measureGroup',
63
+ alias: 'measureGroup',
64
+ children: measures
65
+ }
66
+ ];
67
+ return {
68
+ ...advancedVSeed,
69
+ measures: newMeasures
70
+ };
71
+ }
72
+ let currentGroup = createEmptyMeasureGroup();
73
+ const measureGroups = [];
74
+ for (const measure of measures)if ('children' in measure) {
75
+ if (currentGroup.children?.length) {
76
+ currentGroup.id = currentGroup.children.map((item)=>item.id).join('-');
77
+ currentGroup.alias = currentGroup.children.map((item)=>item.alias).join('-');
78
+ measureGroups.push(currentGroup);
79
+ currentGroup = createEmptyMeasureGroup();
80
+ }
81
+ measureGroups.push(measure);
82
+ } else currentGroup.children?.push(measure);
83
+ if (currentGroup.children?.length) {
84
+ currentGroup.id = currentGroup.children.map((item)=>item.id).join('-');
85
+ currentGroup.alias = currentGroup.children.map((item)=>item.alias).join('-');
86
+ measureGroups.push(currentGroup);
87
+ currentGroup = createEmptyMeasureGroup();
88
+ }
89
+ advancedVSeed.measures = measureGroups;
90
+ return advancedVSeed;
91
+ };
92
+ const createEmptyMeasureGroup = ()=>({
93
+ id: '',
94
+ alias: '',
95
+ children: []
96
+ });
97
+ const autoDimensions = (advancedVSeed, context)=>{
98
+ const result = {
99
+ ...advancedVSeed
100
+ };
101
+ const { vseed } = context;
102
+ const { dimensions, dataset } = vseed;
103
+ const { measures = [] } = advancedVSeed;
104
+ if (!dataset) throw new Error('dataset is required');
105
+ if (0 === dataset.length) return result;
106
+ if (dimensions) {
107
+ result.dimensions = dimensions;
108
+ return result;
109
+ }
110
+ const top100dataset = dataset.slice(0, 100);
111
+ const sample = top100dataset.reduce((prev, cur)=>({
112
+ ...prev,
113
+ ...cur
114
+ }), {});
115
+ result.dimensions = Object.keys(sample).filter((key)=>top100dataset.some((item)=>'string' == typeof item[key]) && ![
116
+ '',
117
+ null,
118
+ void 0
119
+ ].includes(key) && !measures.some((measure)=>measure.id === key)).map((dim)=>({
120
+ id: dim,
121
+ alias: dim,
122
+ location: 'dimension'
123
+ }));
124
+ return result;
125
+ };
3
126
  const FoldMeasureName = '__MeaName__';
4
127
  const FoldMeasureValue = '__MeaValue__';
5
128
  const FoldMeasureId = '__MeaId__';
@@ -283,10 +406,10 @@ const pivotReshapeTo2D1M = (advancedVSeed, context)=>{
283
406
  if (!measures) return;
284
407
  const groupId = measureGroup.id;
285
408
  const { dataset: newSubDataset, foldInfo, unfoldInfo } = dataReshapeFor2D1M(dataset, commonDimensions, measures, {
286
- foldMeasureId: FoldMeasureId + groupId,
287
- foldMeasureName: FoldMeasureName + groupId,
409
+ foldMeasureId: FoldMeasureId,
410
+ foldMeasureName: FoldMeasureName,
288
411
  foldMeasureValue: FoldMeasureValue + groupId,
289
- unfoldDimensionGroup: UnfoldDimensionGroup + groupId
412
+ unfoldDimensionGroup: UnfoldDimensionGroup
290
413
  });
291
414
  const reshapeInfo = {
292
415
  id: groupId,
@@ -409,162 +532,89 @@ const encodingPolar = (advancedVSeed)=>{
409
532
  encoding
410
533
  };
411
534
  };
412
- const initAdvancedVSeed = (advancedVSeed, context)=>{
535
+ const vchartBaseConfig = (advancedVSeed, context)=>{
413
536
  const { vseed } = context;
414
- const { chartType = 'table' } = vseed;
415
- return {
416
- ...advancedVSeed,
417
- chartType
418
- };
419
- };
420
- const execPipeline = (pipeline, context, initialValue = {})=>{
421
- const result = pipeline.reduce((prev, cur)=>cur(prev, context), initialValue);
422
- return result;
423
- };
424
- const isVTable = (chartType)=>[
425
- 'table',
426
- 'pivotTable'
427
- ].includes(chartType);
428
- const isVChart = (chartType)=>!isVTable(chartType);
429
- const isPivotChart = (vseed)=>{
430
- const { measures, dimensions } = vseed;
431
- const hasRowOrColumnDimension = dimensions && dimensions.some((dimension)=>'rowDimension' === dimension.location || 'columnDimension' === dimension.location);
432
- const hasMeasureGroup = measures && measures.find((measure)=>measure && measure.children);
433
- return hasRowOrColumnDimension || hasMeasureGroup;
434
- };
435
- const autoMeasures = (advancedVSeed, context)=>{
436
537
  const result = {
437
538
  ...advancedVSeed
438
539
  };
439
- const { vseed } = context;
440
- const { measures, dataset } = vseed;
441
- if (!dataset) throw new Error('dataset is required');
442
- if (0 === dataset.length) return result;
443
- if (isPivotChart(vseed)) return autoMeasureGroup(advancedVSeed, context);
444
- if (measures) {
445
- result.measures = measures;
446
- return result;
447
- }
448
- const top100dataset = dataset.slice(0, 100);
449
- const sample = top100dataset.reduce((prev, cur)=>({
450
- ...prev,
451
- ...cur
452
- }), {});
453
- result.measures = Object.keys(sample).filter((key)=>top100dataset.some((item)=>'number' == typeof item[key]) && ![
454
- '',
455
- null,
456
- void 0
457
- ].includes(key)).map((measure)=>({
458
- id: measure,
459
- alias: measure
460
- }));
540
+ const config = external_remeda_pick(vseed, [
541
+ 'backgroundColor',
542
+ 'color',
543
+ 'label',
544
+ 'legend',
545
+ 'tooltip'
546
+ ]);
547
+ result.baseConfig = {
548
+ vchart: {
549
+ ...config
550
+ }
551
+ };
461
552
  return result;
462
553
  };
463
- const autoMeasureGroup = (advancedVSeed, context)=>{
554
+ const lineConfig = (advancedVSeed, context)=>{
464
555
  const { vseed } = context;
465
- const { measures } = vseed;
466
- const hasMeasureGroup = measures?.some((measure)=>measure.children);
467
- if (!measures) return advancedVSeed;
468
- if (!hasMeasureGroup) {
469
- const newMeasures = [
470
- {
471
- id: 'measureGroup',
472
- alias: 'measureGroup',
473
- children: measures
474
- }
475
- ];
476
- return {
477
- ...advancedVSeed,
478
- measures: newMeasures
479
- };
480
- }
481
- let currentGroup = createEmptyMeasureGroup();
482
- const measureGroups = [];
483
- for (const measure of measures)if ('children' in measure) {
484
- if (currentGroup.children?.length) {
485
- currentGroup.id = currentGroup.children.map((item)=>item.id).join('-');
486
- currentGroup.alias = currentGroup.children.map((item)=>item.alias).join('-');
487
- measureGroups.push(currentGroup);
488
- currentGroup = createEmptyMeasureGroup();
489
- }
490
- measureGroups.push(measure);
491
- } else currentGroup.children?.push(measure);
492
- if (currentGroup.children?.length) {
493
- currentGroup.id = currentGroup.children.map((item)=>item.id).join('-');
494
- currentGroup.alias = currentGroup.children.map((item)=>item.alias).join('-');
495
- measureGroups.push(currentGroup);
496
- currentGroup = createEmptyMeasureGroup();
497
- }
498
- advancedVSeed.measures = measureGroups;
499
- return advancedVSeed;
500
- };
501
- const createEmptyMeasureGroup = ()=>({
502
- id: '',
503
- alias: '',
504
- children: []
505
- });
506
- const autoDimensions = (advancedVSeed, context)=>{
556
+ const { chartType } = vseed;
507
557
  const result = {
508
558
  ...advancedVSeed
509
559
  };
510
- const { vseed } = context;
511
- const { dimensions, dataset } = vseed;
512
- const { measures = [] } = advancedVSeed;
513
- if (!dataset) throw new Error('dataset is required');
514
- if (0 === dataset.length) return result;
515
- if (dimensions) {
516
- result.dimensions = dimensions;
517
- return result;
518
- }
519
- const top100dataset = dataset.slice(0, 100);
520
- const sample = top100dataset.reduce((prev, cur)=>({
521
- ...prev,
522
- ...cur
523
- }), {});
524
- result.dimensions = Object.keys(sample).filter((key)=>top100dataset.some((item)=>'string' == typeof item[key]) && ![
525
- '',
526
- null,
527
- void 0
528
- ].includes(key) && !measures.some((measure)=>measure.id === key)).map((dim)=>({
529
- id: dim,
530
- alias: dim,
531
- location: 'dimension'
532
- }));
560
+ const config = external_remeda_pick(vseed, [
561
+ 'xAxis',
562
+ 'yAxis'
563
+ ]);
564
+ result.config = {
565
+ ...result.config || {},
566
+ [chartType]: {
567
+ ...config
568
+ }
569
+ };
533
570
  return result;
534
571
  };
535
- const vchartBaseConfig = (advancedVSeed, context)=>{
572
+ const pieConfig = (advancedVSeed, context)=>{
536
573
  const { vseed } = context;
574
+ const { chartType } = vseed;
537
575
  const result = {
538
576
  ...advancedVSeed
539
577
  };
540
- const config = external_remeda_pick(vseed, [
541
- 'backgroundColor',
542
- 'color',
543
- 'label',
544
- 'legend',
545
- 'tooltip'
546
- ]);
547
- result.baseConfig = {
548
- vchart: {
578
+ const config = external_remeda_pick(vseed, []);
579
+ result.config = {
580
+ ...result.config || {},
581
+ [chartType]: {
549
582
  ...config
550
583
  }
551
584
  };
552
585
  return result;
553
586
  };
587
+ const barConfig = lineConfig;
588
+ const barParallelConfig = lineConfig;
589
+ const barPercentConfig = lineConfig;
590
+ const columnConfig = lineConfig;
591
+ const columnParallelConfig = lineConfig;
592
+ const columnPercentConfig = lineConfig;
593
+ const areaConfig = lineConfig;
594
+ const areaPercentConfig = lineConfig;
554
595
  const vchartTheme = (advancedVSeed, context)=>{
555
596
  const { customTheme, vseed } = context;
556
- const { theme = 'light' } = vseed;
597
+ const { theme = 'light', chartType } = vseed;
557
598
  const result = {
558
599
  ...advancedVSeed
559
600
  };
560
601
  if (!customTheme || !customTheme[theme]) return result;
561
- const config = result.baseConfig?.vchart;
562
- const themeConfig = customTheme?.[theme].baseConfig?.vchart;
563
- if (!themeConfig || !config) return result;
564
- const mergedConfig = external_remeda_mergeDeep(themeConfig, external_remeda_clone(config));
565
- result.baseConfig = {
566
- vchart: mergedConfig
567
- };
602
+ const baseConfigVChartTheme = customTheme?.[theme].baseConfig?.vchart;
603
+ if (baseConfigVChartTheme) {
604
+ const baseConfigVChart = result.baseConfig?.vchart || {};
605
+ const mergedConfig = external_remeda_mergeDeep(baseConfigVChartTheme, external_remeda_clone(baseConfigVChart));
606
+ result.baseConfig = {
607
+ vchart: mergedConfig
608
+ };
609
+ }
610
+ const chartConfigTheme = customTheme?.[theme].config?.[chartType];
611
+ if (chartConfigTheme) {
612
+ const chartConfig = result.config?.[chartType] || {};
613
+ const mergedConfig = external_remeda_mergeDeep(chartConfigTheme, external_remeda_clone(chartConfig));
614
+ result.config = {
615
+ [chartType]: mergedConfig
616
+ };
617
+ }
568
618
  return result;
569
619
  };
570
620
  const pivotAdapter = (pipeline, pivotPipeline)=>(advancedVSeed, context)=>{
@@ -584,6 +634,7 @@ const lineAdvancedPipeline = [
584
634
  ]),
585
635
  encodingXY,
586
636
  vchartBaseConfig,
637
+ lineConfig,
587
638
  vchartTheme
588
639
  ];
589
640
  const barAdvancedPipeline = [
@@ -596,6 +647,7 @@ const barAdvancedPipeline = [
596
647
  pivotReshapeTo2D1M
597
648
  ]),
598
649
  encodingYX,
650
+ barConfig,
599
651
  vchartBaseConfig,
600
652
  vchartTheme
601
653
  ];
@@ -609,6 +661,7 @@ const barParallelAdvancedPipeline = [
609
661
  pivotReshapeTo2D1M
610
662
  ]),
611
663
  encodingYX,
664
+ barParallelConfig,
612
665
  vchartBaseConfig,
613
666
  vchartTheme
614
667
  ];
@@ -622,6 +675,7 @@ const barPercentAdvancedPipeline = [
622
675
  pivotReshapeTo2D1M
623
676
  ]),
624
677
  encodingYX,
678
+ barPercentConfig,
625
679
  vchartBaseConfig,
626
680
  vchartTheme
627
681
  ];
@@ -635,6 +689,7 @@ const columnAdvancedPipeline = [
635
689
  pivotReshapeTo2D1M
636
690
  ]),
637
691
  encodingXY,
692
+ columnConfig,
638
693
  vchartBaseConfig,
639
694
  vchartTheme
640
695
  ];
@@ -648,6 +703,7 @@ const columnParallelAdvancedPipeline = [
648
703
  pivotReshapeTo2D1M
649
704
  ]),
650
705
  encodingXY,
706
+ columnParallelConfig,
651
707
  vchartBaseConfig,
652
708
  vchartTheme
653
709
  ];
@@ -661,6 +717,7 @@ const columnPercentAdvancedPipeline = [
661
717
  pivotReshapeTo2D1M
662
718
  ]),
663
719
  encodingXY,
720
+ columnPercentConfig,
664
721
  vchartBaseConfig,
665
722
  vchartTheme
666
723
  ];
@@ -674,6 +731,7 @@ const areaAdvancedPipeline = [
674
731
  pivotReshapeTo2D1M
675
732
  ]),
676
733
  encodingXY,
734
+ areaConfig,
677
735
  vchartBaseConfig,
678
736
  vchartTheme
679
737
  ];
@@ -687,6 +745,7 @@ const areaPercentAdvancedPipeline = [
687
745
  pivotReshapeTo2D1M
688
746
  ]),
689
747
  encodingXY,
748
+ areaPercentConfig,
690
749
  vchartBaseConfig,
691
750
  vchartTheme
692
751
  ];
@@ -700,6 +759,7 @@ const pieAdvancedPipeline = [
700
759
  pivotReshapeTo1D1M
701
760
  ]),
702
761
  encodingPolar,
762
+ pieConfig,
703
763
  vchartBaseConfig,
704
764
  vchartTheme
705
765
  ];
@@ -747,6 +807,11 @@ const initColumn = (spec, context)=>{
747
807
  result.yField = encoding[0].y[0];
748
808
  result.seriesField = encoding[0].group[0];
749
809
  result.padding = 0;
810
+ result.region = [
811
+ {
812
+ clip: true
813
+ }
814
+ ];
750
815
  return result;
751
816
  };
752
817
  const initBar = (spec, context)=>{
@@ -762,6 +827,11 @@ const initBar = (spec, context)=>{
762
827
  result.xField = encoding[0].x?.[0];
763
828
  result.seriesField = encoding[0].group?.[0];
764
829
  result.padding = 0;
830
+ result.region = [
831
+ {
832
+ clip: true
833
+ }
834
+ ];
765
835
  return result;
766
836
  };
767
837
  const initBarParallel = (spec, context)=>{
@@ -781,6 +851,11 @@ const initBarParallel = (spec, context)=>{
781
851
  result.xField = encoding[0].x[0];
782
852
  result.seriesField = encoding[0].group[0];
783
853
  result.padding = 0;
854
+ result.region = [
855
+ {
856
+ clip: true
857
+ }
858
+ ];
784
859
  return result;
785
860
  };
786
861
  const initArea = (spec, context)=>{
@@ -796,6 +871,11 @@ const initArea = (spec, context)=>{
796
871
  result.yField = encoding[0].y[0];
797
872
  result.seriesField = encoding[0].group[0];
798
873
  result.padding = 0;
874
+ result.region = [
875
+ {
876
+ clip: true
877
+ }
878
+ ];
799
879
  return result;
800
880
  };
801
881
  const initLine = (spec, context)=>{
@@ -811,6 +891,11 @@ const initLine = (spec, context)=>{
811
891
  result.yField = encoding[0].y[0];
812
892
  result.seriesField = encoding[0].group[0];
813
893
  result.padding = 0;
894
+ result.region = [
895
+ {
896
+ clip: true
897
+ }
898
+ ];
814
899
  return result;
815
900
  };
816
901
  const initColumnParallel = (spec, context)=>{
@@ -830,6 +915,11 @@ const initColumnParallel = (spec, context)=>{
830
915
  result.yField = encoding[0].y[0];
831
916
  result.seriesField = encoding[0].group[0];
832
917
  result.padding = 0;
918
+ result.region = [
919
+ {
920
+ clip: true
921
+ }
922
+ ];
833
923
  return result;
834
924
  };
835
925
  const initPie = (spec, context)=>{
@@ -846,6 +936,11 @@ const initPie = (spec, context)=>{
846
936
  result.categoryField = encoding[0].angle[0];
847
937
  result.seriesField = encoding[0].group[0];
848
938
  result.padding = 0;
939
+ result.region = [
940
+ {
941
+ clip: true
942
+ }
943
+ ];
849
944
  return result;
850
945
  };
851
946
  const initPivot = (spec)=>{
@@ -863,67 +958,328 @@ const initPivot = (spec)=>{
863
958
  indicatorsAsCol: false
864
959
  };
865
960
  };
866
- const xBand = (spec)=>{
961
+ const xBand = (spec, context)=>{
867
962
  const result = {
868
963
  ...spec
869
964
  };
965
+ const { advancedVSeed, vseed } = context;
966
+ const { chartType } = vseed;
967
+ const config = advancedVSeed.config?.[chartType]?.xAxis;
870
968
  if (!result.axes) result.axes = [];
969
+ if (!config) {
970
+ result.axes = [
971
+ ...result.axes,
972
+ {
973
+ visible: true,
974
+ type: 'band',
975
+ orient: 'bottom'
976
+ }
977
+ ];
978
+ return result;
979
+ }
980
+ const { visible = true, label, tick, title, grid, line, labelAutoHide, labelAutoHideGap, labelAutoLimit, labelAutoLimitLength, labelAutoRotate, labelAutoRotateAngleRange } = config;
981
+ const sampling = !(labelAutoHide || labelAutoRotate || labelAutoLimit);
982
+ const bandAxis = {
983
+ visible,
984
+ type: 'band',
985
+ orient: 'bottom',
986
+ maxHeight: labelAutoLimitLength,
987
+ sampling,
988
+ hover: true,
989
+ label: {
990
+ visible: label?.visible,
991
+ flush: true,
992
+ space: 8,
993
+ style: {
994
+ maxLineWidth: labelAutoLimitLength,
995
+ fill: label?.labelColor,
996
+ angle: label?.labelAngle,
997
+ fontSize: label?.labelFontSize,
998
+ fontWeight: label?.labelFontWeight
999
+ },
1000
+ minGap: labelAutoHideGap,
1001
+ autoHide: labelAutoHide,
1002
+ autoHideMethod: 'greedy',
1003
+ autoHideSeparation: labelAutoHideGap,
1004
+ autoLimit: labelAutoLimit,
1005
+ autoRotate: labelAutoRotate,
1006
+ autoRotateAngle: labelAutoRotateAngleRange,
1007
+ lastVisible: true
1008
+ },
1009
+ title: {
1010
+ visible: title?.visible,
1011
+ text: title?.titleText,
1012
+ style: {
1013
+ fill: title?.titleColor,
1014
+ fontSize: title?.titleFontSize,
1015
+ fontWeight: title?.titleFontWeight
1016
+ }
1017
+ },
1018
+ tick: {
1019
+ visible: tick?.visible,
1020
+ tickSize: tick?.tickSize,
1021
+ inside: tick?.tickInside,
1022
+ style: {
1023
+ stroke: tick?.tickColor
1024
+ }
1025
+ },
1026
+ grid: {
1027
+ visible: grid?.visible,
1028
+ style: {
1029
+ lineWidth: grid?.gridWidth,
1030
+ stroke: grid?.gridColor
1031
+ }
1032
+ },
1033
+ domainLine: {
1034
+ visible: line?.visible,
1035
+ style: {
1036
+ lineWidth: line?.lineWidth,
1037
+ stroke: line?.lineColor
1038
+ }
1039
+ }
1040
+ };
871
1041
  result.axes = [
872
1042
  ...result.axes,
873
- {
874
- visible: true,
875
- type: 'band',
876
- orient: 'bottom'
877
- }
1043
+ bandAxis
878
1044
  ];
879
1045
  return result;
880
1046
  };
881
- const xLinear = (spec)=>{
1047
+ const xLinear = (spec, context)=>{
882
1048
  const result = {
883
1049
  ...spec
884
1050
  };
1051
+ const { advancedVSeed, vseed } = context;
1052
+ const { chartType } = vseed;
1053
+ const config = advancedVSeed.config?.[chartType]?.xAxis;
885
1054
  if (!result.axes) result.axes = [];
1055
+ if (!config) {
1056
+ result.axes = [
1057
+ ...result.axes,
1058
+ {
1059
+ visible: true,
1060
+ type: 'linear',
1061
+ orient: 'bottom'
1062
+ }
1063
+ ];
1064
+ return result;
1065
+ }
1066
+ const { visible = true, label, tick, title, grid, line, zero, nice, inverse, max, min } = config;
1067
+ const linearAxis = {
1068
+ visible,
1069
+ type: 'linear',
1070
+ orient: 'bottom',
1071
+ nice,
1072
+ zero,
1073
+ inverse,
1074
+ max,
1075
+ min,
1076
+ label: {
1077
+ visible: label?.visible,
1078
+ style: {
1079
+ fill: label?.labelColor,
1080
+ angle: label?.labelAngle,
1081
+ fontSize: label?.labelFontSize,
1082
+ fontWeight: label?.labelFontWeight
1083
+ }
1084
+ },
1085
+ title: {
1086
+ visible: title?.visible,
1087
+ text: title?.titleText,
1088
+ style: {
1089
+ fill: title?.titleColor,
1090
+ fontSize: title?.titleFontSize,
1091
+ fontWeight: title?.titleFontWeight
1092
+ }
1093
+ },
1094
+ tick: {
1095
+ visible: tick?.visible,
1096
+ tickSize: tick?.tickSize,
1097
+ inside: tick?.tickInside,
1098
+ style: {
1099
+ stroke: tick?.tickColor
1100
+ }
1101
+ },
1102
+ grid: {
1103
+ visible: grid?.visible,
1104
+ style: {
1105
+ lineWidth: grid?.gridWidth,
1106
+ stroke: grid?.gridColor
1107
+ }
1108
+ },
1109
+ domainLine: {
1110
+ visible: line?.visible,
1111
+ style: {
1112
+ lineWidth: line?.lineWidth,
1113
+ stroke: line?.lineColor
1114
+ }
1115
+ }
1116
+ };
886
1117
  result.axes = [
887
1118
  ...result.axes,
888
- {
889
- visible: true,
890
- type: 'linear',
891
- orient: 'bottom',
892
- nice: true,
893
- zero: true
894
- }
1119
+ linearAxis
895
1120
  ];
896
1121
  return result;
897
1122
  };
898
- const yBand = (spec)=>{
1123
+ const yBand = (spec, context)=>{
899
1124
  const result = {
900
1125
  ...spec
901
1126
  };
1127
+ const { advancedVSeed, vseed } = context;
1128
+ const { chartType } = vseed;
1129
+ const config = advancedVSeed.config?.[chartType]?.yAxis;
902
1130
  if (!result.axes) result.axes = [];
1131
+ if (!config) {
1132
+ result.axes = [
1133
+ ...result.axes,
1134
+ {
1135
+ visible: true,
1136
+ type: 'band',
1137
+ orient: 'left'
1138
+ }
1139
+ ];
1140
+ return result;
1141
+ }
1142
+ const { visible = true, label, tick, title, grid, line, labelAutoHide, labelAutoHideGap, labelAutoLimit, labelAutoLimitLength, labelAutoRotate, labelAutoRotateAngleRange } = config;
1143
+ const sampling = !(labelAutoHide || labelAutoRotate || labelAutoLimit);
1144
+ const bandAxis = {
1145
+ visible,
1146
+ type: 'band',
1147
+ orient: 'left',
1148
+ maxWidth: labelAutoLimitLength,
1149
+ sampling,
1150
+ hover: true,
1151
+ label: {
1152
+ visible: label?.visible,
1153
+ flush: true,
1154
+ containerAlign: 'left',
1155
+ space: 8,
1156
+ style: {
1157
+ maxLineWidth: labelAutoLimitLength,
1158
+ fill: label?.labelColor,
1159
+ angle: label?.labelAngle,
1160
+ fontSize: label?.labelFontSize,
1161
+ fontWeight: label?.labelFontWeight
1162
+ },
1163
+ minGap: labelAutoHideGap,
1164
+ autoHide: labelAutoHide,
1165
+ autoHideMethod: 'greedy',
1166
+ autoHideSeparation: labelAutoHideGap,
1167
+ autoLimit: labelAutoLimit,
1168
+ autoRotate: labelAutoRotate,
1169
+ autoRotateAngle: labelAutoRotateAngleRange,
1170
+ lastVisible: true
1171
+ },
1172
+ title: {
1173
+ visible: title?.visible,
1174
+ text: title?.titleText,
1175
+ style: {
1176
+ fill: title?.titleColor,
1177
+ fontSize: title?.titleFontSize,
1178
+ fontWeight: title?.titleFontWeight
1179
+ }
1180
+ },
1181
+ tick: {
1182
+ visible: tick?.visible,
1183
+ tickSize: tick?.tickSize,
1184
+ inside: tick?.tickInside,
1185
+ style: {
1186
+ stroke: tick?.tickColor
1187
+ }
1188
+ },
1189
+ grid: {
1190
+ visible: grid?.visible,
1191
+ style: {
1192
+ lineWidth: grid?.gridWidth,
1193
+ stroke: grid?.gridColor
1194
+ }
1195
+ },
1196
+ domainLine: {
1197
+ visible: line?.visible,
1198
+ style: {
1199
+ lineWidth: line?.lineWidth,
1200
+ stroke: line?.lineColor
1201
+ }
1202
+ }
1203
+ };
903
1204
  result.axes = [
904
1205
  ...result.axes,
905
- {
906
- visible: true,
907
- type: 'band',
908
- orient: 'left'
909
- }
1206
+ bandAxis
910
1207
  ];
911
1208
  return result;
912
1209
  };
913
- const yLinear = (spec)=>{
1210
+ const yLinear = (spec, context)=>{
914
1211
  const result = {
915
1212
  ...spec
916
1213
  };
1214
+ const { advancedVSeed, vseed } = context;
1215
+ const { chartType } = vseed;
1216
+ const config = advancedVSeed.config?.[chartType]?.yAxis;
917
1217
  if (!result.axes) result.axes = [];
1218
+ if (!config) {
1219
+ result.axes = [
1220
+ ...result.axes,
1221
+ {
1222
+ visible: true,
1223
+ type: 'linear',
1224
+ orient: 'left'
1225
+ }
1226
+ ];
1227
+ return result;
1228
+ }
1229
+ const { visible = true, label, tick, title, grid, line, zero, nice, inverse, max, min } = config;
1230
+ const linearAxis = {
1231
+ visible,
1232
+ type: 'linear',
1233
+ orient: 'left',
1234
+ nice,
1235
+ zero,
1236
+ inverse,
1237
+ max,
1238
+ min,
1239
+ label: {
1240
+ visible: label?.visible,
1241
+ style: {
1242
+ fill: label?.labelColor,
1243
+ angle: label?.labelAngle,
1244
+ fontSize: label?.labelFontSize,
1245
+ fontWeight: label?.labelFontWeight
1246
+ }
1247
+ },
1248
+ title: {
1249
+ visible: title?.visible,
1250
+ text: title?.titleText,
1251
+ style: {
1252
+ fill: title?.titleColor,
1253
+ fontSize: title?.titleFontSize,
1254
+ fontWeight: title?.titleFontWeight
1255
+ }
1256
+ },
1257
+ tick: {
1258
+ visible: tick?.visible,
1259
+ tickSize: tick?.tickSize,
1260
+ inside: tick?.tickInside,
1261
+ style: {
1262
+ stroke: tick?.tickColor
1263
+ }
1264
+ },
1265
+ grid: {
1266
+ visible: grid?.visible,
1267
+ style: {
1268
+ lineWidth: grid?.gridWidth,
1269
+ stroke: grid?.gridColor
1270
+ }
1271
+ },
1272
+ domainLine: {
1273
+ visible: line?.visible,
1274
+ style: {
1275
+ lineWidth: line?.lineWidth,
1276
+ stroke: line?.lineColor
1277
+ }
1278
+ }
1279
+ };
918
1280
  result.axes = [
919
1281
  ...result.axes,
920
- {
921
- visible: true,
922
- type: 'linear',
923
- orient: 'left',
924
- nice: true,
925
- zero: true
926
- }
1282
+ linearAxis
927
1283
  ];
928
1284
  return result;
929
1285
  };
@@ -1291,7 +1647,7 @@ const pivotRowDimensions = (spec, context)=>{
1291
1647
  rows: rows
1292
1648
  };
1293
1649
  };
1294
- const line = [
1650
+ const line_line = [
1295
1651
  initLine,
1296
1652
  color_color,
1297
1653
  background_backgroundColor,
@@ -1322,7 +1678,7 @@ const pivotLine = [
1322
1678
  pivotLegend
1323
1679
  ];
1324
1680
  const lineSpecPipeline = [
1325
- pivotAdapter_pivotAdapter(line, pivotLine)
1681
+ pivotAdapter_pivotAdapter(line_line, pivotLine)
1326
1682
  ];
1327
1683
  const column = [
1328
1684
  initColumn,
@@ -1736,7 +2092,84 @@ const registerPie = ()=>{
1736
2092
  Builder._advancedPipelineMap.pie = pieAdvancedPipeline;
1737
2093
  Builder._specPipelineMap.pie = pieSpecPipeline;
1738
2094
  };
1739
- const darkTheme = ()=>({
2095
+ const darkTheme = ()=>{
2096
+ const linearAxis = {
2097
+ nice: true,
2098
+ zero: true,
2099
+ label: {
2100
+ visible: true,
2101
+ labelAngle: 0,
2102
+ labelColor: '#E2E3E6',
2103
+ labelFontSize: 12,
2104
+ labelFontWeight: 400
2105
+ },
2106
+ title: {
2107
+ visible: false,
2108
+ titleText: '',
2109
+ titleColor: '#FDFDFD',
2110
+ titleFontSize: 12,
2111
+ titleFontWeight: 400
2112
+ },
2113
+ grid: {
2114
+ visible: true,
2115
+ gridColor: '#404349',
2116
+ gridWidth: 0.5
2117
+ },
2118
+ tick: {
2119
+ visible: false,
2120
+ tickInside: false,
2121
+ tickSize: 4,
2122
+ tickColor: '#4B4F54'
2123
+ },
2124
+ line: {
2125
+ visible: false,
2126
+ lineColor: '#4B4F54',
2127
+ lineWidth: 1
2128
+ }
2129
+ };
2130
+ const bandAxis = {
2131
+ labelAutoHide: true,
2132
+ labelAutoHideGap: 4,
2133
+ labelAutoLimit: true,
2134
+ labelAutoLimitLength: 100,
2135
+ labelAutoRotate: true,
2136
+ labelAutoRotateAngleRange: [
2137
+ 0,
2138
+ -45,
2139
+ -90
2140
+ ],
2141
+ label: {
2142
+ visible: true,
2143
+ labelAngle: 0,
2144
+ labelColor: '#E2E3E6',
2145
+ labelFontSize: 12,
2146
+ labelFontWeight: 400
2147
+ },
2148
+ title: {
2149
+ visible: false,
2150
+ titleText: '',
2151
+ titleColor: '#FDFDFD',
2152
+ titleFontSize: 12,
2153
+ titleFontWeight: 400
2154
+ },
2155
+ grid: {
2156
+ visible: false,
2157
+ gridColor: '#404349',
2158
+ gridWidth: 0.5
2159
+ },
2160
+ tick: {
2161
+ visible: false,
2162
+ tickInside: false,
2163
+ tickSize: 4,
2164
+ tickColor: '#4B4F54'
2165
+ },
2166
+ line: {
2167
+ visible: true,
2168
+ lineColor: '#4B4F54',
2169
+ lineWidth: 1
2170
+ }
2171
+ };
2172
+ return {
1740
2173
  baseConfig: {
1741
2174
  vtable: {
1742
2175
  backgroundColor: '#141414'
@@ -1767,9 +2200,139 @@ const darkTheme = ()=>({
1767
2200
  enable: true
1768
2201
  }
1769
2202
  }
2203
+ },
2204
+ config: {
2205
+ line: {
2206
+ xAxis: bandAxis,
2207
+ yAxis: linearAxis
2208
+ },
2209
+ column: {
2210
+ xAxis: bandAxis,
2211
+ yAxis: linearAxis
2212
+ },
2213
+ columnParallel: {
2214
+ xAxis: bandAxis,
2215
+ yAxis: linearAxis
2216
+ },
2217
+ columnPercent: {
2218
+ xAxis: bandAxis,
2219
+ yAxis: linearAxis
2220
+ },
2221
+ bar: {
2222
+ xAxis: linearAxis,
2223
+ yAxis: bandAxis
2224
+ },
2225
+ barParallel: {
2226
+ xAxis: linearAxis,
2227
+ yAxis: bandAxis
2228
+ },
2229
+ barPercent: {
2230
+ xAxis: linearAxis,
2231
+ yAxis: bandAxis
2232
+ },
2233
+ area: {
2234
+ xAxis: bandAxis,
2235
+ yAxis: linearAxis
2236
+ },
2237
+ areaPercent: {
2238
+ xAxis: bandAxis,
2239
+ yAxis: linearAxis
2240
+ }
1770
2241
  }
1771
- });
1772
- const lightTheme = ()=>({
2242
+ };
2243
+ };
2244
+ const lightTheme = ()=>{
2245
+ const linearAxis = {
2246
+ nice: true,
2247
+ zero: true,
2248
+ inverse: false,
2249
+ label: {
2250
+ visible: true,
2251
+ labelAngle: 0,
2252
+ labelColor: '#797B85',
2253
+ labelFontSize: 12,
2254
+ labelFontWeight: 400
2255
+ },
2256
+ title: {
2257
+ visible: false,
2258
+ titleText: '',
2259
+ titleColor: '#646A73',
2260
+ titleFontSize: 12,
2261
+ titleFontWeight: 400
2262
+ },
2263
+ grid: {
2264
+ visible: true,
2265
+ gridColor: 'rgba(54, 65, 89, 0.15)',
2266
+ gridWidth: 0.5
2267
+ },
2268
+ tick: {
2269
+ visible: false,
2270
+ tickInside: false,
2271
+ tickSize: 4,
2272
+ tickColor: 'rgba(54, 65, 89, 0.30)'
2273
+ },
2274
+ line: {
2275
+ visible: false,
2276
+ lineColor: 'rgba(54, 65, 89, 0.30)',
2277
+ lineWidth: 1
2278
+ }
2279
+ };
2280
+ const bandAxis = {
2281
+ labelAutoHide: true,
2282
+ labelAutoHideGap: 4,
2283
+ labelAutoLimit: true,
2284
+ labelAutoLimitLength: 100,
2285
+ labelAutoRotate: true,
2286
+ labelAutoRotateAngleRange: [
2287
+ 0,
2288
+ -45,
2289
+ -90
2290
+ ],
2291
+ label: {
2292
+ visible: true,
2293
+ labelAngle: 0,
2294
+ labelColor: '#797B85',
2295
+ labelFontSize: 12,
2296
+ labelFontWeight: 400
2297
+ },
2298
+ title: {
2299
+ visible: false,
2300
+ titleText: '',
2301
+ titleColor: '#646A73',
2302
+ titleFontSize: 12,
2303
+ titleFontWeight: 400
2304
+ },
2305
+ grid: {
2306
+ visible: false,
2307
+ gridColor: 'rgba(54, 65, 89, 0.15)',
2308
+ gridWidth: 0.5
2309
+ },
2310
+ tick: {
2311
+ visible: false,
2312
+ tickInside: false,
2313
+ tickSize: 4,
2314
+ tickColor: 'rgba(54, 65, 89, 0.30)'
2315
+ },
2316
+ line: {
2317
+ visible: true,
2318
+ lineColor: 'rgba(54, 65, 89, 0.30)',
2319
+ lineWidth: 1
2320
+ }
2321
+ };
2322
+ const barBandAxis = {
2323
+ ...bandAxis,
2324
+ labelAutoHide: false,
2325
+ labelAutoHideGap: 1,
2326
+ labelAutoLimit: false,
2327
+ labelAutoLimitLength: void 0,
2328
+ labelAutoRotate: false,
2329
+ labelAutoRotateAngleRange: [
2330
+ 0,
2331
+ -45,
2332
+ -90
2333
+ ]
2334
+ };
2335
+ return {
1773
2336
  baseConfig: {
1774
2337
  vtable: {
1775
2338
  backgroundColor: '#ffffff'
@@ -1800,8 +2363,47 @@ const lightTheme = ()=>({
1800
2363
  enable: true
1801
2364
  }
1802
2365
  }
2366
+ },
2367
+ config: {
2368
+ line: {
2369
+ xAxis: bandAxis,
2370
+ yAxis: linearAxis
2371
+ },
2372
+ column: {
2373
+ xAxis: bandAxis,
2374
+ yAxis: linearAxis
2375
+ },
2376
+ columnParallel: {
2377
+ xAxis: bandAxis,
2378
+ yAxis: linearAxis
2379
+ },
2380
+ columnPercent: {
2381
+ xAxis: bandAxis,
2382
+ yAxis: linearAxis
2383
+ },
2384
+ bar: {
2385
+ xAxis: linearAxis,
2386
+ yAxis: barBandAxis
2387
+ },
2388
+ barParallel: {
2389
+ xAxis: linearAxis,
2390
+ yAxis: barBandAxis
2391
+ },
2392
+ barPercent: {
2393
+ xAxis: linearAxis,
2394
+ yAxis: barBandAxis
2395
+ },
2396
+ area: {
2397
+ xAxis: bandAxis,
2398
+ yAxis: linearAxis
2399
+ },
2400
+ areaPercent: {
2401
+ xAxis: bandAxis,
2402
+ yAxis: linearAxis
2403
+ }
1803
2404
  }
1804
- });
2405
+ };
2406
+ };
1805
2407
  const registerCustomTheme = (key, themeConfig)=>{
1806
2408
  Builder._themeMap[key] = themeConfig;
1807
2409
  };
@@ -1940,11 +2542,187 @@ const zBaseConfig = z.object({
1940
2542
  vchart: zVChartBaseConfig.optional(),
1941
2543
  vtable: zVTableBaseConfig.optional()
1942
2544
  });
2545
+ const zAxis = z.object({
2546
+ visible: z.boolean().default(true).optional(),
2547
+ min: z.number().optional(),
2548
+ max: z.number().optional(),
2549
+ nice: z.boolean().default(true).optional(),
2550
+ zero: z.boolean().default(true).optional(),
2551
+ inverse: z.boolean().default(false).optional(),
2552
+ labelAutoHide: z.boolean().default(true).optional(),
2553
+ labelAutoHideGap: z.number().default(4).optional(),
2554
+ labelAutoRotate: z.boolean().default(true).optional(),
2555
+ labelAutoRotateAngleRange: z.array(z.number()).default([
2556
+ 0,
2557
+ -45,
2558
+ -90
2559
+ ]).optional(),
2560
+ labelAutoLimit: z.boolean().default(true).optional(),
2561
+ labelAutoLimitLength: z.number().default(100).optional(),
2562
+ label: z.object({
2563
+ visible: z.boolean().default(true).optional(),
2564
+ labelColor: z.string().default('#797B85').optional(),
2565
+ labelFontSize: z.number().default(12).optional(),
2566
+ labelFontWeight: z.number().default(400).optional(),
2567
+ labelAngle: z.number().default(0).optional()
2568
+ }).optional(),
2569
+ line: z.object({
2570
+ visible: z.boolean().default(true).optional(),
2571
+ lineColor: z.string().default('rgba(54, 65, 89, 0.30)').optional(),
2572
+ lineWidth: z.number().default(1).optional()
2573
+ }).optional(),
2574
+ tick: z.object({
2575
+ visible: z.boolean().default(true).optional(),
2576
+ tickInside: z.boolean().default(false).optional(),
2577
+ tickColor: z.string().default('rgba(54, 65, 89, 0.30)').optional(),
2578
+ tickSize: z.number().default(4).optional()
2579
+ }).optional(),
2580
+ title: z.object({
2581
+ visible: z.boolean().default(false).optional(),
2582
+ titleText: z.string().default('').optional(),
2583
+ titleColor: z.string().default('#646A73').optional(),
2584
+ titleFontSize: z.number().default(12).optional(),
2585
+ titleFontWeight: z.number().default(400).optional()
2586
+ }).optional(),
2587
+ grid: z.object({
2588
+ visible: z.boolean().default(false).optional(),
2589
+ gridColor: z.string().default('rgba(54, 65, 89, 0.15)').optional(),
2590
+ gridWidth: z.number().default(0.5).optional()
2591
+ }).optional()
2592
+ });
2593
+ const zXBandAxis = z.object({
2594
+ visible: z.boolean().default(true).optional(),
2595
+ labelAutoHide: z.boolean().default(true).optional(),
2596
+ labelAutoHideGap: z.number().default(0).optional(),
2597
+ labelAutoRotate: z.boolean().default(true).optional(),
2598
+ labelAutoRotateAngleRange: z.array(z.number()).default([
2599
+ 0,
2600
+ -45,
2601
+ -90
2602
+ ]).optional(),
2603
+ labelAutoLimit: z.boolean().default(true).optional(),
2604
+ labelAutoLimitLength: z.number().default(100).optional(),
2605
+ label: z.object({
2606
+ visible: z.boolean().default(true).optional(),
2607
+ labelColor: z.string().default('#797B85').optional(),
2608
+ labelFontSize: z.number().default(12).optional(),
2609
+ labelFontWeight: z.number().default(400).optional(),
2610
+ labelAngle: z.number().default(0).optional()
2611
+ }).optional(),
2612
+ line: z.object({
2613
+ visible: z.boolean().default(true).optional(),
2614
+ lineColor: z.string().default('rgba(54, 65, 89, 0.30)').optional(),
2615
+ lineWidth: z.number().default(1).optional()
2616
+ }).optional(),
2617
+ tick: z.object({
2618
+ visible: z.boolean().default(true).optional(),
2619
+ tickInside: z.boolean().default(false).optional(),
2620
+ tickColor: z.string().default('rgba(54, 65, 89, 0.30)').optional(),
2621
+ tickSize: z.number().default(4).optional()
2622
+ }).optional(),
2623
+ title: z.object({
2624
+ visible: z.boolean().default(false).optional(),
2625
+ titleText: z.string().default('').optional(),
2626
+ titleColor: z.string().default('#646A73').optional(),
2627
+ titleFontSize: z.number().default(12).optional(),
2628
+ titleFontWeight: z.number().default(400).optional()
2629
+ }).optional(),
2630
+ grid: z.object({
2631
+ visible: z.boolean().default(false).optional(),
2632
+ gridColor: z.string().default('rgba(54, 65, 89, 0.15)').optional(),
2633
+ gridWidth: z.number().default(0.5).optional()
2634
+ }).optional()
2635
+ });
2636
+ const zYBandAxis = zXBandAxis;
2637
+ const zXLinearAxis = z.object({
2638
+ visible: z.boolean().default(true).optional(),
2639
+ min: z.number().optional(),
2640
+ max: z.number().optional(),
2641
+ nice: z.boolean().default(true).optional(),
2642
+ zero: z.boolean().default(true).optional(),
2643
+ inverse: z.boolean().default(false).optional(),
2644
+ label: z.object({
2645
+ visible: z.boolean().default(true).optional(),
2646
+ labelColor: z.string().default('#797B85').optional(),
2647
+ labelFontSize: z.number().default(12).optional(),
2648
+ labelFontWeight: z.number().default(400).optional(),
2649
+ labelAngle: z.number().default(0).optional()
2650
+ }).optional(),
2651
+ line: z.object({
2652
+ visible: z.boolean().default(true).optional(),
2653
+ lineColor: z.string().default('rgba(54, 65, 89, 0.30)').optional(),
2654
+ lineWidth: z.number().default(1).optional()
2655
+ }).optional(),
2656
+ tick: z.object({
2657
+ visible: z.boolean().default(true).optional(),
2658
+ tickInside: z.boolean().default(false).optional(),
2659
+ tickColor: z.string().default('rgba(54, 65, 89, 0.30)').optional(),
2660
+ tickSize: z.number().default(4).optional()
2661
+ }).optional(),
2662
+ title: z.object({
2663
+ visible: z.boolean().default(false).optional(),
2664
+ titleText: z.string().default('').optional(),
2665
+ titleColor: z.string().default('#646A73').optional(),
2666
+ titleFontSize: z.number().default(12).optional(),
2667
+ titleFontWeight: z.number().default(400).optional()
2668
+ }).optional(),
2669
+ grid: z.object({
2670
+ visible: z.boolean().default(false).optional(),
2671
+ gridColor: z.string().default('rgba(54, 65, 89, 0.15)').optional(),
2672
+ gridWidth: z.number().default(0.5).optional()
2673
+ }).optional()
2674
+ });
2675
+ const zYLinearAxis = zXLinearAxis;
2676
+ const zConfig = z.object({
2677
+ line: z.object({
2678
+ xAxis: zXBandAxis,
2679
+ yAxis: zYLinearAxis
2680
+ }).optional(),
2681
+ column: z.object({
2682
+ xAxis: zXBandAxis,
2683
+ yAxis: zYLinearAxis
2684
+ }).optional(),
2685
+ columnParallel: z.object({
2686
+ xAxis: zXBandAxis,
2687
+ yAxis: zYLinearAxis
2688
+ }).optional(),
2689
+ columnPercent: z.object({
2690
+ xAxis: zXBandAxis,
2691
+ yAxis: zYLinearAxis
2692
+ }).optional(),
2693
+ bar: z.object({
2694
+ xAxis: zXLinearAxis,
2695
+ yAxis: zYBandAxis
2696
+ }).optional(),
2697
+ barParallel: z.object({
2698
+ xAxis: zXLinearAxis,
2699
+ yAxis: zYBandAxis
2700
+ }).optional(),
2701
+ barPercent: z.object({
2702
+ xAxis: zXLinearAxis,
2703
+ yAxis: zYBandAxis
2704
+ }).optional(),
2705
+ area: z.object({
2706
+ xAxis: zXBandAxis,
2707
+ yAxis: zYLinearAxis
2708
+ }).optional(),
2709
+ areaPercent: z.object({
2710
+ xAxis: zXBandAxis,
2711
+ yAxis: zYLinearAxis
2712
+ }).optional(),
2713
+ pie: z.object({}).optional(),
2714
+ donut: z.object({}).optional(),
2715
+ rose: z.object({}).optional(),
2716
+ dualAxis: z.object({}).optional(),
2717
+ table: z.object({}).optional(),
2718
+ pivotTable: z.object({}).optional()
2719
+ });
1943
2720
  const zCustomThemeConfig = z.object({
1944
- baseConfig: zBaseConfig.optional()
2721
+ baseConfig: zBaseConfig.optional(),
2722
+ config: zConfig.optional()
1945
2723
  });
1946
2724
  const zCustomTheme = z.record(z.string(), zCustomThemeConfig).optional();
1947
2725
  const zTheme = z.string();
1948
- export { Builder, areaAdvancedPipeline, areaPercentAdvancedPipeline, areaPercentSpecPipeline, areaSpecPipeline, barAdvancedPipeline, barParallelAdvancedPipeline, barParallelSpecPipeline, barPercentAdvancedPipeline, barPercentSpecPipeline, barSpecPipeline, columnAdvancedPipeline, columnParallelAdvancedPipeline, columnParallelSpecPipeline, columnPercentAdvancedPipeline, columnPercentSpecPipeline, columnSpecPipeline, darkTheme, dataReshapeFor1D1M, dataReshapeFor2D1M, execPipeline, foldMeasures, isPivotChart, isVChart, isVTable, lightTheme, lineAdvancedPipeline, lineSpecPipeline, pieAdvancedPipeline, pieSpecPipeline, all_registerAll as registerAll, registerArea, registerAreaPercent, registerBar, registerBarParallel, registerBarPercent, registerColumn, registerColumnParallel, registerColumnPercent, registerCustomTheme, registerDarkTheme, registerLightTheme, registerLine, unfoldDimensions, zBackgroundColor, zBaseConfig, zChartType, zColor, zCustomTheme, zCustomThemeConfig, zDataset, zDatasetReshapeInfo, zDatum, zDimension, zDimensions, zEncoding, zFoldInfo, zLabel, zLegend, zMeasure, zMeasureGroup, zMeasures, zTheme, zTooltip, zUnfoldInfo };
2726
+ export { Builder, FoldMeasureId, FoldMeasureName, FoldMeasureValue, Separator, UnfoldDimensionGroup, areaAdvancedPipeline, areaPercentAdvancedPipeline, areaPercentSpecPipeline, areaSpecPipeline, barAdvancedPipeline, barParallelAdvancedPipeline, barParallelSpecPipeline, barPercentAdvancedPipeline, barPercentSpecPipeline, barSpecPipeline, columnAdvancedPipeline, columnParallelAdvancedPipeline, columnParallelSpecPipeline, columnPercentAdvancedPipeline, columnPercentSpecPipeline, columnSpecPipeline, darkTheme, dataReshapeFor1D1M, dataReshapeFor2D1M, execPipeline, foldMeasures, isPivotChart, isVChart, isVTable, lightTheme, lineAdvancedPipeline, lineSpecPipeline, pieAdvancedPipeline, pieSpecPipeline, all_registerAll as registerAll, registerArea, registerAreaPercent, registerBar, registerBarParallel, registerBarPercent, registerColumn, registerColumnParallel, registerColumnPercent, registerCustomTheme, registerDarkTheme, registerLightTheme, registerLine, unfoldDimensions, zAxis, zBackgroundColor, zBaseConfig, zChartType, zColor, zConfig, zCustomTheme, zCustomThemeConfig, zDataset, zDatasetReshapeInfo, zDatum, zDimension, zDimensions, zEncoding, zFoldInfo, zLabel, zLegend, zMeasure, zMeasureGroup, zMeasures, zTheme, zTooltip, zUnfoldInfo, zXBandAxis, zXLinearAxis, zYBandAxis, zYLinearAxis };
1949
2727
 
1950
2728
  //# sourceMappingURL=index.js.map