@visactor/vseed 0.0.23 → 0.0.25

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 (62) hide show
  1. package/dist/builder/builder/builder.d.ts +1125 -757
  2. package/dist/builder/register/chartType.d.ts +2 -0
  3. package/dist/dataReshape/dataReshapeFor2D1M0Name.d.ts +19 -0
  4. package/dist/dataReshape/index.d.ts +1 -0
  5. package/dist/dataReshape/unfoldZeroDimensions.d.ts +10 -0
  6. package/dist/index.cjs +921 -193
  7. package/dist/index.cjs.map +1 -1
  8. package/dist/index.js +870 -181
  9. package/dist/index.js.map +1 -1
  10. package/dist/pipeline/advanced/chart/pipeline/heatmap.d.ts +2 -0
  11. package/dist/pipeline/advanced/chart/pipeline/index.d.ts +2 -0
  12. package/dist/pipeline/advanced/chart/pipeline/radar.d.ts +2 -0
  13. package/dist/pipeline/advanced/chart/pipes/config/config.d.ts +2 -0
  14. package/dist/pipeline/advanced/chart/pipes/encoding/encodingAR.d.ts +2 -0
  15. package/dist/pipeline/advanced/chart/pipes/encoding/encodingMatrix.d.ts +2 -0
  16. package/dist/pipeline/advanced/chart/pipes/encoding/index.d.ts +1 -0
  17. package/dist/pipeline/advanced/chart/pipes/reshape/index.d.ts +3 -1
  18. package/dist/pipeline/advanced/chart/pipes/reshape/pivotReshapeTo2D1M0Name.d.ts +8 -0
  19. package/dist/pipeline/advanced/chart/pipes/reshape/reshapeTo2D1M0Name.d.ts +8 -0
  20. package/dist/pipeline/spec/chart/pipeline/heatmap.d.ts +2 -0
  21. package/dist/pipeline/spec/chart/pipeline/index.d.ts +3 -1
  22. package/dist/pipeline/spec/chart/pipeline/radar.d.ts +2 -0
  23. package/dist/pipeline/spec/chart/pipes/axes/index.d.ts +2 -0
  24. package/dist/pipeline/spec/chart/pipes/axes/radarAngle.d.ts +2 -0
  25. package/dist/pipeline/spec/chart/pipes/axes/radarRadius.d.ts +2 -0
  26. package/dist/pipeline/spec/chart/pipes/color/index.d.ts +1 -0
  27. package/dist/pipeline/spec/chart/pipes/color/linearColor.d.ts +2 -0
  28. package/dist/pipeline/spec/chart/pipes/dataset/{dataset.d.ts → datasetXY.d.ts} +1 -1
  29. package/dist/pipeline/spec/chart/pipes/{axes/a.d.ts → dataset/datasetYX.d.ts} +1 -1
  30. package/dist/pipeline/spec/chart/pipes/dataset/index.d.ts +2 -1
  31. package/dist/pipeline/spec/chart/pipes/init/heatmap.d.ts +2 -0
  32. package/dist/pipeline/spec/chart/pipes/init/index.d.ts +3 -2
  33. package/dist/pipeline/spec/chart/pipes/init/radar.d.ts +2 -0
  34. package/dist/pipeline/spec/chart/pipes/label/index.d.ts +1 -0
  35. package/dist/pipeline/spec/chart/pipes/label/labelColorInversion.d.ts +2 -0
  36. package/dist/pipeline/spec/chart/pipes/legend/colorLegend.d.ts +2 -0
  37. package/dist/pipeline/spec/chart/pipes/legend/index.d.ts +1 -0
  38. package/dist/types/advancedVSeed.d.ts +457 -187
  39. package/dist/types/chartType/area/area.d.ts +1 -1
  40. package/dist/types/chartType/areaPercent/areaPercent.d.ts +1 -1
  41. package/dist/types/chartType/areaRange/areaRange.d.ts +1 -1
  42. package/dist/types/chartType/funnel/funnel.d.ts +6 -39
  43. package/dist/types/chartType/heatmap/heatmap.d.ts +176 -0
  44. package/dist/types/chartType/heatmap/index.d.ts +1 -0
  45. package/dist/types/chartType/index.d.ts +4 -2
  46. package/dist/types/chartType/line/line.d.ts +1 -1
  47. package/dist/types/chartType/radar/index.d.ts +1 -0
  48. package/dist/types/chartType/radar/radar.d.ts +207 -0
  49. package/dist/types/properties/chartType/chartType.d.ts +10 -6
  50. package/dist/types/properties/config/color/color.d.ts +11 -0
  51. package/dist/types/properties/config/config.d.ts +519 -238
  52. package/dist/types/properties/config/legend/legend.d.ts +26 -0
  53. package/dist/types/properties/markStyle/areaStyle.d.ts +0 -2
  54. package/dist/types/properties/markStyle/barStyle.d.ts +0 -6
  55. package/dist/types/properties/markStyle/lineStyle.d.ts +1 -6
  56. package/dist/types/properties/markStyle/markStyle.d.ts +2 -2
  57. package/dist/types/properties/markStyle/pointStyle.d.ts +0 -6
  58. package/dist/types/properties/theme/customTheme.d.ts +496 -228
  59. package/dist/types/vseed.d.ts +838 -664
  60. package/dist/umd/index.js +895 -193
  61. package/dist/umd/index.js.map +1 -1
  62. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -655,6 +655,96 @@ const dataReshapeFor1D = (dataset, dimensions, measures, options)=>{
655
655
  };
656
656
  }
657
657
  };
