@visactor/vseed 0.0.8 → 0.0.10

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 (46) hide show
  1. package/dist/builder/builder/builder.d.ts +338 -0
  2. package/dist/dataReshape/constant.d.ts +1 -0
  3. package/dist/dataSelector/index.d.ts +1 -0
  4. package/dist/dataSelector/selector.d.ts +7 -0
  5. package/dist/index.cjs +652 -89
  6. package/dist/index.cjs.map +1 -1
  7. package/dist/index.js +637 -89
  8. package/dist/index.js.map +1 -1
  9. package/dist/pipeline/advanced/pipes/annotation/annotation.d.ts +2 -0
  10. package/dist/pipeline/advanced/pipes/annotation/index.d.ts +1 -0
  11. package/dist/pipeline/advanced/pipes/index.d.ts +2 -0
  12. package/dist/pipeline/advanced/pipes/markStyle/index.d.ts +1 -0
  13. package/dist/pipeline/advanced/pipes/markStyle/markStyle.d.ts +2 -0
  14. package/dist/pipeline/spec/pipes/annotation/annotationPoint.d.ts +2 -0
  15. package/dist/pipeline/spec/pipes/annotation/index.d.ts +1 -0
  16. package/dist/pipeline/spec/pipes/index.d.ts +2 -0
  17. package/dist/pipeline/spec/pipes/legend/{pivotLegend.d.ts → discreteLegend.d.ts} +1 -1
  18. package/dist/pipeline/spec/pipes/legend/index.d.ts +2 -2
  19. package/dist/pipeline/spec/pipes/legend/pivotDiscreteLegend.d.ts +2 -0
  20. package/dist/pipeline/spec/pipes/{legend/legend.d.ts → markStyle/barStyle.d.ts} +1 -1
  21. package/dist/pipeline/spec/pipes/markStyle/index.d.ts +1 -0
  22. package/dist/pipeline/spec/pipes/stack/index.d.ts +1 -1
  23. package/dist/pipeline/spec/pipes/stack/stack.d.ts +2 -2
  24. package/dist/types/advancedVSeed.d.ts +212 -0
  25. package/dist/types/chartType/area/area.d.ts +6 -1
  26. package/dist/types/chartType/areaPercent/areaPercent.d.ts +6 -1
  27. package/dist/types/chartType/bar/bar.d.ts +15 -1
  28. package/dist/types/chartType/barParallel/barParallel.d.ts +15 -1
  29. package/dist/types/chartType/barPercent/barPercent.d.ts +15 -1
  30. package/dist/types/chartType/column/column.d.ts +15 -1
  31. package/dist/types/chartType/columnParallel/columnParallel.d.ts +15 -1
  32. package/dist/types/chartType/columnPercent/columnPercent.d.ts +15 -1
  33. package/dist/types/chartType/line/line.d.ts +6 -1
  34. package/dist/types/dataSelector/index.d.ts +1 -0
  35. package/dist/types/dataSelector/selector.d.ts +34 -0
  36. package/dist/types/properties/annotation/annotation.d.ts +85 -0
  37. package/dist/types/properties/annotation/annotationPoint.d.ts +147 -0
  38. package/dist/types/properties/annotation/index.d.ts +2 -0
  39. package/dist/types/properties/baseConfig/baseConfig.d.ts +102 -0
  40. package/dist/types/properties/baseConfig/legend.d.ts +101 -4
  41. package/dist/types/properties/index.d.ts +2 -0
  42. package/dist/types/properties/markStyle/barStyle.d.ts +114 -0
  43. package/dist/types/properties/markStyle/index.d.ts +2 -0
  44. package/dist/types/properties/markStyle/markStyle.d.ts +29 -0
  45. package/dist/types/properties/theme/customTheme.d.ts +102 -0
  46. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -41,20 +41,24 @@ __webpack_require__.d(__webpack_exports__, {
41
41
  columnPercentAdvancedPipeline: ()=>columnPercentAdvancedPipeline,
42
42
  zAxis: ()=>zAxis,
43
43
  isVTable: ()=>isVTable,
44
+ zAnnotation: ()=>zAnnotation,
44
45
  columnSpecPipeline: ()=>columnSpecPipeline,
45
46
  UnfoldDimensionGroup: ()=>UnfoldDimensionGroup,
46
47
  zDatasetReshapeInfo: ()=>zDatasetReshapeInfo,
47
48
  zFoldInfo: ()=>zFoldInfo,
48
49
  zYBandAxis: ()=>zYBandAxis,
50
+ ORIGINAL_DATA: ()=>ORIGINAL_DATA,
49
51
  zYLinearAxis: ()=>zYLinearAxis,
52
+ zMarkStyle: ()=>zMarkStyle,
50
53
  Separator: ()=>Separator,
51
54
  columnAdvancedPipeline: ()=>columnAdvancedPipeline,
52
55
  columnParallelSpecPipeline: ()=>columnParallelSpecPipeline,
53
56
  zLabel: ()=>zLabel,
54
57
  registerColumn: ()=>registerColumn,
55
- zDimension: ()=>zDimension,
58
+ zAnnotationPoint: ()=>zAnnotationPoint,
56
59
  lightTheme: ()=>lightTheme,
57
60
  registerColumnParallel: ()=>registerColumnParallel,
61
+ zDimension: ()=>zDimension,
58
62
  isPivotChart: ()=>isPivotChart,
59
63
  zCustomTheme: ()=>zCustomTheme,
60
64
  zXBandAxis: ()=>zXBandAxis,
@@ -75,6 +79,7 @@ __webpack_require__.d(__webpack_exports__, {
75
79
  zXLinearAxis: ()=>zXLinearAxis,
76
80
  zConfig: ()=>zConfig,
77
81
  zDatum: ()=>zDatum,
82
+ zBarStyle: ()=>zBarStyle,
78
83
  barAdvancedPipeline: ()=>barAdvancedPipeline,
79
84
  zCustomThemeConfig: ()=>zCustomThemeConfig,
80
85
  columnParallelAdvancedPipeline: ()=>columnParallelAdvancedPipeline,
@@ -83,8 +88,8 @@ __webpack_require__.d(__webpack_exports__, {
83
88
  foldMeasures: ()=>foldMeasures,
84
89
  dataReshapeFor2D1M: ()=>dataReshapeFor2D1M,
85
90
  registerLightTheme: ()=>registerLightTheme,
86
- zChartType: ()=>zChartType,
87
91
  registerDarkTheme: ()=>registerDarkTheme,
92
+ zChartType: ()=>zChartType,
88
93
  barParallelAdvancedPipeline: ()=>barParallelAdvancedPipeline,
89
94
  FoldMeasureValue: ()=>FoldMeasureValue,
90
95
  barPercentSpecPipeline: ()=>barPercentSpecPipeline,
@@ -225,6 +230,7 @@ const FoldMeasureValue = '__MeaValue__';
225
230
  const FoldMeasureId = '__MeaId__';
226
231
  const UnfoldDimensionGroup = '__DimGroup__';
227
232
  const Separator = '-';
233
+ const ORIGINAL_DATA = '__OriginalData__';
228
234
  const external_remeda_namespaceObject = require("remeda");
229
235
  const unfoldDimensions = (dataset, dimensions, measures, unfoldStartIndex = 0, foldGroupName = UnfoldDimensionGroup, dimensionsSeparator = Separator)=>{
230
236
  if (unfoldStartIndex < 0 || unfoldStartIndex >= dimensions.length) throw new Error('unfoldStartIndex is out of range');
@@ -263,12 +269,15 @@ const foldMeasures = (dataset, measures, measureId = FoldMeasureId, measureName
263
269
  };
264
270
  const result = new Array(dataset.length * measures.length);
265
271
  let index = 0;
272
+ const ids = measures.map((d)=>d.id);
266
273
  for(let i = 0; i < dataset.length; i++)for(let j = 0; j < measures.length; j++){
267
- const datum = {
274
+ const datum = (0, external_remeda_namespaceObject.omit)({
268
275
  ...dataset[i]
269
- };
276
+ }, ids);
277
+ datum[ORIGINAL_DATA] = dataset[i];
270
278
  const measure = measures[j];
271
279
  const { id, alias } = measure;
280
+ datum[id] = dataset[i][id];
272
281
  datum[measureId] = id;
273
282
  datum[measureName] = alias;
274
283
  datum[measureValue] = dataset[i][id];
@@ -531,15 +540,16 @@ const encodingXY = (advancedVSeed)=>{
531
540
  if (!datasetReshapeInfo || !dimensions) return result;
532
541
  const encoding = datasetReshapeInfo.reduce((prev, cur)=>{
533
542
  const { foldInfo, unfoldInfo } = cur;
534
- const isSingleDimension = 0 === dimensions.length;
543
+ const isSingleDimension = 1 === dimensions.length;
544
+ const isZeroDimension = 0 === dimensions.length;
535
545
  const x = [
536
- isSingleDimension ? foldInfo.measureName : dimensions[0].id
546
+ isZeroDimension ? foldInfo.measureName : dimensions[0].id
537
547
  ];
538
548
  const y = [
539
549
  foldInfo.measureValue
540
550
  ];
541
551
  const group = [
542
- isSingleDimension ? foldInfo.measureName : unfoldInfo.groupName
552
+ isSingleDimension || isZeroDimension ? foldInfo.measureName : unfoldInfo.groupName
543
553
  ];
544
554
  const color = [
545
555
  foldInfo.measureName
@@ -567,15 +577,16 @@ const encodingYX = (advancedVSeed)=>{
567
577
  if (!datasetReshapeInfo || !dimensions) return result;
568
578
  const encoding = datasetReshapeInfo.reduce((prev, cur)=>{
569
579
  const { foldInfo, unfoldInfo } = cur;
570
- const isSingleDimension = 0 === dimensions.length;
580
+ const isZeroDimension = 0 === dimensions.length;
581
+ const isSingleDimension = 1 === dimensions.length;
571
582
  const y = [
572
- isSingleDimension ? foldInfo.measureName : dimensions[0].id
583
+ isZeroDimension ? foldInfo.measureName : dimensions[0].id
573
584
  ];
574
585
  const x = [
575
586
  foldInfo.measureValue
576
587
  ];
577
588
  const group = [
578
- isSingleDimension ? foldInfo.measureName : unfoldInfo.groupName
589
+ isSingleDimension || isZeroDimension ? foldInfo.measureName : unfoldInfo.groupName
579
590
  ];
580
591
  const color = [
581
592
  foldInfo.measureName
@@ -725,6 +736,26 @@ const pivotAdapter = (pipeline, pivotPipeline)=>(advancedVSeed, context)=>{
725
736
  if (usePivotChart) return execPipeline(pivotPipeline, context, advancedVSeed);
726
737
  return execPipeline(pipeline, context, advancedVSeed);
727
738
  };
739
+ const markStyle_markStyle = (advancedVSeed, context)=>{
740
+ const { vseed } = context;
741
+ const markStyle = (0, external_remeda_namespaceObject.pick)(vseed, [
742
+ 'barStyle'
743
+ ]);
744
+ return {
745
+ ...advancedVSeed,
746
+ markStyle
747
+ };
748
+ };
749
+ const annotation_annotation = (advancedVSeed, context)=>{
750
+ const { vseed } = context;
751
+ const annotation = (0, external_remeda_namespaceObject.pick)(vseed, [
752
+ 'annotationPoint'
753
+ ]);
754
+ return {
755
+ ...advancedVSeed,
756
+ annotation
757
+ };
758
+ };
728
759
  const lineAdvancedPipeline = [
729
760
  initAdvancedVSeed,
730
761
  autoMeasures,
@@ -737,7 +768,8 @@ const lineAdvancedPipeline = [
737
768
  encodingXY,
738
769
  vchartBaseConfig,
739
770
  lineConfig,
740
- vchartTheme
771
+ vchartTheme,
772
+ annotation_annotation
741
773
  ];
742
774
  const barAdvancedPipeline = [
743
775
  initAdvancedVSeed,
@@ -751,7 +783,9 @@ const barAdvancedPipeline = [
751
783
  encodingYX,
752
784
  barConfig,
753
785
  vchartBaseConfig,
754
- vchartTheme
786
+ vchartTheme,
787
+ markStyle_markStyle,
788
+ annotation_annotation
755
789
  ];
756
790
  const barParallelAdvancedPipeline = [
757
791
  initAdvancedVSeed,
@@ -765,7 +799,9 @@ const barParallelAdvancedPipeline = [
765
799
  encodingYX,
766
800
  barParallelConfig,
767
801
  vchartBaseConfig,
768
- vchartTheme
802
+ vchartTheme,
803
+ markStyle_markStyle,
804
+ annotation_annotation
769
805
  ];
770
806
  const barPercentAdvancedPipeline = [
771
807
  initAdvancedVSeed,
@@ -779,7 +815,9 @@ const barPercentAdvancedPipeline = [
779
815
  encodingYX,
780
816
  barPercentConfig,
781
817
  vchartBaseConfig,
782
- vchartTheme
818
+ vchartTheme,
819
+ markStyle_markStyle,
820
+ annotation_annotation
783
821
  ];
784
822
  const columnAdvancedPipeline = [
785
823
  initAdvancedVSeed,
@@ -793,7 +831,9 @@ const columnAdvancedPipeline = [
793
831
  encodingXY,
794
832
  columnConfig,
795
833
  vchartBaseConfig,
796
- vchartTheme
834
+ vchartTheme,
835
+ markStyle_markStyle,
836
+ annotation_annotation
797
837
  ];
798
838
  const columnParallelAdvancedPipeline = [
799
839
  initAdvancedVSeed,
@@ -807,7 +847,9 @@ const columnParallelAdvancedPipeline = [
807
847
  encodingXY,
808
848
  columnParallelConfig,
809
849
  vchartBaseConfig,
810
- vchartTheme
850
+ vchartTheme,
851
+ markStyle_markStyle,
852
+ annotation_annotation
811
853
  ];
812
854
  const columnPercentAdvancedPipeline = [
813
855
  initAdvancedVSeed,
@@ -821,7 +863,9 @@ const columnPercentAdvancedPipeline = [
821
863
  encodingXY,
822
864
  columnPercentConfig,
823
865
  vchartBaseConfig,
824
- vchartTheme
866
+ vchartTheme,
867
+ markStyle_markStyle,
868
+ annotation_annotation
825
869
  ];
826
870
  const areaAdvancedPipeline = [
827
871
  initAdvancedVSeed,
@@ -835,7 +879,8 @@ const areaAdvancedPipeline = [
835
879
  encodingXY,
836
880
  areaConfig,
837
881
  vchartBaseConfig,
838
- vchartTheme
882
+ vchartTheme,
883
+ annotation_annotation
839
884
  ];
840
885
  const areaPercentAdvancedPipeline = [
841
886
  initAdvancedVSeed,
@@ -849,7 +894,8 @@ const areaPercentAdvancedPipeline = [
849
894
  encodingXY,
850
895
  areaPercentConfig,
851
896
  vchartBaseConfig,
852
- vchartTheme
897
+ vchartTheme,
898
+ annotation_annotation
853
899
  ];
854
900
  const pieAdvancedPipeline = [
855
901
  initAdvancedVSeed,
@@ -863,7 +909,8 @@ const pieAdvancedPipeline = [
863
909
  encodingPolar,
864
910
  pieConfig,
865
911
  vchartBaseConfig,
866
- vchartTheme
912
+ vchartTheme,
913
+ annotation_annotation
867
914
  ];
868
915
  const dataset_dataset = (spec, context)=>{
869
916
  const { advancedVSeed } = context;
@@ -1392,11 +1439,11 @@ const percent = (spec, context)=>{
1392
1439
  result.percent = true;
1393
1440
  return result;
1394
1441
  };
1395
- const stack = (spec, context)=>{
1442
+ const stackInverse = (spec)=>{
1396
1443
  const result = {
1397
1444
  ...spec
1398
1445
  };
1399
- result.stack = true;
1446
+ result.stackInverse = true;
1400
1447
  return result;
1401
1448
  };
1402
1449
  const background_backgroundColor = (spec, context)=>{
@@ -1442,24 +1489,103 @@ const label_label = (spec, context)=>{
1442
1489
  };
1443
1490
  return result;
1444
1491
  };
1445
- const defaultLegend = {
1446
- enable: true
1447
- };
1448
- const legend_legend = (spec, context)=>{
1492
+ const discreteLegend = (spec, context)=>{
1449
1493
  const result = {
1450
1494
  ...spec
1451
1495
  };
1452
1496
  const { advancedVSeed } = context;
1453
1497
  const baseConfig = advancedVSeed.baseConfig.vchart;
1454
1498
  if (!baseConfig || !baseConfig.legend) return result;
1455
- const { legend = defaultLegend } = baseConfig;
1456
- const { enable } = legend;
1499
+ const { legend } = baseConfig;
1500
+ const { enable, position = 'bottom', labelFontColor, labelFontSize = 12, labelFontWeight, maxSize, border, shapeType = 'rectRound' } = legend || {};
1501
+ const orient = [
1502
+ 'bottom',
1503
+ 'bottomLeft',
1504
+ 'bottomRight',
1505
+ 'bl',
1506
+ 'br'
1507
+ ].includes(position) ? 'bottom' : [
1508
+ 'top',
1509
+ 'topLeft',
1510
+ 'topRight',
1511
+ 'tl',
1512
+ 'tr'
1513
+ ].includes(position) ? 'top' : [
1514
+ 'left',
1515
+ 'leftTop',
1516
+ 'leftBottom',
1517
+ 'lt',
1518
+ 'lb'
1519
+ ].includes(position) ? 'left' : 'right';
1520
+ const legendPosition = [
1521
+ 'topLeft',
1522
+ 'bottomLeft',
1523
+ 'leftTop',
1524
+ 'rightTop',
1525
+ 'lt',
1526
+ 'rt',
1527
+ 'tl',
1528
+ 'bl'
1529
+ ].includes(position) ? 'start' : [
1530
+ 'topRight',
1531
+ 'bottomRight',
1532
+ 'leftBottom',
1533
+ 'rightBottom',
1534
+ 'lb',
1535
+ 'rb',
1536
+ 'rt',
1537
+ 'br'
1538
+ ].includes(position) ? 'end' : 'middle';
1457
1539
  result.legends = {
1458
- visible: enable
1540
+ type: 'discrete',
1541
+ visible: enable,
1542
+ maxCol: maxSize,
1543
+ maxRow: maxSize,
1544
+ autoPage: true,
1545
+ orient,
1546
+ position: legendPosition,
1547
+ data: border ? (items)=>items.map((item)=>{
1548
+ item.shape.outerBorder = {
1549
+ stroke: item.shape.fill,
1550
+ distance: 3,
1551
+ lineWidth: 1
1552
+ };
1553
+ return item;
1554
+ }) : void 0,
1555
+ item: {
1556
+ focus: true,
1557
+ focusIconStyle: {
1558
+ size: labelFontSize + 2,
1559
+ fill: labelFontColor,
1560
+ fontWeight: labelFontWeight
1561
+ },
1562
+ shape: {
1563
+ space: border ? 6 : 4,
1564
+ style: {
1565
+ symbolType: shapeType,
1566
+ size: border ? 8 : 10
1567
+ }
1568
+ },
1569
+ label: {
1570
+ style: {
1571
+ fontSize: labelFontSize,
1572
+ fill: labelFontColor,
1573
+ fontWeight: labelFontWeight
1574
+ }
1575
+ },
1576
+ background: {
1577
+ state: {
1578
+ selectedHover: {
1579
+ fill: labelFontColor,
1580
+ fillOpacity: 0.05
1581
+ }
1582
+ }
1583
+ }
1584
+ }
1459
1585
  };
1460
1586
  return result;
1461
1587
  };
1462
- const pivotLegend = (spec, context)=>{
1588
+ const pivotDiscreteLegend = (spec, context)=>{
1463
1589
  const result = {
1464
1590
  ...spec
1465
1591
  };
@@ -1469,38 +1595,94 @@ const pivotLegend = (spec, context)=>{
1469
1595
  const { datasetReshapeInfo } = advancedVSeed;
1470
1596
  const colorItems = (0, external_remeda_namespaceObject.unique)(datasetReshapeInfo.flatMap((d)=>d.unfoldInfo.colorItems));
1471
1597
  const { legend, color } = baseConfig;
1472
- const { enable } = legend;
1473
1598
  const { colorScheme } = color;
1599
+ const { enable, position = 'bottom', labelFontColor, labelFontSize = 12, labelFontWeight, maxSize, border, shapeType = 'rectRound' } = legend || {};
1600
+ const orient = [
1601
+ 'bottom',
1602
+ 'bottomLeft',
1603
+ 'bottomRight',
1604
+ 'bl',
1605
+ 'br'
1606
+ ].includes(position) ? 'bottom' : [
1607
+ 'top',
1608
+ 'topLeft',
1609
+ 'topRight',
1610
+ 'tl',
1611
+ 'tr'
1612
+ ].includes(position) ? 'top' : [
1613
+ 'left',
1614
+ 'leftTop',
1615
+ 'leftBottom',
1616
+ 'lt',
1617
+ 'lb'
1618
+ ].includes(position) ? 'left' : 'right';
1619
+ const legendPosition = [
1620
+ 'topLeft',
1621
+ 'bottomLeft',
1622
+ 'leftTop',
1623
+ 'rightTop',
1624
+ 'lt',
1625
+ 'rt',
1626
+ 'tl',
1627
+ 'bl'
1628
+ ].includes(position) ? 'start' : [
1629
+ 'topRight',
1630
+ 'bottomRight',
1631
+ 'leftBottom',
1632
+ 'rightBottom',
1633
+ 'lb',
1634
+ 'rb',
1635
+ 'rt',
1636
+ 'br'
1637
+ ].includes(position) ? 'end' : 'middle';
1474
1638
  const legends = {
1475
1639
  visible: enable,
1476
- alignSelf: 'end',
1477
1640
  type: 'discrete',
1478
- position: 'middle',
1641
+ orient,
1642
+ position: legendPosition,
1643
+ maxCol: maxSize,
1644
+ maxRow: maxSize,
1479
1645
  data: colorItems.map((d, index)=>({
1480
1646
  label: d,
1481
1647
  shape: {
1482
- symbolType: 'square',
1648
+ outerBorder: border ? {
1649
+ stroke: colorScheme[index],
1650
+ distance: 3,
1651
+ lineWidth: 1
1652
+ } : void 0,
1483
1653
  fill: colorScheme[index]
1484
1654
  }
1485
1655
  })),
1486
1656
  item: {
1657
+ focus: true,
1658
+ focusIconStyle: {
1659
+ size: labelFontSize + 2,
1660
+ fill: labelFontColor,
1661
+ fontWeight: labelFontWeight
1662
+ },
1663
+ shape: {
1664
+ space: border ? 6 : 4,
1665
+ style: {
1666
+ symbolType: shapeType,
1667
+ size: border ? 8 : 10
1668
+ }
1669
+ },
1670
+ label: {
1671
+ style: {
1672
+ fontSize: labelFontSize,
1673
+ fill: labelFontColor,
1674
+ fontWeight: labelFontWeight
1675
+ }
1676
+ },
1487
1677
  background: {
1488
- visible: true,
1489
1678
  state: {
1490
1679
  selectedHover: {
1491
- fill: '#000000',
1680
+ fill: labelFontColor,
1492
1681
  fillOpacity: 0.05
1493
1682
  }
1494
1683
  }
1495
- },
1496
- label: {
1497
- style: {
1498
- fontSize: 12,
1499
- fill: '#6F6F6F'
1500
- }
1501
1684
  }
1502
- },
1503
- orient: 'bottom'
1685
+ }
1504
1686
  };
1505
1687
  return {
1506
1688
  ...result,
@@ -1749,6 +1931,192 @@ const pivotRowDimensions = (spec, context)=>{
1749
1931
  rows: rows
1750
1932
  };
1751
1933
  };
1934
+ const selector_selector = (datum, selector)=>{
1935
+ if (!selector) return true;
1936
+ const selectors = Array.isArray(selector) ? selector : [
1937
+ selector
1938
+ ];
1939
+ for (const selector of selectors)if (isValueSelector(selector)) {
1940
+ if (Object.values(datum).find((v)=>v === selector)) return true;
1941
+ } else if (isMeasureSelector(selector)) {
1942
+ const selectorValueArr = Array.isArray(selector.value) ? selector.value : [
1943
+ selector.value
1944
+ ];
1945
+ switch(selector.operator){
1946
+ case '=':
1947
+ if (datum[selector.field] === selectorValueArr[0]) return true;
1948
+ break;
1949
+ case '!=':
1950
+ if (datum[selector.field] !== selectorValueArr[0]) return true;
1951
+ break;
1952
+ case '>':
1953
+ if (datum[selector.field] > selectorValueArr[0]) return true;
1954
+ break;
1955
+ case '<':
1956
+ if (datum[selector.field] < selectorValueArr[0]) return true;
1957
+ break;
1958
+ case '>=':
1959
+ if (datum[selector.field] >= selectorValueArr[0]) return true;
1960
+ break;
1961
+ case '<=':
1962
+ if (datum[selector.field] <= selectorValueArr[0]) return true;
1963
+ break;
1964
+ case 'between':
1965
+ if (Array.isArray(selector.value) && datum[selector.field] >= selectorValueArr[0] && datum[selector.field] <= selectorValueArr[1]) return true;
1966
+ break;
1967
+ default:
1968
+ break;
1969
+ }
1970
+ } else if (isDimensionSelector(selector)) {
1971
+ const selectorValueArr = Array.isArray(selector.value) ? selector.value : [
1972
+ selector.value
1973
+ ];
1974
+ if ('in' === selector.operator && selectorValueArr.includes(datum[selector.field])) return true;
1975
+ if ('not in' === selector.operator && !selectorValueArr.includes(datum[selector.field])) return true;
1976
+ } else if (isPartialDatumSelector(selector)) {
1977
+ if (Object.keys(selector).every((key)=>datum[key] === selector[key])) return true;
1978
+ }
1979
+ return false;
1980
+ };
1981
+ const isValueSelector = (selector)=>'string' == typeof selector || 'number' == typeof selector;
1982
+ const isPartialDatumSelector = (selector)=>'object' == typeof selector && null !== selector;
1983
+ const isMeasureSelector = (selector)=>'object' == typeof selector && null !== selector && 'field' in selector && 'operator' in selector && 'value' in selector && [
1984
+ '=',
1985
+ '!=',
1986
+ '>',
1987
+ '<',
1988
+ '>=',
1989
+ '<=',
1990
+ 'between'
1991
+ ].includes(selector.operator);
1992
+ const isDimensionSelector = (selector)=>'object' == typeof selector && null !== selector && 'field' in selector && 'operator' in selector && 'value' in selector && [
1993
+ 'in',
1994
+ 'not in'
1995
+ ].includes(selector.operator);
1996
+ const barStyle_barStyle = (spec, context)=>{
1997
+ const { advancedVSeed } = context;
1998
+ const { markStyle, encoding } = advancedVSeed;
1999
+ const { barStyle } = markStyle;
2000
+ if (!barStyle) return spec;
2001
+ const result = {
2002
+ ...spec
2003
+ };
2004
+ const { selector: barSelector, barBorderColor, barBorderStyle, barBorderWidth, barColor, barColorOpacity, barRadius } = barStyle;
2005
+ return {
2006
+ ...result,
2007
+ bar: {
2008
+ style: {
2009
+ fill: barColor ? (datum, context)=>{
2010
+ if (selector_selector(datum, barSelector)) return barColor;
2011
+ return context.seriesColor(datum[encoding[0]?.group?.[0]]);
2012
+ } : void 0,
2013
+ fillOpacity: barColorOpacity ? (datum)=>{
2014
+ if (selector_selector(datum, barSelector)) return barColorOpacity;
2015
+ return 1;
2016
+ } : void 0,
2017
+ stroke: barBorderColor ? (datum, context)=>{
2018
+ if (selector_selector(datum, barSelector)) return barBorderColor;
2019
+ return context.seriesColor(datum[encoding[0]?.group?.[0]]);
2020
+ } : void 0,
2021
+ lineWidth: barBorderWidth ? (datum)=>{
2022
+ if (selector_selector(datum, barSelector)) return barBorderWidth;
2023
+ return 0;
2024
+ } : void 0,
2025
+ lineDash: barBorderStyle ? (datum)=>{
2026
+ if (selector_selector(datum, barSelector)) {
2027
+ if ('solid' === barBorderStyle) ;
2028
+ else if ('dashed' === barBorderStyle) return [
2029
+ 5,
2030
+ 5
2031
+ ];
2032
+ else if ('dotted' === barBorderStyle) return [
2033
+ 1,
2034
+ 5
2035
+ ];
2036
+ }
2037
+ return [
2038
+ 0,
2039
+ 0
2040
+ ];
2041
+ } : void 0,
2042
+ cornerRadius: barRadius ? (datum)=>{
2043
+ if (selector_selector(datum, barSelector)) return barRadius;
2044
+ return 0;
2045
+ } : void 0
2046
+ }
2047
+ }
2048
+ };
2049
+ };
2050
+ const annotationPoint_annotationPoint = (spec, context)=>{
2051
+ const { advancedVSeed } = context;
2052
+ const { annotation } = advancedVSeed;
2053
+ if (!annotation || !annotation.annotationPoint) return spec;
2054
+ const { annotationPoint } = annotation;
2055
+ const annotationPointList = Array.isArray(annotationPoint) ? annotationPoint : [
2056
+ annotationPoint
2057
+ ];
2058
+ const markPoint = annotationPointList.flatMap((annotationPoint)=>{
2059
+ const { selector: selectorPoint, text = '', textColor = '#ffffff', textFontSize = 12, textFontWeight = 400, textAlign = 'center', textBaseline = 'middle', backgroundBorderColor, backgroundBorderRadius = 4, backgroundBorderWidth = 1, backgroundColor = '#212121', backgroundPadding = 4, backgroundVisible = true, offsetX = 0, offsetY = 0 } = annotationPoint;
2060
+ const dataset = advancedVSeed.dataset.flat();
2061
+ const selectedData = dataset.filter((datum)=>selector_selector(datum, selectorPoint));
2062
+ return selectedData.map((datum)=>({
2063
+ regionRelative: true,
2064
+ position: (data, context)=>{
2065
+ const targetDatum = data.find((item)=>isSubset(datum, item));
2066
+ if (targetDatum) {
2067
+ const { x, y } = context.dataToPosition(targetDatum);
2068
+ const xBandWidth = context.scaleX?.bandwidth?.();
2069
+ const yBandWidth = context.scaleY?.bandwidth?.();
2070
+ if (xBandWidth) return {
2071
+ x: x,
2072
+ y: y
2073
+ };
2074
+ if (yBandWidth) return {
2075
+ x,
2076
+ y: y
2077
+ };
2078
+ }
2079
+ },
2080
+ itemLine: {
2081
+ visible: false
2082
+ },
2083
+ itemContent: {
2084
+ offsetY,
2085
+ offsetX,
2086
+ text: {
2087
+ visible: true,
2088
+ text: text,
2089
+ style: {
2090
+ textAlign: textAlign,
2091
+ textBaseline: textBaseline,
2092
+ fill: textColor,
2093
+ fontSize: textFontSize,
2094
+ fontWeight: textFontWeight
2095
+ },
2096
+ labelBackground: {
2097
+ visible: backgroundVisible,
2098
+ padding: backgroundPadding,
2099
+ style: {
2100
+ cornerRadius: backgroundBorderRadius ?? 4,
2101
+ fill: backgroundColor,
2102
+ stroke: backgroundBorderColor,
2103
+ strokeWidth: backgroundBorderWidth
2104
+ }
2105
+ }
2106
+ }
2107
+ }
2108
+ }));
2109
+ });
2110
+ return {
2111
+ ...spec,
2112
+ markPoint
2113
+ };
2114
+ };
2115
+ const isSubset = (sub, obj)=>Object.entries(sub).every(([key, value])=>{
2116
+ if ('string' == typeof value) return obj[key] === value;
2117
+ if ('number' == typeof value) return obj[key] === value;
2118
+ return true;
2119
+ });
1752
2120
  const line_line = [
1753
2121
  initLine,
1754
2122
  color_color,
@@ -1758,7 +2126,8 @@ const line_line = [
1758
2126
  yLinear,
1759
2127
  label_label,
1760
2128
  tooltip_tooltip,
1761
- legend_legend
2129
+ discreteLegend,
2130
+ annotationPoint_annotationPoint
1762
2131
  ];
1763
2132
  const pivotLine = [
1764
2133
  initPivot,
@@ -1773,17 +2142,19 @@ const pivotLine = [
1773
2142
  xBand,
1774
2143
  yLinear,
1775
2144
  label_label,
1776
- tooltip_tooltip
2145
+ tooltip_tooltip,
2146
+ annotationPoint_annotationPoint
1777
2147
  ]),
1778
2148
  pivotRowDimensions,
1779
2149
  pivotColumnDimensions,
1780
- pivotLegend
2150
+ pivotDiscreteLegend
1781
2151
  ];
1782
2152
  const lineSpecPipeline = [
1783
2153
  pivotAdapter_pivotAdapter(line_line, pivotLine)
1784
2154
  ];
1785
2155
  const column = [
1786
2156
  initColumn,
2157
+ stackInverse,
1787
2158
  color_color,
1788
2159
  background_backgroundColor,
1789
2160
  dataset_dataset,
@@ -1791,7 +2162,9 @@ const column = [
1791
2162
  yLinear,
1792
2163
  label_label,
1793
2164
  tooltip_tooltip,
1794
- legend_legend
2165
+ discreteLegend,
2166
+ barStyle_barStyle,
2167
+ annotationPoint_annotationPoint
1795
2168
  ];
1796
2169
  const pivotColumn = [
1797
2170
  initPivot,
@@ -1800,17 +2173,20 @@ const pivotColumn = [
1800
2173
  datasetPivot,
1801
2174
  pivotIndicators([
1802
2175
  initColumn,
2176
+ stackInverse,
1803
2177
  color_color,
1804
2178
  background_backgroundColor,
1805
2179
  datasetPivotPlaceholder,
1806
2180
  xBand,
1807
2181
  yLinear,
1808
2182
  label_label,
1809
- tooltip_tooltip
2183
+ tooltip_tooltip,
2184
+ barStyle_barStyle,
2185
+ annotationPoint_annotationPoint
1810
2186
  ]),
1811
2187
  pivotRowDimensions,
1812
2188
  pivotColumnDimensions,
1813
- pivotLegend
2189
+ pivotDiscreteLegend
1814
2190
  ];
1815
2191
  const columnSpecPipeline = [
1816
2192
  pivotAdapter_pivotAdapter(column, pivotColumn)
@@ -1824,7 +2200,9 @@ const columnParallel = [
1824
2200
  yLinear,
1825
2201
  label_label,
1826
2202
  tooltip_tooltip,
1827
- legend_legend
2203
+ discreteLegend,
2204
+ barStyle_barStyle,
2205
+ annotationPoint_annotationPoint
1828
2206
  ];
1829
2207
  const pivotColumnParallel = [
1830
2208
  initPivot,
@@ -1839,17 +2217,20 @@ const pivotColumnParallel = [
1839
2217
  xBand,
1840
2218
  yLinear,
1841
2219
  label_label,
1842
- tooltip_tooltip
2220
+ tooltip_tooltip,
2221
+ barStyle_barStyle,
2222
+ annotationPoint_annotationPoint
1843
2223
  ]),
1844
2224
  pivotRowDimensions,
1845
2225
  pivotColumnDimensions,
1846
- pivotLegend
2226
+ pivotDiscreteLegend
1847
2227
  ];
1848
2228
  const columnParallelSpecPipeline = [
1849
2229
  pivotAdapter_pivotAdapter(columnParallel, pivotColumnParallel)
1850
2230
  ];
1851
2231
  const columnPercent = [
1852
2232
  initColumn,
2233
+ stackInverse,
1853
2234
  color_color,
1854
2235
  background_backgroundColor,
1855
2236
  percent,
@@ -1858,7 +2239,9 @@ const columnPercent = [
1858
2239
  yLinear,
1859
2240
  label_label,
1860
2241
  tooltip_tooltip,
1861
- legend_legend
2242
+ discreteLegend,
2243
+ barStyle_barStyle,
2244
+ annotationPoint_annotationPoint
1862
2245
  ];
1863
2246
  const pivotColumnPercent = [
1864
2247
  initPivot,
@@ -1867,6 +2250,7 @@ const pivotColumnPercent = [
1867
2250
  datasetPivot,
1868
2251
  pivotIndicators([
1869
2252
  initColumn,
2253
+ stackInverse,
1870
2254
  color_color,
1871
2255
  percent,
1872
2256
  background_backgroundColor,
@@ -1874,11 +2258,13 @@ const pivotColumnPercent = [
1874
2258
  xBand,
1875
2259
  yLinear,
1876
2260
  label_label,
1877
- tooltip_tooltip
2261
+ tooltip_tooltip,
2262
+ barStyle_barStyle,
2263
+ annotationPoint_annotationPoint
1878
2264
  ]),
1879
2265
  pivotRowDimensions,
1880
2266
  pivotColumnDimensions,
1881
- pivotLegend
2267
+ pivotDiscreteLegend
1882
2268
  ];
1883
2269
  const columnPercentSpecPipeline = [
1884
2270
  pivotAdapter_pivotAdapter(columnPercent, pivotColumnPercent)
@@ -1892,7 +2278,9 @@ const bar = [
1892
2278
  yBand,
1893
2279
  label_label,
1894
2280
  tooltip_tooltip,
1895
- legend_legend
2281
+ discreteLegend,
2282
+ barStyle_barStyle,
2283
+ annotationPoint_annotationPoint
1896
2284
  ];
1897
2285
  const pivotBar = [
1898
2286
  initPivot,
@@ -1907,11 +2295,13 @@ const pivotBar = [
1907
2295
  yBand,
1908
2296
  label_label,
1909
2297
  label_label,
1910
- tooltip_tooltip
2298
+ tooltip_tooltip,
2299
+ barStyle_barStyle,
2300
+ annotationPoint_annotationPoint
1911
2301
  ]),
1912
2302
  pivotRowDimensions,
1913
2303
  pivotColumnDimensions,
1914
- pivotLegend
2304
+ pivotDiscreteLegend
1915
2305
  ];
1916
2306
  const barSpecPipeline = [
1917
2307
  pivotAdapter_pivotAdapter(bar, pivotBar)
@@ -1925,7 +2315,9 @@ const barParallel = [
1925
2315
  yBand,
1926
2316
  label_label,
1927
2317
  tooltip_tooltip,
1928
- legend_legend
2318
+ discreteLegend,
2319
+ barStyle_barStyle,
2320
+ annotationPoint_annotationPoint
1929
2321
  ];
1930
2322
  const pivotBarParallel = [
1931
2323
  initPivot,
@@ -1940,11 +2332,13 @@ const pivotBarParallel = [
1940
2332
  yBand,
1941
2333
  xLinear,
1942
2334
  label_label,
1943
- tooltip_tooltip
2335
+ tooltip_tooltip,
2336
+ barStyle_barStyle,
2337
+ annotationPoint_annotationPoint
1944
2338
  ]),
1945
2339
  pivotRowDimensions,
1946
2340
  pivotColumnDimensions,
1947
- pivotLegend
2341
+ pivotDiscreteLegend
1948
2342
  ];
1949
2343
  const barParallelSpecPipeline = [
1950
2344
  pivotAdapter_pivotAdapter(barParallel, pivotBarParallel)
@@ -1959,7 +2353,9 @@ const barPercent = [
1959
2353
  yBand,
1960
2354
  label_label,
1961
2355
  tooltip_tooltip,
1962
- legend_legend
2356
+ discreteLegend,
2357
+ barStyle_barStyle,
2358
+ annotationPoint_annotationPoint
1963
2359
  ];
1964
2360
  const pivotBarPercent = [
1965
2361
  initPivot,
@@ -1975,26 +2371,29 @@ const pivotBarPercent = [
1975
2371
  yBand,
1976
2372
  xLinear,
1977
2373
  label_label,
1978
- tooltip_tooltip
2374
+ tooltip_tooltip,
2375
+ barStyle_barStyle,
2376
+ annotationPoint_annotationPoint
1979
2377
  ]),
1980
2378
  pivotRowDimensions,
1981
2379
  pivotColumnDimensions,
1982
- pivotLegend
2380
+ pivotDiscreteLegend
1983
2381
  ];
1984
2382
  const barPercentSpecPipeline = [
1985
2383
  pivotAdapter_pivotAdapter(barPercent, pivotBarPercent)
1986
2384
  ];
1987
2385
  const area_area = [
1988
2386
  initArea,
2387
+ stackInverse,
1989
2388
  color_color,
1990
2389
  background_backgroundColor,
1991
- stack,
1992
2390
  dataset_dataset,
1993
2391
  xBand,
1994
2392
  yLinear,
1995
2393
  label_label,
1996
2394
  tooltip_tooltip,
1997
- legend_legend
2395
+ discreteLegend,
2396
+ annotationPoint_annotationPoint
1998
2397
  ];
1999
2398
  const pivotArea = [
2000
2399
  initPivot,
@@ -2005,22 +2404,24 @@ const pivotArea = [
2005
2404
  initArea,
2006
2405
  color_color,
2007
2406
  background_backgroundColor,
2008
- stack,
2407
+ stackInverse,
2009
2408
  datasetPivotPlaceholder,
2010
2409
  xBand,
2011
2410
  yLinear,
2012
2411
  label_label,
2013
- tooltip_tooltip
2412
+ tooltip_tooltip,
2413
+ annotationPoint_annotationPoint
2014
2414
  ]),
2015
2415
  pivotRowDimensions,
2016
2416
  pivotColumnDimensions,
2017
- pivotLegend
2417
+ pivotDiscreteLegend
2018
2418
  ];
2019
2419
  const areaSpecPipeline = [
2020
2420
  pivotAdapter_pivotAdapter(area_area, pivotArea)
2021
2421
  ];
2022
2422
  const areaPercent = [
2023
2423
  initArea,
2424
+ stackInverse,
2024
2425
  color_color,
2025
2426
  background_backgroundColor,
2026
2427
  percent,
@@ -2029,7 +2430,8 @@ const areaPercent = [
2029
2430
  yLinear,
2030
2431
  label_label,
2031
2432
  tooltip_tooltip,
2032
- legend_legend
2433
+ discreteLegend,
2434
+ annotationPoint_annotationPoint
2033
2435
  ];
2034
2436
  const pivotAreaPercent = [
2035
2437
  initPivot,
@@ -2038,6 +2440,7 @@ const pivotAreaPercent = [
2038
2440
  datasetPivot,
2039
2441
  pivotIndicators([
2040
2442
  initArea,
2443
+ stackInverse,
2041
2444
  color_color,
2042
2445
  background_backgroundColor,
2043
2446
  percent,
@@ -2045,11 +2448,12 @@ const pivotAreaPercent = [
2045
2448
  xBand,
2046
2449
  yLinear,
2047
2450
  label_label,
2048
- tooltip_tooltip
2451
+ tooltip_tooltip,
2452
+ annotationPoint_annotationPoint
2049
2453
  ]),
2050
2454
  pivotRowDimensions,
2051
2455
  pivotColumnDimensions,
2052
- pivotLegend
2456
+ pivotDiscreteLegend
2053
2457
  ];
2054
2458
  const areaPercentSpecPipeline = [
2055
2459
  pivotAdapter_pivotAdapter(areaPercent, pivotAreaPercent)
@@ -2061,7 +2465,8 @@ const pie = [
2061
2465
  dataset_dataset,
2062
2466
  label_label,
2063
2467
  tooltip_tooltip,
2064
- legend_legend
2468
+ discreteLegend,
2469
+ annotationPoint_annotationPoint
2065
2470
  ];
2066
2471
  const pivotPie = [
2067
2472
  initPivot,
@@ -2074,11 +2479,12 @@ const pivotPie = [
2074
2479
  background_backgroundColor,
2075
2480
  datasetPivotPlaceholder,
2076
2481
  label_label,
2077
- tooltip_tooltip
2482
+ tooltip_tooltip,
2483
+ annotationPoint_annotationPoint
2078
2484
  ]),
2079
2485
  pivotRowDimensions,
2080
2486
  pivotColumnDimensions,
2081
- pivotLegend
2487
+ pivotDiscreteLegend
2082
2488
  ];
2083
2489
  const pieSpecPipeline = [
2084
2490
  pivotAdapter_pivotAdapter(pie, pivotPie)
@@ -2215,18 +2621,18 @@ const lightTheme = ()=>{
2215
2621
  },
2216
2622
  grid: {
2217
2623
  visible: true,
2218
- gridColor: 'rgba(54, 65, 89, 0.15)',
2624
+ gridColor: '#36415926',
2219
2625
  gridWidth: 0.5
2220
2626
  },
2221
2627
  tick: {
2222
2628
  visible: false,
2223
2629
  tickInside: false,
2224
2630
  tickSize: 4,
2225
- tickColor: 'rgba(54, 65, 89, 0.30)'
2631
+ tickColor: '#3641594d'
2226
2632
  },
2227
2633
  line: {
2228
2634
  visible: false,
2229
- lineColor: 'rgba(54, 65, 89, 0.30)',
2635
+ lineColor: '#3641594d',
2230
2636
  lineWidth: 1
2231
2637
  }
2232
2638
  };
@@ -2257,18 +2663,18 @@ const lightTheme = ()=>{
2257
2663
  },
2258
2664
  grid: {
2259
2665
  visible: false,
2260
- gridColor: 'rgba(54, 65, 89, 0.15)',
2666
+ gridColor: '#36415926',
2261
2667
  gridWidth: 0.5
2262
2668
  },
2263
2669
  tick: {
2264
2670
  visible: false,
2265
2671
  tickInside: false,
2266
2672
  tickSize: 4,
2267
- tickColor: 'rgba(54, 65, 89, 0.30)'
2673
+ tickColor: '#3641594d'
2268
2674
  },
2269
2675
  line: {
2270
2676
  visible: true,
2271
- lineColor: 'rgba(54, 65, 89, 0.30)',
2677
+ lineColor: '#3641594d',
2272
2678
  lineWidth: 1
2273
2679
  }
2274
2680
  };
@@ -2288,10 +2694,10 @@ const lightTheme = ()=>{
2288
2694
  return {
2289
2695
  baseConfig: {
2290
2696
  vtable: {
2291
- backgroundColor: '#ffffff'
2697
+ backgroundColor: 'transparent'
2292
2698
  },
2293
2699
  vchart: {
2294
- backgroundColor: '#ffffff',
2700
+ backgroundColor: 'transparent',
2295
2701
  color: {
2296
2702
  colorScheme: [
2297
2703
  '#8D72F6',
@@ -2313,7 +2719,14 @@ const lightTheme = ()=>{
2313
2719
  enable: true
2314
2720
  },
2315
2721
  legend: {
2316
- enable: true
2722
+ enable: true,
2723
+ border: true,
2724
+ maxSize: 1,
2725
+ shapeType: 'rectRound',
2726
+ position: 'rt',
2727
+ labelFontColor: '#646A73',
2728
+ labelFontSize: 12,
2729
+ labelFontWeight: 400
2317
2730
  }
2318
2731
  }
2319
2732
  },
@@ -2437,10 +2850,10 @@ const darkTheme = ()=>{
2437
2850
  return {
2438
2851
  baseConfig: {
2439
2852
  vtable: {
2440
- backgroundColor: '#141414'
2853
+ backgroundColor: 'transparent'
2441
2854
  },
2442
2855
  vchart: {
2443
- backgroundColor: '#141414',
2856
+ backgroundColor: 'transparent',
2444
2857
  color: {
2445
2858
  colorScheme: [
2446
2859
  '#2E62F1',
@@ -2462,7 +2875,14 @@ const darkTheme = ()=>{
2462
2875
  enable: true
2463
2876
  },
2464
2877
  legend: {
2465
- enable: true
2878
+ enable: true,
2879
+ border: true,
2880
+ maxSize: 1,
2881
+ position: 'rt',
2882
+ shapeType: 'rectRound',
2883
+ labelFontColor: '#FDFDFD',
2884
+ labelFontSize: 12,
2885
+ labelFontWeight: 400
2466
2886
  }
2467
2887
  }
2468
2888
  },
@@ -2629,7 +3049,58 @@ const zTooltip = external_zod_namespaceObject.z.object({
2629
3049
  enable: external_zod_namespaceObject.z.boolean().default(true).optional()
2630
3050
  });
2631
3051
  const zLegend = external_zod_namespaceObject.z.object({
2632
- enable: external_zod_namespaceObject.z.boolean().default(true).optional()
3052
+ enable: external_zod_namespaceObject.z.boolean().default(true).optional(),
3053
+ border: external_zod_namespaceObject.z.boolean().default(true).optional(),
3054
+ maxSize: external_zod_namespaceObject.z.number().default(1).optional(),
3055
+ shapeType: external_zod_namespaceObject.z["enum"]([
3056
+ 'circle',
3057
+ 'cross',
3058
+ 'diamond',
3059
+ 'square',
3060
+ 'arrow',
3061
+ 'arrow2Left',
3062
+ 'arrow2Right',
3063
+ 'wedge',
3064
+ 'thinTriangle',
3065
+ 'triangle',
3066
+ 'triangleUp',
3067
+ 'triangleDown',
3068
+ 'triangleRight',
3069
+ 'triangleLeft',
3070
+ 'stroke',
3071
+ 'star',
3072
+ 'wye',
3073
+ 'rect',
3074
+ 'arrowLeft',
3075
+ 'arrowRight',
3076
+ 'rectRound',
3077
+ 'roundLine'
3078
+ ]).default('rectRound').optional(),
3079
+ position: external_zod_namespaceObject.z["enum"]([
3080
+ 'left',
3081
+ 'leftTop',
3082
+ 'leftBottom',
3083
+ 'lt',
3084
+ 'lb',
3085
+ 'top',
3086
+ 'topLeft',
3087
+ 'topRight',
3088
+ 'tl',
3089
+ 'tr',
3090
+ 'right',
3091
+ 'rightTop',
3092
+ 'rightBottom',
3093
+ 'rt',
3094
+ 'rb',
3095
+ 'bottom',
3096
+ 'bottomLeft',
3097
+ 'bottomRight',
3098
+ 'bl',
3099
+ 'br'
3100
+ ]).default('bottom').optional(),
3101
+ labelFontSize: external_zod_namespaceObject.z.number().default(12).optional(),
3102
+ labelFontColor: external_zod_namespaceObject.z.string().default('#fff').optional(),
3103
+ labelFontWeight: external_zod_namespaceObject.z.number().or(external_zod_namespaceObject.z.string()).default(400).optional()
2633
3104
  });
2634
3105
  const zVChartBaseConfig = external_zod_namespaceObject.z.object({
2635
3106
  backgroundColor: zBackgroundColor,
@@ -2826,10 +3297,93 @@ const zCustomThemeConfig = external_zod_namespaceObject.z.object({
2826
3297
  });
2827
3298
  const zCustomTheme = external_zod_namespaceObject.z.record(external_zod_namespaceObject.z.string(), zCustomThemeConfig).optional();
2828
3299
  const zTheme = external_zod_namespaceObject.z.string();
3300
+ const zSelector = external_zod_namespaceObject.z.union([
3301
+ external_zod_namespaceObject.z.string(),
3302
+ external_zod_namespaceObject.z.number(),
3303
+ external_zod_namespaceObject.z.object({
3304
+ field: external_zod_namespaceObject.z.string(),
3305
+ operator: external_zod_namespaceObject.z.string(),
3306
+ value: external_zod_namespaceObject.z.union([
3307
+ external_zod_namespaceObject.z.string(),
3308
+ external_zod_namespaceObject.z.number(),
3309
+ external_zod_namespaceObject.z.array(external_zod_namespaceObject.z.union([
3310
+ external_zod_namespaceObject.z.string(),
3311
+ external_zod_namespaceObject.z.number()
3312
+ ]))
3313
+ ])
3314
+ }),
3315
+ external_zod_namespaceObject.z.object({
3316
+ field: external_zod_namespaceObject.z.string(),
3317
+ operator: external_zod_namespaceObject.z.string(),
3318
+ value: external_zod_namespaceObject.z.union([
3319
+ external_zod_namespaceObject.z.string(),
3320
+ external_zod_namespaceObject.z.number(),
3321
+ external_zod_namespaceObject.z.array(external_zod_namespaceObject.z.union([
3322
+ external_zod_namespaceObject.z.string(),
3323
+ external_zod_namespaceObject.z.number()
3324
+ ]))
3325
+ ])
3326
+ })
3327
+ ]);
3328
+ const zSelectors = external_zod_namespaceObject.z.array(zSelector);
3329
+ const zBarStyle = external_zod_namespaceObject.z.object({
3330
+ selector: external_zod_namespaceObject.z.union([
3331
+ zSelector,
3332
+ zSelectors
3333
+ ]).optional(),
3334
+ barColor: external_zod_namespaceObject.z.string().optional(),
3335
+ barColorOpacity: external_zod_namespaceObject.z.number().optional(),
3336
+ barBorderColor: external_zod_namespaceObject.z.string().optional(),
3337
+ barBorderWidth: external_zod_namespaceObject.z.number().optional(),
3338
+ barBorderStyle: external_zod_namespaceObject.z.union([
3339
+ external_zod_namespaceObject.z.literal('solid'),
3340
+ external_zod_namespaceObject.z.literal('dashed'),
3341
+ external_zod_namespaceObject.z.literal('dotted')
3342
+ ]).optional(),
3343
+ barRadius: external_zod_namespaceObject.z.union([
3344
+ external_zod_namespaceObject.z.number(),
3345
+ external_zod_namespaceObject.z.array(external_zod_namespaceObject.z.number())
3346
+ ]).optional()
3347
+ });
3348
+ const zMarkStyle = external_zod_namespaceObject.z.object({
3349
+ barStyle: zBarStyle.optional()
3350
+ });
3351
+ const zAnnotationPoint = external_zod_namespaceObject.z.object({
3352
+ selector: external_zod_namespaceObject.z.union([
3353
+ zSelector,
3354
+ zSelectors
3355
+ ]),
3356
+ text: external_zod_namespaceObject.z.string().or(external_zod_namespaceObject.z.array(external_zod_namespaceObject.z.string())).optional(),
3357
+ textColor: external_zod_namespaceObject.z.string().default('#ffffff').optional(),
3358
+ textFontSize: external_zod_namespaceObject.z.number().default(12).optional(),
3359
+ textFontWeight: external_zod_namespaceObject.z.number().default(400).optional(),
3360
+ textAlign: external_zod_namespaceObject.z["enum"]([
3361
+ 'left',
3362
+ 'right',
3363
+ 'center'
3364
+ ]).default('center').optional(),
3365
+ textBaseline: external_zod_namespaceObject.z["enum"]([
3366
+ 'top',
3367
+ 'middle',
3368
+ 'bottom'
3369
+ ]).default('middle').optional(),
3370
+ backgroundVisible: external_zod_namespaceObject.z.boolean().default(true).optional(),
3371
+ backgroundColor: external_zod_namespaceObject.z.string().default('#212121').optional(),
3372
+ backgroundBorderColor: external_zod_namespaceObject.z.string().optional(),
3373
+ backgroundBorderWidth: external_zod_namespaceObject.z.number().default(1).optional(),
3374
+ backgroundBorderRadius: external_zod_namespaceObject.z.number().default(4).optional(),
3375
+ backgroundPadding: external_zod_namespaceObject.z.number().optional(),
3376
+ offsetY: external_zod_namespaceObject.z.number().default(0).optional(),
3377
+ offsetX: external_zod_namespaceObject.z.number().default(0).optional()
3378
+ });
3379
+ const zAnnotation = external_zod_namespaceObject.z.object({
3380
+ annotationPoint: zAnnotationPoint.or(external_zod_namespaceObject.z.array(zAnnotationPoint)).optional()
3381
+ });
2829
3382
  exports.Builder = __webpack_exports__.Builder;
2830
3383
  exports.FoldMeasureId = __webpack_exports__.FoldMeasureId;
2831
3384
  exports.FoldMeasureName = __webpack_exports__.FoldMeasureName;
2832
3385
  exports.FoldMeasureValue = __webpack_exports__.FoldMeasureValue;
3386
+ exports.ORIGINAL_DATA = __webpack_exports__.ORIGINAL_DATA;
2833
3387
  exports.Separator = __webpack_exports__.Separator;
2834
3388
  exports.UnfoldDimensionGroup = __webpack_exports__.UnfoldDimensionGroup;
2835
3389
  exports.areaAdvancedPipeline = __webpack_exports__.areaAdvancedPipeline;
@@ -2875,8 +3429,11 @@ exports.registerDarkTheme = __webpack_exports__.registerDarkTheme;
2875
3429
  exports.registerLightTheme = __webpack_exports__.registerLightTheme;
2876
3430
  exports.registerLine = __webpack_exports__.registerLine;
2877
3431
  exports.unfoldDimensions = __webpack_exports__.unfoldDimensions;
3432
+ exports.zAnnotation = __webpack_exports__.zAnnotation;
3433
+ exports.zAnnotationPoint = __webpack_exports__.zAnnotationPoint;
2878
3434
  exports.zAxis = __webpack_exports__.zAxis;
2879
3435
  exports.zBackgroundColor = __webpack_exports__.zBackgroundColor;
3436
+ exports.zBarStyle = __webpack_exports__.zBarStyle;
2880
3437
  exports.zBaseConfig = __webpack_exports__.zBaseConfig;
2881
3438
  exports.zChartType = __webpack_exports__.zChartType;
2882
3439
  exports.zColor = __webpack_exports__.zColor;
@@ -2892,6 +3449,7 @@ exports.zEncoding = __webpack_exports__.zEncoding;
2892
3449
  exports.zFoldInfo = __webpack_exports__.zFoldInfo;
2893
3450
  exports.zLabel = __webpack_exports__.zLabel;
2894
3451
  exports.zLegend = __webpack_exports__.zLegend;
3452
+ exports.zMarkStyle = __webpack_exports__.zMarkStyle;
2895
3453
  exports.zMeasure = __webpack_exports__.zMeasure;
2896
3454
  exports.zMeasureGroup = __webpack_exports__.zMeasureGroup;
2897
3455
  exports.zMeasures = __webpack_exports__.zMeasures;
@@ -2907,6 +3465,7 @@ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
2907
3465
  "FoldMeasureId",
2908
3466
  "FoldMeasureName",
2909
3467
  "FoldMeasureValue",
3468
+ "ORIGINAL_DATA",
2910
3469
  "Separator",
2911
3470
  "UnfoldDimensionGroup",
2912
3471
  "areaAdvancedPipeline",
@@ -2952,8 +3511,11 @@ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
2952
3511
  "registerLightTheme",
2953
3512
  "registerLine",
2954
3513
  "unfoldDimensions",
3514
+ "zAnnotation",
3515
+ "zAnnotationPoint",
2955
3516
  "zAxis",
2956
3517
  "zBackgroundColor",
3518
+ "zBarStyle",
2957
3519
  "zBaseConfig",
2958
3520
  "zChartType",
2959
3521
  "zColor",
@@ -2969,6 +3531,7 @@ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
2969
3531
  "zFoldInfo",
2970
3532
  "zLabel",
2971
3533
  "zLegend",
3534
+ "zMarkStyle",
2972
3535
  "zMeasure",
2973
3536
  "zMeasureGroup",
2974
3537
  "zMeasures",