658
+ const unfoldZeroDimensions = (dataset, measures, measureName, unfoldGroupName = UnfoldDimensionGroup, unfoldGroupId = UnfoldDimensionGroupId)=>{
659
+ const unfoldInfo = {
660
+ groupName: unfoldGroupName,
661
+ groupId: unfoldGroupId,
662
+ colorItems: [],
663
+ colorIdMap: {}
664
+ };
665
+ if (0 === measures.length) return {
666
+ dataset,
667
+ unfoldInfo: {
668
+ groupName: unfoldGroupName,
669
+ groupId: unfoldGroupId,
670
+ colorItems: [],
671
+ colorIdMap: {}
672
+ }
673
+ };
674
+ const colorItems = [];
675
+ const colorMap = {};
676
+ for(let i = 0; i < dataset.length; i++){
677
+ const datum = dataset[i];
678
+ const colorName = measureName;
679
+ const colorId = measureName;
680
+ datum[unfoldGroupName] = colorName;
681
+ datum[unfoldGroupId] = colorId;
682
+ colorItems.push(colorId);
683
+ colorMap[colorId] = colorName;
684
+ }
685
+ unfoldInfo.colorItems = unique(colorItems);
686
+ unfoldInfo.colorIdMap = colorMap;
687
+ return {
688
+ dataset,
689
+ unfoldInfo
690
+ };
691
+ };
692
+ const dataReshapeFor2D1M0Name_emptyReshapeResult = {
693
+ dataset: [],
694
+ foldInfo: {
695
+ foldMap: {},
696
+ measureId: '',
697
+ measureName: '',
698
+ measureValue: ''
699
+ },
700
+ unfoldInfo: {
701
+ groupName: '',
702
+ groupId: '',
703
+ colorItems: [],
704
+ colorIdMap: {}
705
+ }
706
+ };
707
+ const dataReshapeFor2D1M0Name = (dataset, dimensions, measures, options)=>{
708
+ const { foldMeasureId = FoldMeasureId, foldMeasureName = FoldMeasureName, foldMeasureValue = FoldMeasureValue, unfoldDimensionGroup = UnfoldDimensionGroup, unfoldDimensionGroupId = UnfoldDimensionGroupId } = options || {};
709
+ if (0 === dimensions.length && 0 === measures.length) return dataReshapeFor2D1M0Name_emptyReshapeResult;
710
+ const { dataset: foldedDataset, foldInfo } = foldMeasures(dataset, measures, foldMeasureId, foldMeasureName, foldMeasureValue);
711
+ if (0 === dimensions.length) {
712
+ const { dataset: finalDataset, unfoldInfo } = unfoldZeroDimensions(foldedDataset, [
713
+ {
714
+ id: foldMeasureValue,
715
+ alias: i18n`指标值`
716
+ }
717
+ ], i18n`指标名称`, unfoldDimensionGroup, unfoldDimensionGroupId);
718
+ return {
719
+ dataset: finalDataset,
720
+ foldInfo,
721
+ unfoldInfo
722
+ };
723
+ }
724
+ {
725
+ const onlyOneMeasure = 1 === measures.length;
726
+ const onlyOneDimension = 1 === dimensions.length;
727
+ const dims = [
728
+ ...dimensions
729
+ ];
730
+ if (!onlyOneMeasure || onlyOneDimension) dims.push({
731
+ id: foldMeasureName,
732
+ alias: i18n`指标名称`,
733
+ location: 'dimension'
734
+ });
735
+ const { dataset: finalDataset, unfoldInfo } = unfoldDimensions(foldedDataset, dims, [
736
+ {
737
+ id: foldMeasureValue,
738
+ alias: i18n`指标值`
739
+ }
740
+ ], 1, unfoldDimensionGroup, unfoldDimensionGroupId, foldMeasureId);
741
+ return {
742
+ dataset: finalDataset,
743
+ foldInfo,
744
+ unfoldInfo
745
+ };
746
+ }
747
+ };
658
748
  const reshapeTo2D1M = (advancedVSeed, context)=>{
659
749
  const result = {
660
750
  ...advancedVSeed
@@ -679,6 +769,30 @@ const reshapeTo2D1M = (advancedVSeed, context)=>{
679
769
  measures
680
770
  };
681
771
  };
772
+ const reshapeTo2D1M0Name = (advancedVSeed, context)=>{
773
+ const result = {
774
+ ...advancedVSeed
775
+ };
776
+ const { vseed } = context;
777
+ const { dataset } = vseed;
778
+ const { dimensions, measures } = advancedVSeed;
779
+ if (!measures || !dimensions || !dataset) return result;
780
+ if (0 === measures.length) throw new Error('measures can not be empty');
781
+ const { dataset: newDatasets, foldInfo, unfoldInfo } = dataReshapeFor2D1M0Name(dataset, dimensions, measures);
782
+ return {
783
+ ...result,
784
+ dataset: newDatasets,
785
+ datasetReshapeInfo: [
786
+ {
787
+ id: '2D1M',
788
+ foldInfo,
789
+ unfoldInfo
790
+ }
791
+ ],
792
+ dimensions,
793
+ measures
794
+ };
795
+ };
682
796
  const reshapeTo1D1M = (advancedVSeed, context)=>{
683
797
  const result = {
684
798
  ...advancedVSeed
@@ -745,7 +859,7 @@ const reshapeTo1D = (advancedVSeed, context)=>{
745
859
  ]
746
860
  };
747
861
  };
748
- const pivotReshapeTo1D1M = (advancedVSeed, context)=>{
862
+ const pivotReshapeTo2D1M = (advancedVSeed, context)=>{
749
863
  const result = {
750
864
  ...advancedVSeed
751
865
  };
@@ -758,14 +872,14 @@ const pivotReshapeTo1D1M = (advancedVSeed, context)=>{
758
872
  if (measures) measures.forEach((measure)=>{
759
873
  if (measure.children && measure.children.length > 0) measureGroups.push(measure);
760
874
  });
875
+ const commonDimensions = dimensions.filter((dim)=>'dimension' === dim.location);
761
876
  const newDatasets = [];
762
877
  const datasetReshapeInfo = [];
763
878
  measureGroups.forEach((measureGroup)=>{
764
879
  const measures = measureGroup.children;
765
880
  if (!measures) return;
766
- const commonDimensions = dimensions.filter((dim)=>'dimension' === dim.location);
767
881
  const groupId = measureGroup.id;
768
- const { dataset: newSubDataset, foldInfo, unfoldInfo } = dataReshapeFor1D1M(dataset, commonDimensions, measures, {
882
+ const { dataset: newSubDataset, foldInfo, unfoldInfo } = dataReshapeFor2D1M(dataset, commonDimensions, measures, {
769
883
  foldMeasureId: FoldMeasureId,
770
884
  foldMeasureName: FoldMeasureName,
771
885
  foldMeasureValue: FoldMeasureValue + groupId,
@@ -785,7 +899,47 @@ const pivotReshapeTo1D1M = (advancedVSeed, context)=>{
785
899
  datasetReshapeInfo: datasetReshapeInfo
786
900
  };
787
901
  };
788
- const pivotReshapeTo1D2M = (advancedVSeed, context)=>{
902
+ const pivotReshapeTo2D1M0Name = (advancedVSeed, context)=>{
903
+ const result = {
904
+ ...advancedVSeed
905
+ };
906
+ const { vseed } = context;
907
+ const { dataset } = vseed;
908
+ const { measures } = advancedVSeed;
909
+ const dimensions = advancedVSeed.dimensions;
910
+ if (!measures || !dimensions) return result;
911
+ const measureGroups = [];
912
+ if (measures) measures.forEach((measure)=>{
913
+ if (measure.children && measure.children.length > 0) measureGroups.push(measure);
914
+ });
915
+ const commonDimensions = dimensions.filter((dim)=>'dimension' === dim.location);
916
+ const newDatasets = [];
917
+ const datasetReshapeInfo = [];
918
+ measureGroups.forEach((measureGroup)=>{
919
+ const measures = measureGroup.children;
920
+ if (!measures) return;
921
+ const groupId = measureGroup.id;
922
+ const { dataset: newSubDataset, foldInfo, unfoldInfo } = dataReshapeFor2D1M0Name(dataset, commonDimensions, measures, {
923
+ foldMeasureId: FoldMeasureId,
924
+ foldMeasureName: FoldMeasureName,
925
+ foldMeasureValue: FoldMeasureValue + groupId,
926
+ unfoldDimensionGroup: UnfoldDimensionGroup
927
+ });
928
+ const reshapeInfo = {
929
+ id: groupId,
930
+ foldInfo,
931
+ unfoldInfo
932
+ };
933
+ newDatasets.push(newSubDataset);
934
+ datasetReshapeInfo.push(reshapeInfo);
935
+ });
936
+ return {
937
+ ...result,
938
+ dataset: newDatasets,
939
+ datasetReshapeInfo: datasetReshapeInfo
940
+ };
941
+ };
942
+ const pivotReshapeTo1D1M = (advancedVSeed, context)=>{
789
943
  const result = {
790
944
  ...advancedVSeed
791
945
  };
@@ -805,7 +959,7 @@ const pivotReshapeTo1D2M = (advancedVSeed, context)=>{
805
959
  if (!measures) return;
806
960
  const commonDimensions = dimensions.filter((dim)=>'dimension' === dim.location);
807
961
  const groupId = measureGroup.id;
808
- const { dataset: newSubDataset, foldInfo, unfoldInfo } = dataReshapeFor1D2M(dataset, commonDimensions, measures, {
962
+ const { dataset: newSubDataset, foldInfo, unfoldInfo } = dataReshapeFor1D1M(dataset, commonDimensions, measures, {
809
963
  foldMeasureId: FoldMeasureId,
810
964
  foldMeasureName: FoldMeasureName,
811
965
  foldMeasureValue: FoldMeasureValue + groupId,
@@ -825,7 +979,7 @@ const pivotReshapeTo1D2M = (advancedVSeed, context)=>{
825
979
  datasetReshapeInfo: datasetReshapeInfo
826
980
  };
827
981
  };
828
- const pivotReshapeTo2D1M = (advancedVSeed, context)=>{
982
+ const pivotReshapeTo1D2M = (advancedVSeed, context)=>{
829
983
  const result = {
830
984
  ...advancedVSeed
831
985
  };
@@ -838,14 +992,14 @@ const pivotReshapeTo2D1M = (advancedVSeed, context)=>{
838
992
  if (measures) measures.forEach((measure)=>{
839
993
  if (measure.children && measure.children.length > 0) measureGroups.push(measure);
840
994
  });
841
- const commonDimensions = dimensions.filter((dim)=>'dimension' === dim.location);
842
995
  const newDatasets = [];
843
996
  const datasetReshapeInfo = [];
844
997
  measureGroups.forEach((measureGroup)=>{
845
998
  const measures = measureGroup.children;
846
999
  if (!measures) return;
1000
+ const commonDimensions = dimensions.filter((dim)=>'dimension' === dim.location);
847
1001
  const groupId = measureGroup.id;
848
- const { dataset: newSubDataset, foldInfo, unfoldInfo } = dataReshapeFor2D1M(dataset, commonDimensions, measures, {
1002
+ const { dataset: newSubDataset, foldInfo, unfoldInfo } = dataReshapeFor1D2M(dataset, commonDimensions, measures, {
849
1003
  foldMeasureId: FoldMeasureId,
850
1004
  foldMeasureName: FoldMeasureName,
851
1005
  foldMeasureValue: FoldMeasureValue + groupId,
@@ -1156,6 +1310,43 @@ const encodingPie = (advancedVSeed)=>{
1156
1310
  encoding
1157
1311
  };
1158
1312
  };
1313
+ const encodingAR = (advancedVSeed)=>{
1314
+ const result = {
1315
+ ...advancedVSeed
1316
+ };
1317
+ const { datasetReshapeInfo, dimensions, measures } = advancedVSeed;
1318
+ if (!datasetReshapeInfo || !dimensions || !measures) return result;
1319
+ const angleDimension = dimensions.find((item)=>'rowDimension' !== item.location && 'columnDimension' !== item.location);
1320
+ const isZeroDimension = 0 === dimensions.length;
1321
+ const encoding = datasetReshapeInfo.reduce((prev, cur)=>{
1322
+ const { foldInfo, unfoldInfo } = cur;
1323
+ const angle = [
1324
+ isZeroDimension ? foldInfo.measureName : angleDimension?.id
1325
+ ];
1326
+ const radius = [
1327
+ foldInfo.measureValue
1328
+ ];
1329
+ const group = [
1330
+ unfoldInfo.groupId
1331
+ ];
1332
+ const color = [
1333
+ unfoldInfo.groupId
1334
+ ];
1335
+ return [
1336
+ ...prev,
1337
+ {
1338
+ angle,
1339
+ radius,
1340
+ group,
1341
+ color
1342
+ }
1343
+ ];
1344
+ }, []);
1345
+ return {
1346
+ ...result,
1347
+ encoding
1348
+ };
1349
+ };
1159
1350
  const encodingFunnel = (advancedVSeed)=>{
1160
1351
  const result = {
1161
1352
  ...advancedVSeed
@@ -1171,7 +1362,7 @@ const encodingFunnel = (advancedVSeed)=>{
1171
1362
  unfoldInfo.groupId
1172
1363
  ];
1173
1364
  const color = [
1174
- unfoldInfo.groupId
1365
+ foldInfo.measureValue
1175
1366
  ];
1176
1367
  return [
1177
1368
  ...prev,
@@ -1269,6 +1460,8 @@ const donutConfig = pieConfig;
1269
1460
  const roseConfig = pieConfig;
1270
1461
  const roseParallelConfig = pieConfig;
1271
1462
  const funnelConfig = pieConfig;
1463
+ const heatmapConfig = pieConfig;
1464
+ const radarConfig = pieConfig;
1272
1465
  const theme_theme = (advancedVSeed, context)=>{
1273
1466
  const { customTheme, vseed } = context;
1274
1467
  const { theme = 'light', chartType } = vseed;
@@ -1404,9 +1597,9 @@ const lineAdvancedPipeline = [
1404
1597
  autoMeasures,
1405
1598
  autoDimensions,
1406
1599
  pivotAdapter([
1407
- reshapeTo2D1M
1600
+ reshapeTo2D1M0Name
1408
1601
  ], [
1409
- pivotReshapeTo2D1M
1602
+ pivotReshapeTo2D1M0Name
1410
1603
  ]),
1411
1604
  encodingXY,
1412
1605
  sortXBandAxis,
@@ -1523,9 +1716,9 @@ const areaAdvancedPipeline = [
1523
1716
  autoMeasures,
1524
1717
  autoDimensions,
1525
1718
  pivotAdapter([
1526
- reshapeTo2D1M
1719
+ reshapeTo2D1M0Name
1527
1720
  ], [
1528
- pivotReshapeTo2D1M
1721
+ pivotReshapeTo2D1M0Name
1529
1722
  ]),
1530
1723
  encodingXY,
1531
1724
  sortXBandAxis,
@@ -1540,9 +1733,9 @@ const areaPercentAdvancedPipeline = [
1540
1733
  autoMeasures,
1541
1734
  autoDimensions,
1542
1735
  pivotAdapter([
1543
- reshapeTo2D1M
1736
+ reshapeTo2D1M0Name
1544
1737
  ], [
1545
- pivotReshapeTo2D1M
1738
+ pivotReshapeTo2D1M0Name
1546
1739
  ]),
1547
1740
  encodingXY,
1548
1741
  sortXBandAxis,
@@ -1655,6 +1848,71 @@ const scatterAdvancedPipeline = [
1655
1848
  markStyle_markStyle,
1656
1849
  annotation_annotation
1657
1850
  ];
1851
+ const encodingMatrix = (advancedVSeed)=>{
1852
+ const result = {
1853
+ ...advancedVSeed
1854
+ };
1855
+ const { datasetReshapeInfo, dimensions } = advancedVSeed;
1856
+ if (!datasetReshapeInfo || !dimensions) return result;
1857
+ const xDimension = dimensions.find((item)=>'rowDimension' !== item.location && 'columnDimension' !== item.location);
1858
+ const isZeroDimension = 0 === dimensions.length;
1859
+ const encoding = datasetReshapeInfo.reduce((prev, cur)=>{
1860
+ const { foldInfo, unfoldInfo } = cur;
1861
+ const x = [
1862
+ isZeroDimension ? foldInfo.measureName : xDimension?.id
1863
+ ];
1864
+ const y = [
1865
+ unfoldInfo.groupName
1866
+ ];
1867
+ const color = [
1868
+ foldInfo.measureValue
1869
+ ];
1870
+ return [
1871
+ ...prev,
1872
+ {
1873
+ x,
1874
+ y,
1875
+ color
1876
+ }
1877
+ ];
1878
+ }, []);
1879
+ return {
1880
+ ...result,
1881
+ encoding
1882
+ };
1883
+ };
1884
+ const heatmapAdvancedPipeline = [
1885
+ initAdvancedVSeed,
1886
+ autoMeasures,
1887
+ autoDimensions,
1888
+ pivotAdapter([
1889
+ reshapeTo2D1M
1890
+ ], [
1891
+ pivotReshapeTo2D1M
1892
+ ]),
1893
+ encodingMatrix,
1894
+ sortXBandAxis,
1895
+ heatmapConfig,
1896
+ theme_theme,
1897
+ markStyle_markStyle,
1898
+ annotation_annotation
1899
+ ];
1900
+ const radarAdvancedPipeline = [
1901
+ initAdvancedVSeed,
1902
+ autoMeasures,
1903
+ autoDimensions,
1904
+ pivotAdapter([
1905
+ reshapeTo2D1M0Name
1906
+ ], [
1907
+ pivotReshapeTo2D1M0Name
1908
+ ]),
1909
+ encodingAR,
1910
+ sort_sortLegend,
1911
+ radarConfig,
1912
+ theme_theme,
1913
+ markStyle_markStyle,
1914
+ annotation_annotation
1915
+ ];
1658
1916
  const autoMeasures_autoMeasures = (advancedVSeed, context)=>{
1659
1917
  const result = {
1660
1918
  ...advancedVSeed
@@ -1807,12 +2065,11 @@ const tableAdvancedPipeline = [
1807
2065
  records_records,
1808
2066
  theme_theme
1809
2067
  ];
1810
- const dataset_dataset = (spec, context)=>{
2068
+ const datasetYX = (spec, context)=>{
1811
2069
  const { advancedVSeed, vseed } = context;
1812
2070
  const { encoding, analysis, datasetReshapeInfo } = advancedVSeed;
1813
2071
  const { orderMapping = {} } = analysis ?? {};
1814
2072
  const angle = encoding[0]?.angle?.[0];
1815
- const x = encoding[0]?.x?.[0];
1816
2073
  const y = encoding[0]?.y?.[0];
1817
2074
  const group = encoding[0]?.group?.[0];
1818
2075
  const id = datasetReshapeInfo[0].id;
@@ -1820,25 +2077,57 @@ const dataset_dataset = (spec, context)=>{
1820
2077
  if (angle) fields[angle] = {
1821
2078
  sortIndex: 0
1822
2079
  };
1823
- if (x) {
1824
- const order = orderMapping[x];
1825
- if (order) fields[x] = {
2080
+ if (y) {
2081
+ const order = orderMapping[y];
2082
+ if (order) fields[y] = {
1826
2083
  sortIndex: 0,
1827
2084
  domain: order,
1828
2085
  lockStatisticsByDomain: true
1829
2086
  };
1830
- else fields[x] = {
2087
+ else fields[y] = {
1831
2088
  sortIndex: 0
1832
2089
  };
1833
2090
  }
1834
- if (y) {
1835
- const order = orderMapping[y];
1836
- if (order) fields[y] = {
2091
+ if (group) {
2092
+ const order = orderMapping[group];
2093
+ if (order) fields[group] = {
2094
+ sortIndex: 0,
2095
+ domain: order,
2096
+ lockStatisticsByDomain: true
2097
+ };
2098
+ else fields[group] = {
2099
+ sortIndex: 0
2100
+ };
2101
+ }
2102
+ return {
2103
+ ...spec,
2104
+ data: {
2105
+ id,
2106
+ values: isPivotChart(vseed) ? void 0 : advancedVSeed.dataset,
2107
+ fields: fields
2108
+ }
2109
+ };
2110
+ };
2111
+ const datasetXY = (spec, context)=>{
2112
+ const { advancedVSeed, vseed } = context;
2113
+ const { encoding, analysis, datasetReshapeInfo } = advancedVSeed;
2114
+ const { orderMapping = {} } = analysis ?? {};
2115
+ const angle = encoding[0]?.angle?.[0];
2116
+ const x = encoding[0]?.x?.[0];
2117
+ const group = encoding[0]?.group?.[0];
2118
+ const id = datasetReshapeInfo[0].id;
2119
+ const fields = {};
2120
+ if (angle) fields[angle] = {
2121
+ sortIndex: 0
2122
+ };
2123
+ if (x) {
2124
+ const order = orderMapping[x];
2125
+ if (order) fields[x] = {
1837
2126
  sortIndex: 0,
1838
2127
  domain: order,
1839
2128
  lockStatisticsByDomain: true
1840
2129
  };
1841
- else fields[y] = {
2130
+ else fields[x] = {
1842
2131
  sortIndex: 0
1843
2132
  };
1844
2133
  }
@@ -2099,8 +2388,9 @@ const initPie = (spec, context)=>{
2099
2388
  ...spec
2100
2389
  };
2101
2390
  const { advancedVSeed } = context;
2102
- const { encoding } = advancedVSeed;
2391
+ const { encoding, dataset } = advancedVSeed;
2103
2392
  if (!encoding[0].angle || !encoding[0].radius || !encoding[0].group) return result;
2393
+ const showStroke = dataset.length > 20;
2104
2394
  result.type = 'pie';
2105
2395
  result.outerRadius = 0.8;
2106
2396
  result.innerRadius = 0;
@@ -2116,7 +2406,7 @@ const initPie = (spec, context)=>{
2116
2406
  result.pie = {
2117
2407
  style: {
2118
2408
  stroke: '#ffffff',
2119
- lineWidth: 1,
2409
+ lineWidth: showStroke ? 1 : 0,
2120
2410
  centerOffset: 0
2121
2411
  },
2122
2412
  state: {
@@ -2134,8 +2424,9 @@ const initDonut = (spec, context)=>{
2134
2424
  ...spec
2135
2425
  };
2136
2426
  const { advancedVSeed } = context;
2137
- const { encoding } = advancedVSeed;
2427
+ const { encoding, dataset } = advancedVSeed;
2138
2428
  if (!encoding[0].angle || !encoding[0].radius || !encoding[0].group) return result;
2429
+ const showStroke = dataset.length > 20;
2139
2430
  result.type = 'pie';
2140
2431
  result.outerRadius = 0.8;
2141
2432
  result.innerRadius = 0.8 * result.outerRadius;
@@ -2151,7 +2442,7 @@ const initDonut = (spec, context)=>{
2151
2442
  result.pie = {
2152
2443
  style: {
2153
2444
  stroke: '#ffffff',
2154
- lineWidth: 1
2445
+ lineWidth: showStroke ? 1 : 0
2155
2446
  },
2156
2447
  state: {
2157
2448
  hover: {
@@ -2239,21 +2530,46 @@ const initRoseParallel = (spec, context)=>{
2239
2530
  result.animation = true;
2240
2531
  return result;
2241
2532
  };
2242
- const initPivot = (spec)=>{
2533
+ const initScatter = (spec, context)=>{
2243
2534
  const result = {
2244
2535
  ...spec
2245
2536
  };
2246
- return {
2247
- ...result,
2248
- animation: true,
2249
- rows: [],
2250
- columns: [],
2251
- indicators: [],
2252
- records: [],
2253
- widthMode: 'adaptive',
2254
- heightMode: 'adaptive',
2255
- indicatorsAsCol: false
2537
+ const { advancedVSeed } = context;
2538
+ const { encoding } = advancedVSeed;
2539
+ if (!encoding[0].y || !encoding[0].x || !encoding[0].group) return result;
2540
+ result.type = 'scatter';
2541
+ result.direction = 'vertical';
2542
+ result.xField = encoding[0].x[0];
2543
+ result.yField = encoding[0].y[0];
2544
+ result.seriesField = encoding[0].group[0];
2545
+ result.padding = 0;
2546
+ result.region = [
2547
+ {
2548
+ clip: true
2549
+ }
2550
+ ];
2551
+ result.animation = true;
2552
+ return result;
2553
+ };
2554
+ const initRadar = (spec, context)=>{
2555
+ const result = {
2556
+ ...spec
2256
2557
  };
2558
+ const { advancedVSeed } = context;
2559
+ const { encoding } = advancedVSeed;
2560
+ if (!encoding[0].angle || !encoding[0].radius || !encoding[0].group) return result;
2561
+ result.type = 'radar';
2562
+ result.angleField = encoding[0].angle[0];
2563
+ result.radiusField = encoding[0].radius[0];
2564
+ result.seriesField = encoding[0].group[0];
2565
+ result.padding = 0;
2566
+ result.region = [
2567
+ {
2568
+ clip: true
2569
+ }
2570
+ ];
2571
+ result.animation = true;
2572
+ return result;
2257
2573
  };
2258
2574
  const initFunnel = (spec, context)=>{
2259
2575
  const result = {
@@ -2277,7 +2593,11 @@ const initFunnel = (spec, context)=>{
2277
2593
  ];
2278
2594
  result.funnel = {
2279
2595
  style: {
2280
- cornerRadius: 4
2596
+ cornerRadius: 4,
2597
+ fill: {
2598
+ field: encoding[0].color[0],
2599
+ scale: 'color'
2600
+ }
2281
2601
  },
2282
2602
  state: {
2283
2603
  hover: {
@@ -2291,26 +2611,21 @@ const initFunnel = (spec, context)=>{
2291
2611
  result.animation = true;
2292
2612
  return result;
2293
2613
  };
2294
- const initScatter = (spec, context)=>{
2614
+ const initPivot = (spec)=>{
2295
2615
  const result = {
2296
2616
  ...spec
2297
2617
  };
2298
- const { advancedVSeed } = context;
2299
- const { encoding } = advancedVSeed;
2300
- if (!encoding[0].y || !encoding[0].x || !encoding[0].group) return result;
2301
- result.type = 'scatter';
2302
- result.direction = 'vertical';
2303
- result.xField = encoding[0].x[0];
2304
- result.yField = encoding[0].y[0];
2305
- result.seriesField = encoding[0].group[0];
2306
- result.padding = 0;
2307
- result.region = [
2308
- {
2309
- clip: true
2310
- }
2311
- ];
2312
- result.animation = true;
2313
- return result;
2618
+ return {
2619
+ ...result,
2620
+ animation: true,
2621
+ rows: [],
2622
+ columns: [],
2623
+ indicators: [],
2624
+ records: [],
2625
+ widthMode: 'adaptive',
2626
+ heightMode: 'adaptive',
2627
+ indicatorsAsCol: false
2628
+ };
2314
2629
  };
2315
2630
  const xBand = (spec, context)=>{
2316
2631
  const result = {
@@ -2673,7 +2988,7 @@ const radiusAxis = (spec, context)=>{
2673
2988
  };
2674
2989
  const { advancedVSeed } = context;
2675
2990
  const { dimensions, measures } = advancedVSeed;
2676
- if (!dimensions || !measures) return spec;
2991
+ if (!dimensions || !measures) return result;
2677
2992
  const is0D = 0 === dimensions.length;
2678
2993
  const is1M1D = 1 === dimensions.length && 1 === measures.length;
2679
2994
  const showAxis = !(is0D || is1M1D);
@@ -2704,7 +3019,7 @@ const angleAxis = (spec, context)=>{
2704
3019
  };
2705
3020
  const { advancedVSeed } = context;
2706
3021
  const { dimensions, measures } = advancedVSeed;
2707
- if (!dimensions || !measures) return spec;
3022
+ if (!dimensions || !measures) return result;
2708
3023
  const is0D = 0 === dimensions.length;
2709
3024
  const is1M1D = 1 === dimensions.length && 1 === measures.length;
2710
3025
  const showAxis = !(is0D || is1M1D);
@@ -2740,6 +3055,59 @@ const angleAxis = (spec, context)=>{
2740
3055
  });
2741
3056
  return result;
2742
3057
  };
3058
+ const radarAngleAxis = (spec, context)=>{
3059
+ const result = {
3060
+ ...spec
3061
+ };
3062
+ const { advancedVSeed } = context;
3063
+ const { dimensions, measures } = advancedVSeed;
3064
+ if (!dimensions || !measures) return result;
3065
+ if (!result.axes) result.axes = [];
3066
+ result.axes.push({
3067
+ orient: 'angle',
3068
+ visible: true,
3069
+ zero: true,
3070
+ nice: true,
3071
+ grid: {
3072
+ visible: true
3073
+ },
3074
+ domainLine: {
3075
+ visible: true
3076
+ },
3077
+ tick: {
3078
+ visible: true
3079
+ }
3080
+ });
3081
+ return result;
3082
+ };
3083
+ const radarRadiusAxis = (spec, context)=>{
3084
+ const result = {
3085
+ ...spec
3086
+ };
3087
+ const { advancedVSeed } = context;
3088
+ const { dimensions, measures } = advancedVSeed;
3089
+ if (!dimensions || !measures) return result;
3090
+ if (!result.axes) result.axes = [];
3091
+ result.axes.push({
3092
+ orient: 'radius',
3093
+ visible: true,
3094
+ zero: true,
3095
+ nice: true,
3096
+ grid: {
3097
+ visible: true
3098
+ },
3099
+ tick: {
3100
+ visible: true
3101
+ },
3102
+ label: {
3103
+ visible: true
3104
+ },
3105
+ domainLine: {
3106
+ visible: true
3107
+ }
3108
+ });
3109
+ return result;
3110
+ };
2743
3111
  const percent = (spec, context)=>{
2744
3112
  const result = {
2745
3113
  ...spec
@@ -2783,7 +3151,9 @@ const tooltip_tooltip = (spec, context)=>{
2783
3151
  const { advancedVSeed } = context;
2784
3152
  const { measures, datasetReshapeInfo, chartType } = advancedVSeed;
2785
3153
  const baseConfig = advancedVSeed.config[chartType];
2786
- const { tooltip } = baseConfig;
3154
+ const { tooltip = {
3155
+ enable: true
3156
+ } } = baseConfig;
2787
3157
  const { enable } = tooltip;
2788
3158
  const { measureId, measureValue } = datasetReshapeInfo[0].foldInfo;
2789
3159
  const { groupName } = datasetReshapeInfo[0].unfoldInfo;
@@ -2873,6 +3243,16 @@ const label_label = (spec, context)=>{
2873
3243
  };
2874
3244
  return result;
2875
3245
  };
3246
+ const labelColorInversion = (spec)=>{
3247
+ const result = {
3248
+ ...spec
3249
+ };
3250
+ if (result.label) result.label.smartInvert = true;
3251
+ else result.label = {
3252
+ smartInvert: true
3253
+ };
3254
+ return result;
3255
+ };
2876
3256
  const discreteLegend = (spec, context)=>{
2877
3257
  const result = {
2878
3258
  ...spec
@@ -3082,6 +3462,69 @@ const pivotDiscreteLegend = (spec, context)=>{
3082
3462
  legends
3083
3463
  };
3084
3464
  };
3465
+ const colorLegend = (spec, context)=>{
3466
+ const result = {
3467
+ ...spec
3468
+ };
3469
+ const { advancedVSeed } = context;
3470
+ const { chartType } = advancedVSeed;
3471
+ const baseConfig = advancedVSeed.config[chartType];
3472
+ const { encoding } = advancedVSeed;
3473
+ if (!encoding[0].color) return result;
3474
+ if (!baseConfig || !baseConfig.legend) return result;
3475
+ const { legend } = baseConfig;
3476
+ const { enable, position = 'bottom' } = legend || {};
3477
+ const orient = [
3478
+ 'bottom',
3479
+ 'bottomLeft',
3480
+ 'bottomRight',
3481
+ 'bl',
3482
+ 'br'
3483
+ ].includes(position) ? 'bottom' : [
3484
+ 'top',
3485
+ 'topLeft',
3486
+ 'topRight',
3487
+ 'tl',
3488
+ 'tr'
3489
+ ].includes(position) ? 'top' : [
3490
+ 'left',
3491
+ 'leftTop',
3492
+ 'leftBottom',
3493
+ 'lt',
3494
+ 'lb'
3495
+ ].includes(position) ? 'left' : 'right';
3496
+ const legendPosition = [
3497
+ 'topLeft',
3498
+ 'bottomLeft',
3499
+ 'leftTop',
3500
+ 'rightTop',
3501
+ 'lt',
3502
+ 'rt',
3503
+ 'tl',
3504
+ 'bl'
3505
+ ].includes(position) ? 'start' : [
3506
+ 'topRight',
3507
+ 'bottomRight',
3508
+ 'leftBottom',
3509
+ 'rightBottom',
3510
+ 'lb',
3511
+ 'rb',
3512
+ 'rt',
3513
+ 'br'
3514
+ ].includes(position) ? 'end' : 'middle';
3515
+ result.legends = {
3516
+ type: 'color',
3517
+ visible: enable,
3518
+ orient,
3519
+ position: legendPosition,
3520
+ field: encoding[0].color[0],
3521
+ inverse: !![
3522
+ 'left',
3523
+ 'right'
3524
+ ].includes(orient)
3525
+ };
3526
+ return result;
3527
+ };
3085
3528
  const color_color = (spec, context)=>{
3086
3529
  const result = {
3087
3530
  ...spec
@@ -3109,6 +3552,28 @@ const color_color = (spec, context)=>{
3109
3552
  };
3110
3553
  return result;
3111
3554
  };
3555
+ const linearColor = (spec, context)=>{
3556
+ const result = {
3557
+ ...spec
3558
+ };
3559
+ const { advancedVSeed } = context;
3560
+ const { datasetReshapeInfo, chartType, encoding } = advancedVSeed;
3561
+ const baseConfig = advancedVSeed.config[chartType];
3562
+ if (!baseConfig || !baseConfig.color) return result;
3563
+ const { color } = baseConfig;
3564
+ const { colorScheme } = color;
3565
+ result.color = {
3566
+ type: 'linear',
3567
+ domain: [
3568
+ {
3569
+ dataId: datasetReshapeInfo[0].id,
3570
+ fields: encoding?.[0]?.color
3571
+ }
3572
+ ],
3573
+ range: colorScheme
3574
+ };
3575
+ return result;
3576
+ };
3112
3577
  const pivotAdapter_pivotAdapter = (pipeline, pivotPipeline)=>(spec, context)=>{
3113
3578
  const { vseed } = context;
3114
3579
  const usePivotChart = isPivotChart(vseed);
@@ -4340,7 +4805,7 @@ const line_line = [
4340
4805
  initLine,
4341
4806
  color_color,
4342
4807
  background_backgroundColor,
4343
- dataset_dataset,
4808
+ datasetXY,
4344
4809
  xBand,
4345
4810
  yLinear,
4346
4811
  label_label,
@@ -4364,7 +4829,7 @@ const pivotLine = [
4364
4829
  initLine,
4365
4830
  color_color,
4366
4831
  background_backgroundColor,
4367
- dataset_dataset,
4832
+ datasetXY,
4368
4833
  xBand,
4369
4834
  yLinear,
4370
4835
  label_label,
@@ -4391,7 +4856,7 @@ const column = [
4391
4856
  stackInverse,
4392
4857
  color_color,
4393
4858
  background_backgroundColor,
4394
- dataset_dataset,
4859
+ datasetXY,
4395
4860
  xBand,
4396
4861
  yLinear,
4397
4862
  label_label,
@@ -4415,7 +4880,7 @@ const pivotColumn = [
4415
4880
  stackInverse,
4416
4881
  color_color,
4417
4882
  background_backgroundColor,
4418
- dataset_dataset,
4883
+ datasetXY,
4419
4884
  xBand,
4420
4885
  yLinear,
4421
4886
  label_label,
@@ -4439,7 +4904,7 @@ const columnParallel = [
4439
4904
  stackCornerRadius_stackCornerRadius,
4440
4905
  color_color,
4441
4906
  background_backgroundColor,
4442
- dataset_dataset,
4907
+ datasetXY,
4443
4908
  xBand,
4444
4909
  yLinear,
4445
4910
  label_label,
@@ -4462,7 +4927,7 @@ const pivotColumnParallel = [
4462
4927
  stackCornerRadius_stackCornerRadius,
4463
4928
  color_color,
4464
4929
  background_backgroundColor,
4465
- dataset_dataset,
4930
+ datasetXY,
4466
4931
  xBand,
4467
4932
  yLinear,
4468
4933
  label_label,
@@ -4488,7 +4953,7 @@ const columnPercent = [
4488
4953
  color_color,
4489
4954
  background_backgroundColor,
4490
4955
  percent,
4491
- dataset_dataset,
4956
+ datasetXY,
4492
4957
  xBand,
4493
4958
  yLinear,
4494
4959
  label_label,
@@ -4513,7 +4978,7 @@ const pivotColumnPercent = [
4513
4978
  color_color,
4514
4979
  percent,
4515
4980
  background_backgroundColor,
4516
- dataset_dataset,
4981
+ datasetXY,
4517
4982
  xBand,
4518
4983
  yLinear,
4519
4984
  label_label,
@@ -4537,7 +5002,7 @@ const bar = [
4537
5002
  stackCornerRadius_stackCornerRadius,
4538
5003
  color_color,
4539
5004
  background_backgroundColor,
4540
- dataset_dataset,
5005
+ datasetYX,
4541
5006
  xLinear,
4542
5007
  yBand,
4543
5008
  label_label,
@@ -4560,7 +5025,7 @@ const pivotBar = [
4560
5025
  stackCornerRadius_stackCornerRadius,
4561
5026
  color_color,
4562
5027
  background_backgroundColor,
4563
- dataset_dataset,
5028
+ datasetYX,
4564
5029
  xLinear,
4565
5030
  yBand,
4566
5031
  label_label,
@@ -4585,7 +5050,7 @@ const barParallel = [
4585
5050
  stackCornerRadius_stackCornerRadius,
4586
5051
  color_color,
4587
5052
  background_backgroundColor,
4588
- dataset_dataset,
5053
+ datasetYX,
4589
5054
  xLinear,
4590
5055
  yBand,
4591
5056
  label_label,
@@ -4608,7 +5073,7 @@ const pivotBarParallel = [
4608
5073
  stackCornerRadius_stackCornerRadius,
4609
5074
  color_color,
4610
5075
  background_backgroundColor,
4611
- dataset_dataset,
5076
+ datasetYX,
4612
5077
  xLinear,
4613
5078
  yBand,
4614
5079
  label_label,
@@ -4633,7 +5098,7 @@ const barPercent = [
4633
5098
  color_color,
4634
5099
  background_backgroundColor,
4635
5100
  percent,
4636
- dataset_dataset,
5101
+ datasetYX,
4637
5102
  xLinear,
4638
5103
  yBand,
4639
5104
  label_label,
@@ -4657,7 +5122,7 @@ const pivotBarPercent = [
4657
5122
  color_color,
4658
5123
  background_backgroundColor,
4659
5124
  percent,
4660
- dataset_dataset,
5125
+ datasetYX,
4661
5126
  yBand,
4662
5127
  xLinear,
4663
5128
  label_label,
@@ -4681,7 +5146,7 @@ const area_area = [
4681
5146
  stackInverse,
4682
5147
  color_color,
4683
5148
  background_backgroundColor,
4684
- dataset_dataset,
5149
+ datasetXY,
4685
5150
  xBand,
4686
5151
  yLinear,
4687
5152
  label_label,
@@ -4707,7 +5172,7 @@ const pivotArea = [
4707
5172
  color_color,
4708
5173
  background_backgroundColor,
4709
5174
  stackInverse,
4710
- dataset_dataset,
5175
+ datasetXY,
4711
5176
  xBand,
4712
5177
  yLinear,
4713
5178
  label_label,
@@ -4735,7 +5200,7 @@ const areaPercent = [
4735
5200
  color_color,
4736
5201
  background_backgroundColor,
4737
5202
  percent,
4738
- dataset_dataset,
5203
+ datasetXY,
4739
5204
  xBand,
4740
5205
  yLinear,
4741
5206
  label_label,
@@ -4761,7 +5226,7 @@ const pivotAreaPercent = [
4761
5226
  color_color,
4762
5227
  background_backgroundColor,
4763
5228
  percent,
4764
- dataset_dataset,
5229
+ datasetXY,
4765
5230
  xBand,
4766
5231
  yLinear,
4767
5232
  label_label,
@@ -4797,7 +5262,7 @@ const areaRange = [
4797
5262
  pointStyle_pointStyle,
4798
5263
  pointStateDimensionHover
4799
5264
  ]),
4800
- dataset_dataset,
5265
+ datasetXY,
4801
5266
  background_backgroundColor,
4802
5267
  xBand,
4803
5268
  yLinear,
@@ -4814,42 +5279,91 @@ const pivotAreaRange = [
4814
5279
  pivotIndicators_pivotIndicatorsAsRow,
4815
5280
  datasetPivot,
4816
5281
  pivotIndicators([
4817
- series([
4818
- initAreaRange,
4819
- areaStyle_areaStyle
4820
- ], [
4821
- initAreaRangeLine1,
4822
- lineStyle_lineStyle,
4823
- pointStyle_pointStyle,
4824
- pointStateDimensionHover
4825
- ], [
4826
- initAreaRangeLine2,
4827
- lineStyle_lineStyle,
4828
- pointStyle_pointStyle,
4829
- pointStateDimensionHover
4830
- ]),
5282
+ series([
5283
+ initAreaRange,
5284
+ areaStyle_areaStyle
5285
+ ], [
5286
+ initAreaRangeLine1,
5287
+ lineStyle_lineStyle,
5288
+ pointStyle_pointStyle,
5289
+ pointStateDimensionHover
5290
+ ], [
5291
+ initAreaRangeLine2,
5292
+ lineStyle_lineStyle,
5293
+ pointStyle_pointStyle,
5294
+ pointStateDimensionHover
5295
+ ]),
5296
+ background_backgroundColor,
5297
+ datasetXY,
5298
+ xBand,
5299
+ yLinear,
5300
+ label_label,
5301
+ verticalCrosshairLine,
5302
+ annotationPoint_annotationPoint,
5303
+ annotationVerticalLine_annotationVerticalLine,
5304
+ annotationHorizontalLine_annotationHorizontalLine,
5305
+ annotationArea_annotationArea
5306
+ ]),
5307
+ pivotRowDimensions,
5308
+ pivotColumnDimensions
5309
+ ];
5310
+ const areaRangeSpecPipeline = [
5311
+ pivotAdapter_pivotAdapter(areaRange, pivotAreaRange)
5312
+ ];
5313
+ const scatter = [
5314
+ initScatter,
5315
+ color_color,
5316
+ background_backgroundColor,
5317
+ datasetXY,
5318
+ xLinear,
5319
+ yLinear,
5320
+ label_label,
5321
+ tooltip_tooltip,
5322
+ verticalCrosshairLine,
5323
+ horizontalCrosshairLine,
5324
+ discreteLegend,
5325
+ pointStyle_pointStyle,
5326
+ pointStateHover,
5327
+ annotationPoint_annotationPoint,
5328
+ annotationVerticalLine_annotationVerticalLine,
5329
+ annotationHorizontalLine_annotationHorizontalLine,
5330
+ annotationArea_annotationArea
5331
+ ];
5332
+ const pivotScatter = [
5333
+ initPivot,
5334
+ pivotGridStyle,
5335
+ pivotIndicators_pivotIndicatorsAsRow,
5336
+ datasetPivot,
5337
+ pivotIndicators([
5338
+ initScatter,
5339
+ color_color,
4831
5340
  background_backgroundColor,
4832
- dataset_dataset,
4833
- xBand,
5341
+ datasetXY,
5342
+ xLinear,
4834
5343
  yLinear,
4835
5344
  label_label,
5345
+ tooltip_tooltip,
4836
5346
  verticalCrosshairLine,
5347
+ horizontalCrosshairLine,
5348
+ pointStyle_pointStyle,
5349
+ pointStateHover,
4837
5350
  annotationPoint_annotationPoint,
4838
5351
  annotationVerticalLine_annotationVerticalLine,
4839
5352
  annotationHorizontalLine_annotationHorizontalLine,
4840
5353
  annotationArea_annotationArea
4841
5354
  ]),
4842
5355
  pivotRowDimensions,
4843
- pivotColumnDimensions
5356
+ pivotColumnDimensions,
5357
+ pivotDiscreteLegend
4844
5358
  ];
4845
- const areaRangeSpecPipeline = [
4846
- pivotAdapter_pivotAdapter(areaRange, pivotAreaRange)
5359
+ const scatterSpecPipeline = [
5360
+ pivotAdapter_pivotAdapter(scatter, pivotScatter)
4847
5361
  ];
4848
5362
  const pie = [
4849
5363
  initPie,
4850
5364
  color_color,
4851
5365
  background_backgroundColor,
4852
- dataset_dataset,
5366
+ datasetXY,
4853
5367
  label_label,
4854
5368
  tooltip_tooltip,
4855
5369
  discreteLegend,
@@ -4867,7 +5381,7 @@ const pivotPie = [
4867
5381
  initPie,
4868
5382
  color_color,
4869
5383
  background_backgroundColor,
4870
- dataset_dataset,
5384
+ datasetXY,
4871
5385
  label_label,
4872
5386
  tooltip_tooltip,
4873
5387
  annotationPoint_annotationPoint,
@@ -4886,7 +5400,7 @@ const donut = [
4886
5400
  initDonut,
4887
5401
  color_color,
4888
5402
  background_backgroundColor,
4889
- dataset_dataset,
5403
+ datasetXY,
4890
5404
  label_label,
4891
5405
  tooltip_tooltip,
4892
5406
  discreteLegend,
@@ -4904,7 +5418,7 @@ const pivotDonut = [
4904
5418
  initDonut,
4905
5419
  color_color,
4906
5420
  background_backgroundColor,
4907
- dataset_dataset,
5421
+ datasetXY,
4908
5422
  label_label,
4909
5423
  tooltip_tooltip,
4910
5424
  annotationPoint_annotationPoint,
@@ -4925,7 +5439,7 @@ const rose = [
4925
5439
  stackInverse,
4926
5440
  color_color,
4927
5441
  background_backgroundColor,
4928
- dataset_dataset,
5442
+ datasetXY,
4929
5443
  radiusAxis,
4930
5444
  angleAxis,
4931
5445
  label_label,
@@ -4944,7 +5458,7 @@ const pivotRose = [
4944
5458
  stackInverse,
4945
5459
  color_color,
4946
5460
  background_backgroundColor,
4947
- dataset_dataset,
5461
+ datasetXY,
4948
5462
  radiusAxis,
4949
5463
  angleAxis,
4950
5464
  label_label,
@@ -4963,7 +5477,7 @@ const roseParallel = [
4963
5477
  stackCornerRadius_stackCornerRadius,
4964
5478
  color_color,
4965
5479
  background_backgroundColor,
4966
- dataset_dataset,
5480
+ datasetXY,
4967
5481
  radiusAxis,
4968
5482
  angleAxis,
4969
5483
  label_label,
@@ -4985,7 +5499,7 @@ const pivotRoseParallel = [
4985
5499
  stackCornerRadius_stackCornerRadius,
4986
5500
  color_color,
4987
5501
  background_backgroundColor,
4988
- dataset_dataset,
5502
+ datasetXY,
4989
5503
  radiusAxis,
4990
5504
  angleAxis,
4991
5505
  label_label,
@@ -5003,14 +5517,57 @@ const pivotRoseParallel = [
5003
5517
  const roseParallelSpecPipeline = [
5004
5518
  pivotAdapter_pivotAdapter(roseParallel, pivotRoseParallel)
5005
5519
  ];
5006
- const funnel = [
5007
- initFunnel,
5520
+ const radar = [
5521
+ initRadar,
5008
5522
  color_color,
5009
5523
  background_backgroundColor,
5010
- dataset_dataset,
5524
+ datasetXY,
5525
+ radarAngleAxis,
5526
+ radarRadiusAxis,
5011
5527
  label_label,
5012
5528
  tooltip_tooltip,
5529
+ verticalCrosshairLine,
5013
5530
  discreteLegend,
5531
+ pointStyle_pointStyle,
5532
+ pointStateDimensionHover,
5533
+ lineStyle_lineStyle,
5534
+ areaStyle_areaStyle
5535
+ ];
5536
+ const pivotRadar = [
5537
+ initPivot,
5538
+ pivotGridStyle,
5539
+ pivotIndicators_pivotIndicatorsAsRow,
5540
+ datasetPivot,
5541
+ pivotIndicators([
5542
+ initRadar,
5543
+ color_color,
5544
+ background_backgroundColor,
5545
+ datasetXY,
5546
+ radarAngleAxis,
5547
+ radarRadiusAxis,
5548
+ label_label,
5549
+ tooltip_tooltip,
5550
+ verticalCrosshairLine,
5551
+ pointStyle_pointStyle,
5552
+ pointStateDimensionHover,
5553
+ lineStyle_lineStyle,
5554
+ areaStyle_areaStyle
5555
+ ]),
5556
+ pivotRowDimensions,
5557
+ pivotColumnDimensions,
5558
+ pivotDiscreteLegend
5559
+ ];
5560
+ const radarSpecPipeline = [
5561
+ pivotAdapter_pivotAdapter(radar, pivotRadar)
5562
+ ];
5563
+ const funnel = [
5564
+ initFunnel,
5565
+ linearColor,
5566
+ background_backgroundColor,
5567
+ datasetXY,
5568
+ label_label,
5569
+ tooltip_tooltip,
5570
+ colorLegend,
5014
5571
  annotationPoint_annotationPoint,
5015
5572
  annotationVerticalLine_annotationVerticalLine,
5016
5573
  annotationHorizontalLine_annotationHorizontalLine,
@@ -5023,71 +5580,111 @@ const pivotFunnel = [
5023
5580
  datasetPivot,
5024
5581
  pivotIndicators([
5025
5582
  initFunnel,
5026
- color_color,
5583
+ linearColor,
5027
5584
  background_backgroundColor,
5028
- dataset_dataset,
5585
+ datasetXY,
5029
5586
  label_label,
5030
5587
  tooltip_tooltip,
5588
+ colorLegend,
5031
5589
  annotationPoint_annotationPoint,
5032
5590
  annotationVerticalLine_annotationVerticalLine,
5033
5591
  annotationHorizontalLine_annotationHorizontalLine,
5034
5592
  annotationArea_annotationArea
5035
5593
  ]),
5036
5594
  pivotRowDimensions,
5037
- pivotColumnDimensions,
5038
- pivotDiscreteLegend
5595
+ pivotColumnDimensions
5039
5596
  ];
5040
5597
  const funnelSpecPipeline = [
5041
5598
  pivotAdapter_pivotAdapter(funnel, pivotFunnel)
5042
5599
  ];
5043
- const scatter = [
5044
- initScatter,
5045
- color_color,
5600
+ const initHeatmap = (spec, context)=>{
5601
+ const result = {
5602
+ ...spec
5603
+ };
5604
+ const { advancedVSeed } = context;
5605
+ const { encoding } = advancedVSeed;
5606
+ if (!encoding[0].y || !encoding[0].x || !encoding[0].color) return result;
5607
+ result.type = 'heatmap';
5608
+ result.direction = 'vertical';
5609
+ result.xField = encoding[0].x[0];
5610
+ result.yField = encoding[0].y[0];
5611
+ result.valueField = encoding[0].color[0];
5612
+ result.padding = 0;
5613
+ result.cell = {
5614
+ style: {
5615
+ shape: 'rect',
5616
+ stroke: '#ffffff',
5617
+ lineWidth: 1,
5618
+ fill: {
5619
+ field: encoding[0].color[0],
5620
+ scale: 'color'
5621
+ }
5622
+ }
5623
+ };
5624
+ result.axes = [
5625
+ {
5626
+ type: 'band',
5627
+ orient: 'left',
5628
+ bandPadding: 0
5629
+ },
5630
+ {
5631
+ type: 'band',
5632
+ orient: 'bottom',
5633
+ bandPadding: 0
5634
+ }
5635
+ ];
5636
+ result.region = [
5637
+ {
5638
+ clip: true
5639
+ }
5640
+ ];
5641
+ result.animation = true;
5642
+ return result;
5643
+ };
5644
+ const heatmap = [
5645
+ initHeatmap,
5646
+ linearColor,
5046
5647
  background_backgroundColor,
5047
- dataset_dataset,
5048
- xLinear,
5049
- yLinear,
5648
+ datasetXY,
5050
5649
  label_label,
5650
+ labelColorInversion,
5651
+ colorLegend,
5051
5652
  tooltip_tooltip,
5052
- verticalCrosshairLine,
5053
- horizontalCrosshairLine,
5054
- discreteLegend,
5055
5653
  pointStyle_pointStyle,
5056
- pointStateHover,
5654
+ pointStateDimensionHover,
5655
+ lineStyle_lineStyle,
5057
5656
  annotationPoint_annotationPoint,
5058
5657
  annotationVerticalLine_annotationVerticalLine,
5059
5658
  annotationHorizontalLine_annotationHorizontalLine,
5060
5659
  annotationArea_annotationArea
5061
5660
  ];
5062
- const pivotScatter = [
5661
+ const pivotHeatmap = [
5063
5662
  initPivot,
5064
5663
  pivotGridStyle,
5065
5664
  pivotIndicators_pivotIndicatorsAsRow,
5066
5665
  datasetPivot,
5067
5666
  pivotIndicators([
5068
- initScatter,
5069
- color_color,
5667
+ initHeatmap,
5668
+ linearColor,
5070
5669
  background_backgroundColor,
5071
- dataset_dataset,
5072
- xLinear,
5073
- yLinear,
5670
+ datasetXY,
5074
5671
  label_label,
5672
+ labelColorInversion,
5673
+ colorLegend,
5075
5674
  tooltip_tooltip,
5076
- verticalCrosshairLine,
5077
- horizontalCrosshairLine,
5078
5675
  pointStyle_pointStyle,
5079
- pointStateHover,
5676
+ pointStateDimensionHover,
5677
+ lineStyle_lineStyle,
5080
5678
  annotationPoint_annotationPoint,
5081
5679
  annotationVerticalLine_annotationVerticalLine,
5082
5680
  annotationHorizontalLine_annotationHorizontalLine,
5083
5681
  annotationArea_annotationArea
5084
5682
  ]),
5085
5683
  pivotRowDimensions,
5086
- pivotColumnDimensions,
5087
- pivotDiscreteLegend
5684
+ pivotColumnDimensions
5088
5685
  ];
5089
- const scatterSpecPipeline = [
5090
- pivotAdapter_pivotAdapter(scatter, pivotScatter)
5686
+ const heatmapSpecPipeline = [
5687
+ pivotAdapter_pivotAdapter(heatmap, pivotHeatmap)
5091
5688
  ];
5092
5689
  const initTable = (spec, context)=>{
5093
5690
  const { advancedVSeed } = context;
@@ -5696,6 +6293,14 @@ const registerPivotTable = ()=>{
5696
6293
  Builder._advancedPipelineMap.pivotTable = pivotTableAdvancedPipeline;
5697
6294
  Builder._specPipelineMap.pivotTable = pivotTableSpecPipeline;
5698
6295
  };
6296
+ const registerHeatmap = ()=>{
6297
+ Builder._advancedPipelineMap.heatmap = heatmapAdvancedPipeline;
6298
+ Builder._specPipelineMap.heatmap = heatmapSpecPipeline;
6299
+ };
6300
+ const registerRadar = ()=>{
6301
+ Builder._advancedPipelineMap.radar = radarAdvancedPipeline;
6302
+ Builder._specPipelineMap.radar = radarSpecPipeline;
6303
+ };
5699
6304
  const darkTheme = ()=>{
5700
6305
  const linearAxis = {
5701
6306
  nice: true,
@@ -5969,6 +6574,9 @@ const darkTheme = ()=>{
5969
6574
  donut: {
5970
6575
  ...baseConfig
5971
6576
  },
6577
+ radar: {
6578
+ ...baseConfig
6579
+ },
5972
6580
  rose: {
5973
6581
  ...baseConfig
5974
6582
  },
@@ -5991,6 +6599,9 @@ const darkTheme = ()=>{
5991
6599
  '#A0CEFF'
5992
6600
  ]
5993
6601
  }
6602
+ },
6603
+ heatmap: {
6604
+ ...baseConfig
5994
6605
  }
5995
6606
  }
5996
6607
  };
@@ -6269,6 +6880,9 @@ const lightTheme = ()=>{
6269
6880
  donut: {
6270
6881
  ...baseConfig
6271
6882
  },
6883
+ radar: {
6884
+ ...baseConfig
6885
+ },
6272
6886
  rose: {
6273
6887
  ...baseConfig
6274
6888
  },
@@ -6289,7 +6903,24 @@ const lightTheme = ()=>{
6289
6903
  '#ACB9FF',
6290
6904
  '#B7C4FF',
6291
6905
  '#C2CEFF'
6292
- ]
6906
+ ].reverse()
6907
+ }
6908
+ },
6909
+ heatmap: {
6910
+ ...baseConfig,
6911
+ color: {
6912
+ colorScheme: [
6913
+ '#5766EC',
6914
+ '#6372F0',
6915
+ '#7080F4',
6916
+ '#7C8CFA',
6917
+ '#8998FF',
6918
+ '#95A3FF',
6919
+ '#A0AEFF',
6920
+ '#ACB9FF',
6921
+ '#B7C4FF',
6922
+ '#C2CEFF'
6923
+ ].reverse()
6293
6924
  }
6294
6925
  }
6295
6926
  }
@@ -6309,6 +6940,8 @@ const registerDarkTheme = ()=>{
6309
6940
  registerCustomTheme('dark', darkTheme());
6310
6941
  };
6311
6942
  const registerAll = ()=>{
6943
+ registerTable();
6944
+ registerPivotTable();
6312
6945
  registerLine();
6313
6946
  registerColumn();
6314
6947
  registerColumnParallel();
@@ -6319,14 +6952,14 @@ const registerAll = ()=>{
6319
6952
  registerArea();
6320
6953
  registerAreaPercent();
6321
6954
  registerAreaRange();
6955
+ registerScatter();
6322
6956
  registerPie();
6323
6957
  registerDonut();
6324
6958
  registerRose();
6325
6959
  registerRoseParallel();
6960
+ registerRadar();
6326
6961
  registerFunnel();
6327
- registerScatter();
6328
- registerTable();
6329
- registerPivotTable();
6962
+ registerHeatmap();
6330
6963
  registerLightTheme();
6331
6964
  registerDarkTheme();
6332
6965
  };
@@ -6349,13 +6982,15 @@ const zChartType = z["enum"]([
6349
6982
  'area',
6350
6983
  'areaPercent',
6351
6984
  'areaRange',
6985
+ 'scatter',
6986
+ 'dualAxis',
6352
6987
  'rose',
6353
6988
  'roseParallel',
6354
6989
  'pie',
6355
6990
  'donut',
6356
- 'dualAxis',
6357
- 'scatter',
6358
- 'funnel'
6991
+ 'radar',
6992
+ 'funnel',
6993
+ 'heatmap'
6359
6994
  ]);
6360
6995
  const zDatum = z.record(z.string().or(z.number()), z.any());
6361
6996
  const zDataset = z.array(zDatum);
@@ -6559,6 +7194,9 @@ const zColor = z.object({
6559
7194
  colorScheme: z.array(z.string()).optional(),
6560
7195
  colorMapping: z.record(z.string(), z.string()).optional()
6561
7196
  });
7197
+ const zLinearColor = z.object({
7198
+ colorScheme: z.array(z.string()).optional()
7199
+ });
6562
7200
  const zLabel = z.object({
6563
7201
  enable: z.boolean().default(true).optional()
6564
7202
  });
@@ -6616,6 +7254,31 @@ const zLegend = z.object({
6616
7254
  labelFontColor: z.string().default('#fff').optional(),
6617
7255
  labelFontWeight: z.number().or(z.string()).default(400).optional()
6618
7256
  });
7257
+ const zColorLegend = z.object({
7258
+ position: z["enum"]([
7259
+ 'left',
7260
+ 'leftTop',
7261
+ 'leftBottom',
7262
+ 'lt',
7263
+ 'lb',
7264
+ 'top',
7265
+ 'topLeft',
7266
+ 'topRight',
7267
+ 'tl',
7268
+ 'tr',
7269
+ 'right',
7270
+ 'rightTop',
7271
+ 'rightBottom',
7272
+ 'rt',
7273
+ 'rb',
7274
+ 'bottom',
7275
+ 'bottomLeft',
7276
+ 'bottomRight',
7277
+ 'bl',
7278
+ 'br'
7279
+ ]).default('bottom').optional(),
7280
+ enable: z.boolean().default(true).optional()
7281
+ });
6619
7282
  const zTooltip = z.object({
6620
7283
  enable: z.boolean().default(true).optional()
6621
7284
  });
@@ -6680,22 +7343,6 @@ const zAreaConfig = z.object({
6680
7343
  });
6681
7344
  const zAreaPercentConfig = zAreaConfig;
6682
7345
  const zAreaRangeConfig = zAreaConfig;
6683
- const zRoseConfig = z.object({
6684
- backgroundColor: zBackgroundColor.optional(),
6685
- label: zLabel.optional(),
6686
- color: zColor.optional(),
6687
- tooltip: zTooltip.optional(),
6688
- legend: zLegend.optional()
6689
- });
6690
- const zRoseParallelConfig = zRoseConfig;
6691
- const zPieConfig = z.object({
6692
- backgroundColor: zBackgroundColor.optional(),
6693
- label: zLabel.optional(),
6694
- color: zColor.optional(),
6695
- tooltip: zTooltip.optional(),
6696
- legend: zLegend.optional()
6697
- });
6698
- const zDonutConfig = zPieConfig;
6699
7346
  const zDualAxisConfig = z.object({
6700
7347
  backgroundColor: zBackgroundColor.optional(),
6701
7348
  label: zLabel.optional(),
@@ -6713,13 +7360,25 @@ const zScatterConfig = z.object({
6713
7360
  yAxis: zYLinearAxis.optional(),
6714
7361
  crosshairLine: zCrosshairLine.optional()
6715
7362
  });
6716
- const zFunnelConfig = z.object({
7363
+ const zRoseConfig = z.object({
6717
7364
  backgroundColor: zBackgroundColor.optional(),
7365
+ label: zLabel.optional(),
6718
7366
  color: zColor.optional(),
6719
7367
  tooltip: zTooltip.optional(),
7368
+ legend: zLegend.optional()
7369
+ });
7370
+ const zRoseParallelConfig = zRoseConfig;
7371
+ const zPieConfig = z.object({
7372
+ backgroundColor: zBackgroundColor.optional(),
6720
7373
  label: zLabel.optional(),
7374
+ color: zColor.optional(),
7375
+ tooltip: zTooltip.optional(),
6721
7376
  legend: zLegend.optional()
6722
7377
  });
7378
+ const zDonutConfig = zPieConfig;
7379
+ const zRadarConfig = zPieConfig;
7380
+ const zFunnelConfig = zPieConfig;
7381
+ const zHeatmapConfig = zPieConfig;
6723
7382
  const zConfig = z.object({
6724
7383
  table: zTableConfig.optional(),
6725
7384
  pivotTable: zPivotTableConfig.optional(),
@@ -6733,13 +7392,15 @@ const zConfig = z.object({
6733
7392
  area: zAreaConfig.optional(),
6734
7393
  areaPercent: zAreaPercentConfig.optional(),
6735
7394
  areaRange: zAreaRangeConfig.optional(),
7395
+ dualAxis: zDualAxisConfig.optional(),
7396
+ scatter: zScatterConfig.optional(),
6736
7397
  rose: zRoseConfig.optional(),
6737
7398
  roseParallel: zRoseParallelConfig.optional(),
6738
7399
  pie: zPieConfig.optional(),
6739
7400
  donut: zDonutConfig.optional(),
6740
- dualAxis: zDualAxisConfig.optional(),
6741
- scatter: zScatterConfig.optional(),
6742
- funnel: zFunnelConfig.optional()
7401
+ radar: zRadarConfig.optional(),
7402
+ funnel: zFunnelConfig.optional(),
7403
+ heatmap: zHeatmapConfig.optional()
6743
7404
  });
6744
7405
  const zAxis = z.object({
6745
7406
  visible: z.boolean().default(true).optional(),
@@ -6893,7 +7554,7 @@ const zLineStyle = z.object({
6893
7554
  zSelector,
6894
7555
  zSelectors
6895
7556
  ]).optional(),
6896
- lineSmooth: z.boolean().default(true).optional(),
7557
+ lineSmooth: z.boolean().optional(),
6897
7558
  lineColor: z.string().optional(),
6898
7559
  lineColorOpacity: z.number().optional(),
6899
7560
  lineWidth: z.number().optional(),
@@ -7358,6 +8019,27 @@ const zAreaRange = z.object({
7358
8019
  annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).optional(),
7359
8020
  locale: zLocale.optional()
7360
8021
  });
8022
+ const zScatter = z.object({
8023
+ chartType: z.literal('scatter'),
8024
+ dataset: zDataset.optional(),
8025
+ dimensions: zDimensions.optional(),
8026
+ measures: zMeasureTree.optional(),
8027
+ backgroundColor: zBackgroundColor.optional(),
8028
+ color: zColor.optional(),
8029
+ label: zLabel.optional(),
8030
+ legend: zLegend.optional(),
8031
+ tooltip: zTooltip.optional(),
8032
+ xAxis: zXLinearAxis.optional(),
8033
+ yAxis: zYLinearAxis.optional(),
8034
+ crosshairLine: zCrosshairLine.optional(),
8035
+ theme: zTheme.optional(),
8036
+ pointStyle: zPointStyle.optional(),
8037
+ annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).optional(),
8038
+ annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).optional(),
8039
+ annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).optional(),
8040
+ annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).optional(),
8041
+ locale: zLocale.optional()
8042
+ });
7361
8043
  const zRose = z.object({
7362
8044
  chartType: z.literal('rose'),
7363
8045
  dataset: zDataset.optional(),
@@ -7410,8 +8092,8 @@ const zDonut = z.object({
7410
8092
  theme: zTheme.optional(),
7411
8093
  locale: zLocale.optional()
7412
8094
  });
7413
- const zScatter = z.object({
7414
- chartType: z.literal('scatter'),
8095
+ const zRadar = z.object({
8096
+ chartType: z.literal('radar'),
7415
8097
  dataset: zDataset.optional(),
7416
8098
  dimensions: zDimensions.optional(),
7417
8099
  measures: zMeasureTree.optional(),
@@ -7420,15 +8102,7 @@ const zScatter = z.object({
7420
8102
  label: zLabel.optional(),
7421
8103
  legend: zLegend.optional(),
7422
8104
  tooltip: zTooltip.optional(),
7423
- xAxis: zXLinearAxis.optional(),
7424
- yAxis: zYLinearAxis.optional(),
7425
- crosshairLine: zCrosshairLine.optional(),
7426
8105
  theme: zTheme.optional(),
7427
- pointStyle: zPointStyle.optional(),
7428
- annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).optional(),
7429
- annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).optional(),
7430
- annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).optional(),
7431
- annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).optional(),
7432
8106
  locale: zLocale.optional()
7433
8107
  });
7434
8108
  const zFunnel = z.object({
@@ -7437,9 +8111,22 @@ const zFunnel = z.object({
7437
8111
  dimensions: zDimensions.optional(),
7438
8112
  measures: zMeasureTree.optional(),
7439
8113
  backgroundColor: zBackgroundColor.optional(),
7440
- color: zColor.optional(),
8114
+ color: zLinearColor.optional(),
7441
8115
  label: zLabel.optional(),
7442
- legend: zLegend.optional(),
8116
+ legend: zColorLegend.optional(),
8117
+ tooltip: zTooltip.optional(),
8118
+ theme: zTheme.optional(),
8119
+ locale: zLocale.optional()
8120
+ });
8121
+ const zHeatmap = z.object({
8122
+ chartType: z.literal('heatmap'),
8123
+ dataset: zDataset.optional(),
8124
+ dimensions: zDimensions.optional(),
8125
+ measures: zMeasureTree.optional(),
8126
+ backgroundColor: zBackgroundColor.optional(),
8127
+ color: zLinearColor.optional(),
8128
+ label: zLabel.optional(),
8129
+ legend: zColorLegend.optional(),
7443
8130
  tooltip: zTooltip.optional(),
7444
8131
  theme: zTheme.optional(),
7445
8132
  locale: zLocale.optional()
@@ -7457,12 +8144,14 @@ const zVSeed = z.discriminatedUnion('chartType', [
7457
8144
  zArea,
7458
8145
  zAreaPercent,
7459
8146
  zAreaRange,
8147
+ zScatter,
7460
8148
  zPie,
8149
+ zDonut,
7461
8150
  zRose,
7462
8151
  zRoseParallel,
7463
- zScatter,
7464
- zDonut,
7465
- zFunnel
8152
+ zRadar,
8153
+ zFunnel,
8154
+ zHeatmap
7466
8155
  ]);
7467
8156
  const zAdvancedVSeed = z.object({
7468
8157
  chartType: zChartType,
@@ -7479,6 +8168,6 @@ const zAdvancedVSeed = z.object({
7479
8168
  annotation: zAnnotation,
7480
8169
  locale: zLocale
7481
8170
  });
7482
- export { Builder, FoldMeasureId, FoldMeasureName, FoldMeasureValue, ORIGINAL_DATA, Separator, UnfoldDimensionGroup, UnfoldDimensionGroupId, areaAdvancedPipeline, areaPercentAdvancedPipeline, areaPercentSpecPipeline, areaRangeAdvancedPipeline, areaRangeSpecPipeline, areaSpecPipeline, autoFormatter, autoNumFormatter, barAdvancedPipeline, barParallelAdvancedPipeline, barParallelSpecPipeline, barPercentAdvancedPipeline, barPercentSpecPipeline, barSpecPipeline, columnAdvancedPipeline, columnParallelAdvancedPipeline, columnParallelSpecPipeline, columnPercentAdvancedPipeline, columnPercentSpecPipeline, columnSpecPipeline, createFormatter, createNumFormatter, darkTheme, dataReshapeFor1D, dataReshapeFor1D1M, dataReshapeFor1D2M, dataReshapeFor2D1M, donutAdvancedPipeline, donutSpecPipeline, execPipeline, findAllDimensions, findAllMeasures, findDimensionById, findFirstDimension, findFirstMeasure, findMeasureById, foldMeasures, funnelAdvancedPipeline, funnelSpecPipeline, i18n, intl, isPivotChart, isPivotTable, isTable, isVChart, isVTable, lightTheme, lineAdvancedPipeline, lineSpecPipeline, pieAdvancedPipeline, pieSpecPipeline, pivotTableAdvancedPipeline, pivotTableSpecPipeline, preorderTraverse, registerAll, registerArea, registerAreaPercent, registerAreaRange, registerBar, registerBarParallel, registerBarPercent, registerColumn, registerColumnParallel, registerColumnPercent, registerCustomTheme, registerDarkTheme, registerDonut, registerFunnel, registerLightTheme, registerLine, registerPie, registerPivotTable, registerRose, registerRoseParallel, registerScatter, registerTable, roseAdvancedPipeline, roseParallelAdvancedPipeline, roseParallelSpecPipeline, roseSpecPipeline, scatterAdvancedPipeline, scatterSpecPipeline, tableAdvancedPipeline, tableSpecPipeline, unfoldDimensions, updateAdvanced, updateSpec, zAdvancedVSeed, zAnalysis, zAnnotation, zAnnotationArea, zAnnotationHorizontalLine, zAnnotationPoint, zAnnotationVerticalLine, zArea, zAreaConfig, zAreaPercent, zAreaPercentConfig, zAreaRange, zAreaRangeConfig, zAreaStyle, zAxis, zBackgroundColor, zBar, zBarConfig, zBarParallel, zBarParallelConfig, zBarPercent, zBarPercentConfig, zBarStyle, zChartType, zColor, zColumn, zColumnConfig, zColumnParallel, zColumnParallelConfig, zColumnPercent, zColumnPercentConfig, zConfig, zCrosshairLine, zCrosshairRect, zCustomTheme, zCustomThemeConfig, zDataset, zDatasetReshapeInfo, zDatum, zDimension, zDimensionGroup, zDimensionTree, zDimensions, zDonut, zDonutConfig, zDualAxisConfig, zEncoding, zFoldInfo, zFunnel, zFunnelConfig, zLabel, zLegend, zLine, zLineConfig, zLineStyle, zLocale, zMarkStyle, zMeasure, zMeasureGroup, zMeasureTree, zMeasures, zNumFormat, zPie, zPieConfig, zPivotTable, zPivotTableConfig, zPointStyle, zRose, zRoseConfig, zRoseParallel, zRoseParallelConfig, zScatter, zScatterConfig, zSortAxis, zSortLegend, zStackCornerRadius, zTable, zTableConfig, zTheme, zTooltip, zUnfoldInfo, zVSeed, zXBandAxis, zXLinearAxis, zYBandAxis, zYLinearAxis };
8171
+ export { Builder, FoldMeasureId, FoldMeasureName, FoldMeasureValue, ORIGINAL_DATA, Separator, UnfoldDimensionGroup, UnfoldDimensionGroupId, areaAdvancedPipeline, areaPercentAdvancedPipeline, areaPercentSpecPipeline, areaRangeAdvancedPipeline, areaRangeSpecPipeline, areaSpecPipeline, autoFormatter, autoNumFormatter, barAdvancedPipeline, barParallelAdvancedPipeline, barParallelSpecPipeline, barPercentAdvancedPipeline, barPercentSpecPipeline, barSpecPipeline, columnAdvancedPipeline, columnParallelAdvancedPipeline, columnParallelSpecPipeline, columnPercentAdvancedPipeline, columnPercentSpecPipeline, columnSpecPipeline, createFormatter, createNumFormatter, darkTheme, dataReshapeFor1D, dataReshapeFor1D1M, dataReshapeFor1D2M, dataReshapeFor2D1M, dataReshapeFor2D1M0Name, donutAdvancedPipeline, donutSpecPipeline, execPipeline, findAllDimensions, findAllMeasures, findDimensionById, findFirstDimension, findFirstMeasure, findMeasureById, foldMeasures, funnelAdvancedPipeline, funnelSpecPipeline, heatmapAdvancedPipeline, heatmapSpecPipeline, i18n, intl, isPivotChart, isPivotTable, isTable, isVChart, isVTable, lightTheme, lineAdvancedPipeline, lineSpecPipeline, pieAdvancedPipeline, pieSpecPipeline, pivotTableAdvancedPipeline, pivotTableSpecPipeline, preorderTraverse, radarAdvancedPipeline, radarSpecPipeline, registerAll, registerArea, registerAreaPercent, registerAreaRange, registerBar, registerBarParallel, registerBarPercent, registerColumn, registerColumnParallel, registerColumnPercent, registerCustomTheme, registerDarkTheme, registerDonut, registerFunnel, registerHeatmap, registerLightTheme, registerLine, registerPie, registerPivotTable, registerRadar, registerRose, registerRoseParallel, registerScatter, registerTable, roseAdvancedPipeline, roseParallelAdvancedPipeline, roseParallelSpecPipeline, roseSpecPipeline, scatterAdvancedPipeline, scatterSpecPipeline, tableAdvancedPipeline, tableSpecPipeline, unfoldDimensions, updateAdvanced, updateSpec, zAdvancedVSeed, zAnalysis, zAnnotation, zAnnotationArea, zAnnotationHorizontalLine, zAnnotationPoint, zAnnotationVerticalLine, zArea, zAreaConfig, zAreaPercent, zAreaPercentConfig, zAreaRange, zAreaRangeConfig, zAreaStyle, zAxis, zBackgroundColor, zBar, zBarConfig, zBarParallel, zBarParallelConfig, zBarPercent, zBarPercentConfig, zBarStyle, zChartType, zColor, zColorLegend, zColumn, zColumnConfig, zColumnParallel, zColumnParallelConfig, zColumnPercent, zColumnPercentConfig, zConfig, zCrosshairLine, zCrosshairRect, zCustomTheme, zCustomThemeConfig, zDataset, zDatasetReshapeInfo, zDatum, zDimension, zDimensionGroup, zDimensionTree, zDimensions, zDonut, zDonutConfig, zDualAxisConfig, zEncoding, zFoldInfo, zFunnel, zFunnelConfig, zHeatmap, zHeatmapConfig, zLabel, zLegend, zLine, zLineConfig, zLineStyle, zLinearColor, zLocale, zMarkStyle, zMeasure, zMeasureGroup, zMeasureTree, zMeasures, zNumFormat, zPie, zPieConfig, zPivotTable, zPivotTableConfig, zPointStyle, zRadar, zRadarConfig, zRose, zRoseConfig, zRoseParallel, zRoseParallelConfig, zScatter, zScatterConfig, zSortAxis, zSortLegend, zStackCornerRadius, zTable, zTableConfig, zTheme, zTooltip, zUnfoldInfo, zVSeed, zXBandAxis, zXLinearAxis, zYBandAxis, zYLinearAxis };
7483
8172
 
7484
8173
  //# sourceMappingURL=index.js.map