@visactor/vseed 0.0.37 → 0.0.38

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 (64) hide show
  1. package/dist/builder/builder/builder.d.ts +6 -24
  2. package/dist/index.cjs +98 -57
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.js +98 -57
  5. package/dist/index.js.map +1 -1
  6. package/dist/pipeline/utils/constant.d.ts +2 -0
  7. package/dist/types/advancedVSeed.d.ts +2 -12
  8. package/dist/types/chartType/area/area.d.ts +11 -2
  9. package/dist/types/chartType/area/zArea.d.ts +0 -12
  10. package/dist/types/chartType/areaPercent/areaPercent.d.ts +4 -0
  11. package/dist/types/chartType/areaPercent/zAreaPercent.d.ts +0 -12
  12. package/dist/types/chartType/areaRange/areaRange.d.ts +4 -0
  13. package/dist/types/chartType/areaRange/zAreaRange.d.ts +0 -12
  14. package/dist/types/chartType/bar/bar.d.ts +4 -0
  15. package/dist/types/chartType/bar/zBar.d.ts +0 -12
  16. package/dist/types/chartType/barParallel/barParallel.d.ts +4 -0
  17. package/dist/types/chartType/barParallel/zBarParallel.d.ts +0 -12
  18. package/dist/types/chartType/barPercent/barPercent.d.ts +4 -0
  19. package/dist/types/chartType/barPercent/zBarPercent.d.ts +0 -12
  20. package/dist/types/chartType/column/column.d.ts +4 -0
  21. package/dist/types/chartType/column/zColumn.d.ts +0 -12
  22. package/dist/types/chartType/columnParallel/columnParallel.d.ts +4 -0
  23. package/dist/types/chartType/columnParallel/zColumnParallel.d.ts +0 -12
  24. package/dist/types/chartType/columnPercent/columnPercent.d.ts +4 -0
  25. package/dist/types/chartType/columnPercent/zColumnPercent.d.ts +0 -12
  26. package/dist/types/chartType/donut/donut.d.ts +4 -0
  27. package/dist/types/chartType/dualAxis/dualAxis.d.ts +9 -0
  28. package/dist/types/chartType/dualAxis/zDualAxis.d.ts +1 -12
  29. package/dist/types/chartType/funnel/funnel.d.ts +4 -0
  30. package/dist/types/chartType/heatmap/heatmap.d.ts +4 -0
  31. package/dist/types/chartType/line/line.d.ts +8 -2
  32. package/dist/types/chartType/line/zLine.d.ts +0 -12
  33. package/dist/types/chartType/pie/pie.d.ts +4 -0
  34. package/dist/types/chartType/pivotTable/pivotTable.d.ts +4 -0
  35. package/dist/types/chartType/radar/radar.d.ts +4 -0
  36. package/dist/types/chartType/rose/rose.d.ts +4 -0
  37. package/dist/types/chartType/roseParallel/roseParallel.d.ts +4 -0
  38. package/dist/types/chartType/scatter/scatter.d.ts +4 -0
  39. package/dist/types/chartType/scatter/zScatter.d.ts +0 -12
  40. package/dist/types/chartType/table/table.d.ts +4 -0
  41. package/dist/types/dataSelector/selector.d.ts +54 -0
  42. package/dist/types/properties/annotation/annotation.d.ts +0 -12
  43. package/dist/types/properties/annotation/annotationArea.d.ts +6 -21
  44. package/dist/types/properties/annotation/annotationHorizontalLine.d.ts +0 -14
  45. package/dist/types/properties/annotation/annotationVerticalLine.d.ts +0 -14
  46. package/dist/types/properties/annotation/zAnnotationArea.d.ts +0 -2
  47. package/dist/types/properties/annotation/zAnnotationHorizontalLine.d.ts +0 -2
  48. package/dist/types/properties/annotation/zAnnotationVerticalLine.d.ts +0 -2
  49. package/dist/types/properties/config/axes/axis.d.ts +0 -14
  50. package/dist/types/properties/config/color/color.d.ts +4 -6
  51. package/dist/types/properties/config/config.d.ts +2 -0
  52. package/dist/types/properties/config/crosshair/crosshair.d.ts +14 -17
  53. package/dist/types/properties/config/crosshair/index.d.ts +2 -1
  54. package/dist/types/properties/config/crosshair/zCrosshair.d.ts +15 -0
  55. package/dist/types/properties/config/legend/legend.d.ts +0 -4
  56. package/dist/types/properties/dimensions/dimensions.d.ts +6 -29
  57. package/dist/types/properties/dimensions/index.d.ts +2 -1
  58. package/dist/types/properties/dimensions/zDimensions.d.ts +30 -0
  59. package/dist/types/properties/measures/measures.d.ts +3 -0
  60. package/dist/types/properties/theme/customTheme.d.ts +2 -0
  61. package/dist/types/vseed.d.ts +1 -144
  62. package/dist/umd/index.js +98 -57
  63. package/dist/umd/index.js.map +1 -1
  64. package/package.json +1 -1
@@ -1370,6 +1370,7 @@ export declare class Builder implements VSeedBuilder {
1370
1370
  primary: "line" | "column" | "columnParallel" | "area" | "scatter";
1371
1371
  secondary: "line" | "column" | "columnParallel" | "area" | "scatter";
1372
1372
  }[] | null | undefined;
1373
+ alignTicks?: boolean | boolean[] | null | undefined;
1373
1374
  primaryYAxis?: {
1374
1375
  visible?: boolean | null | undefined;
1375
1376
  min?: number | null | undefined;
@@ -3230,6 +3231,7 @@ export declare class Builder implements VSeedBuilder {
3230
3231
  primary: "line" | "column" | "columnParallel" | "area" | "scatter";
3231
3232
  secondary: "line" | "column" | "columnParallel" | "area" | "scatter";
3232
3233
  }[] | null | undefined;
3234
+ alignTicks?: boolean | boolean[] | null | undefined;
3233
3235
  primaryYAxis?: {
3234
3236
  visible?: boolean | null | undefined;
3235
3237
  min?: number | null | undefined;
@@ -3673,8 +3675,6 @@ export declare class Builder implements VSeedBuilder {
3673
3675
  offsetX?: number | null | undefined;
3674
3676
  }[] | null | undefined;
3675
3677
  annotationVerticalLine?: {
3676
- offsetX: number;
3677
- offsetY: number;
3678
3678
  selector?: string | number | {
3679
3679
  field: string;
3680
3680
  value: string | number | (string | number)[];
@@ -3715,8 +3715,6 @@ export declare class Builder implements VSeedBuilder {
3715
3715
  lineWidth?: number | null | undefined;
3716
3716
  lineStyle?: "solid" | "dashed" | "dotted" | null | undefined;
3717
3717
  } | {
3718
- offsetX: number;
3719
- offsetY: number;
3720
3718
  selector?: string | number | {
3721
3719
  field: string;
3722
3720
  value: string | number | (string | number)[];
@@ -3758,8 +3756,6 @@ export declare class Builder implements VSeedBuilder {
3758
3756
  lineStyle?: "solid" | "dashed" | "dotted" | null | undefined;
3759
3757
  }[] | null | undefined;
3760
3758
  annotationHorizontalLine?: {
3761
- offsetX: number;
3762
- offsetY: number;
3763
3759
  selector?: string | number | {
3764
3760
  field: string;
3765
3761
  value: string | number | (string | number)[];
@@ -3800,8 +3796,6 @@ export declare class Builder implements VSeedBuilder {
3800
3796
  textBackgroundBorderWidth?: number | null | undefined;
3801
3797
  textBackgroundPadding?: number | null | undefined;
3802
3798
  } | {
3803
- offsetX: number;
3804
- offsetY: number;
3805
3799
  selector?: string | number | {
3806
3800
  field: string;
3807
3801
  value: string | number | (string | number)[];
@@ -3883,8 +3877,6 @@ export declare class Builder implements VSeedBuilder {
3883
3877
  areaBorderWidth?: number | null | undefined;
3884
3878
  areaBorderRadius?: number | null | undefined;
3885
3879
  outerPadding?: number | null | undefined;
3886
- offsetX?: number | null | undefined;
3887
- offsetY?: number | null | undefined;
3888
3880
  } | {
3889
3881
  selector: string | number | {
3890
3882
  field: string;
@@ -3926,8 +3918,6 @@ export declare class Builder implements VSeedBuilder {
3926
3918
  areaBorderWidth?: number | null | undefined;
3927
3919
  areaBorderRadius?: number | null | undefined;
3928
3920
  outerPadding?: number | null | undefined;
3929
- offsetX?: number | null | undefined;
3930
- offsetY?: number | null | undefined;
3931
3921
  }[] | null | undefined;
3932
3922
  };
3933
3923
  locale: "zh-CN" | "en-US";
@@ -5262,6 +5252,7 @@ export declare class Builder implements VSeedBuilder {
5262
5252
  primary: "line" | "column" | "columnParallel" | "area" | "scatter";
5263
5253
  secondary: "line" | "column" | "columnParallel" | "area" | "scatter";
5264
5254
  }[] | null | undefined;
5255
+ alignTicks?: boolean | boolean[] | null | undefined;
5265
5256
  primaryYAxis?: {
5266
5257
  visible?: boolean | null | undefined;
5267
5258
  min?: number | null | undefined;
@@ -7122,6 +7113,7 @@ export declare class Builder implements VSeedBuilder {
7122
7113
  primary: "line" | "column" | "columnParallel" | "area" | "scatter";
7123
7114
  secondary: "line" | "column" | "columnParallel" | "area" | "scatter";
7124
7115
  }[] | null | undefined;
7116
+ alignTicks?: boolean | boolean[] | null | undefined;
7125
7117
  primaryYAxis?: {
7126
7118
  visible?: boolean | null | undefined;
7127
7119
  min?: number | null | undefined;
@@ -7565,8 +7557,6 @@ export declare class Builder implements VSeedBuilder {
7565
7557
  offsetX?: number | null | undefined;
7566
7558
  }[] | null | undefined;
7567
7559
  annotationVerticalLine?: {
7568
- offsetX: number;
7569
- offsetY: number;
7570
7560
  selector?: string | number | {
7571
7561
  field: string;
7572
7562
  value: string | number | (string | number)[];
@@ -7607,8 +7597,6 @@ export declare class Builder implements VSeedBuilder {
7607
7597
  lineWidth?: number | null | undefined;
7608
7598
  lineStyle?: "solid" | "dashed" | "dotted" | null | undefined;
7609
7599
  } | {
7610
- offsetX: number;
7611
- offsetY: number;
7612
7600
  selector?: string | number | {
7613
7601
  field: string;
7614
7602
  value: string | number | (string | number)[];
@@ -7650,8 +7638,6 @@ export declare class Builder implements VSeedBuilder {
7650
7638
  lineStyle?: "solid" | "dashed" | "dotted" | null | undefined;
7651
7639
  }[] | null | undefined;
7652
7640
  annotationHorizontalLine?: {
7653
- offsetX: number;
7654
- offsetY: number;
7655
7641
  selector?: string | number | {
7656
7642
  field: string;
7657
7643
  value: string | number | (string | number)[];
@@ -7692,8 +7678,6 @@ export declare class Builder implements VSeedBuilder {
7692
7678
  textBackgroundBorderWidth?: number | null | undefined;
7693
7679
  textBackgroundPadding?: number | null | undefined;
7694
7680
  } | {
7695
- offsetX: number;
7696
- offsetY: number;
7697
7681
  selector?: string | number | {
7698
7682
  field: string;
7699
7683
  value: string | number | (string | number)[];
@@ -7775,8 +7759,6 @@ export declare class Builder implements VSeedBuilder {
7775
7759
  areaBorderWidth?: number | null | undefined;
7776
7760
  areaBorderRadius?: number | null | undefined;
7777
7761
  outerPadding?: number | null | undefined;
7778
- offsetX?: number | null | undefined;
7779
- offsetY?: number | null | undefined;
7780
7762
  } | {
7781
7763
  selector: string | number | {
7782
7764
  field: string;
@@ -7818,8 +7800,6 @@ export declare class Builder implements VSeedBuilder {
7818
7800
  areaBorderWidth?: number | null | undefined;
7819
7801
  areaBorderRadius?: number | null | undefined;
7820
7802
  outerPadding?: number | null | undefined;
7821
- offsetX?: number | null | undefined;
7822
- offsetY?: number | null | undefined;
7823
7803
  }[] | null | undefined;
7824
7804
  };
7825
7805
  locale: "zh-CN" | "en-US";
@@ -9131,6 +9111,7 @@ export declare class Builder implements VSeedBuilder {
9131
9111
  primary: "line" | "column" | "columnParallel" | "area" | "scatter";
9132
9112
  secondary: "line" | "column" | "columnParallel" | "area" | "scatter";
9133
9113
  }[] | null | undefined;
9114
+ alignTicks?: boolean | boolean[] | null | undefined;
9134
9115
  primaryYAxis?: {
9135
9116
  visible?: boolean | null | undefined;
9136
9117
  min?: number | null | undefined;
@@ -10773,6 +10754,7 @@ export declare class Builder implements VSeedBuilder {
10773
10754
  primary: "line" | "column" | "columnParallel" | "area" | "scatter";
10774
10755
  secondary: "line" | "column" | "columnParallel" | "area" | "scatter";
10775
10756
  }[] | null | undefined;
10757
+ alignTicks?: boolean | boolean[] | null | undefined;
10776
10758
  primaryYAxis?: {
10777
10759
  visible?: boolean | null | undefined;
10778
10760
  min?: number | null | undefined;
package/dist/index.cjs CHANGED
@@ -1085,6 +1085,9 @@ const initPivotTable = (spec, context)=>{
1085
1085
  tooltip: {
1086
1086
  isShowOverflowTextTooltip: true
1087
1087
  },
1088
+ corner: {
1089
+ titleOnDimension: 'all'
1090
+ },
1088
1091
  widthAdaptiveMode: 'all',
1089
1092
  animationAppear: {
1090
1093
  duration: 300,
@@ -1947,22 +1950,44 @@ const color_color = (spec, context)=>{
1947
1950
  const colorIdMap = unfoldInfo.colorIdMap;
1948
1951
  const { color } = baseConfig;
1949
1952
  const { colorScheme, colorMapping } = color;
1950
- const mappingList = [];
1951
- if (colorMapping) Object.entries(colorMapping).sort((a, b)=>a[0].split(Separator).length - b[0].split(Separator).length).forEach(([key, value])=>{
1952
- const idMap = Object.entries(colorIdMap).filter(([_, v])=>v.includes(key));
1953
- for (const [colorId] of idMap)mappingList.push([
1954
- colorId,
1955
- value
1956
- ]);
1957
- });
1958
1953
  result.color = {
1959
1954
  type: 'ordinal',
1960
1955
  domain: colorItems,
1961
1956
  range: colorScheme,
1962
- specified: Object.fromEntries(mappingList)
1957
+ specified: createSpecifiedForColorMapping(colorMapping, colorIdMap, colorItems)
1963
1958
  };
1964
1959
  return result;
1965
1960
  };
1961
+ const createSpecifiedForColorMapping = (colorMapping, colorIdMap, colorItems)=>{
1962
+ if (!colorMapping || !colorIdMap || !colorItems) return;
1963
+ const matchedList = [];
1964
+ const colors = Object.entries(colorMapping).sort((a, b)=>b[0].length - a[0].length);
1965
+ const accurateMap = colors.reduce((prev, cur)=>{
1966
+ const name = cur[0];
1967
+ const colorValue = cur[1];
1968
+ const accurateMatchedList = Object.entries(colorIdMap).filter(([colorKey, colorAlias])=>colorKey === name || colorAlias === name);
1969
+ accurateMatchedList.forEach((item)=>{
1970
+ prev[item[0]] = colorValue;
1971
+ matchedList.push(name);
1972
+ });
1973
+ return prev;
1974
+ }, {});
1975
+ const fuzzyMap = colors.reduce((prev, cur)=>{
1976
+ const name = cur[0];
1977
+ const colorValue = cur[1];
1978
+ if (matchedList.includes(name)) return prev;
1979
+ const fuzzyMatchedList = Object.entries(colorIdMap).filter(([colorKey, colorAlias])=>colorKey.includes(name) || colorAlias.includes(name));
1980
+ fuzzyMatchedList.forEach((item)=>{
1981
+ if (prev[item[0]]) return;
1982
+ prev[item[0]] = colorValue;
1983
+ });
1984
+ return prev;
1985
+ }, {});
1986
+ return {
1987
+ ...fuzzyMap,
1988
+ ...accurateMap
1989
+ };
1990
+ };
1966
1991
  const background_backgroundColor = (spec, context)=>{
1967
1992
  const result = {
1968
1993
  ...spec
@@ -2129,6 +2154,8 @@ const xBand = (spec, context)=>{
2129
2154
  };
2130
2155
  const ANNOTATION_Z_INDEX = 1000;
2131
2156
  const LINEAR_AXIS_INNER_OFFSET_TOP = 7;
2157
+ const DUAL_AXIS_CHART_COLUMN_Z_INDEX = 1000;
2158
+ const DUAL_AXIS_CHART_NON_COLUMN_Z_INDEX = 1001;
2132
2159
  const yLinear = (spec, context)=>{
2133
2160
  const result = {
2134
2161
  ...spec
@@ -2622,7 +2649,12 @@ const pointStateDimensionHover = (spec)=>{
2622
2649
  ...point.state || {},
2623
2650
  dimension_hover: {
2624
2651
  scaleX: 1.4,
2625
- scaleY: 1.4
2652
+ scaleY: 1.4,
2653
+ outerBorder: {
2654
+ lineWidth: 4,
2655
+ strokeOpacity: 0.25,
2656
+ distance: 2
2657
+ }
2626
2658
  }
2627
2659
  }
2628
2660
  }
@@ -2797,13 +2829,11 @@ const annotationVerticalLine_annotationVerticalLine = (spec, context)=>{
2797
2829
  insideEnd: 'insideEndTop'
2798
2830
  };
2799
2831
  const markLine = annotationVerticalLineList.flatMap((annotationVerticalLine)=>{
2800
- const { selector: selectorPoint, xValue, text = '', textPosition = 'insideEnd', textColor = '#ffffff', textFontSize = 12, textFontWeight = 400, textAlign = 'right', textBaseline = 'top', textBackgroundVisible = true, textBackgroundBorderColor = '#212121', textBackgroundColor = '#212121', textBackgroundBorderRadius = 4, textBackgroundBorderWidth = 1, textBackgroundPadding = 2, lineVisible = true, lineColor = '#212121', lineWidth = 1, lineStyle = 'dashed', offsetX = 0, offsetY = 0 } = annotationVerticalLine;
2832
+ const { selector: selectorPoint, xValue, text = '', textPosition = 'insideEnd', textColor = '#ffffff', textFontSize = 12, textFontWeight = 400, textAlign = 'right', textBaseline = 'top', textBackgroundVisible = true, textBackgroundBorderColor = '#212121', textBackgroundColor = '#212121', textBackgroundBorderRadius = 4, textBackgroundBorderWidth = 1, textBackgroundPadding = 2, lineVisible = true, lineColor = '#212121', lineWidth = 1, lineStyle = 'dashed' } = annotationVerticalLine;
2801
2833
  const dataset = advancedVSeed.dataset.flat();
2802
2834
  const generateOneMarkLine = (x)=>({
2803
2835
  x: x,
2804
2836
  zIndex: ANNOTATION_Z_INDEX,
2805
- offsetX,
2806
- offsetY,
2807
2837
  line: {
2808
2838
  style: {
2809
2839
  visible: lineVisible,
@@ -2896,12 +2926,10 @@ const annotationHorizontalLine_annotationHorizontalLine = (spec, context)=>{
2896
2926
  insideEnd: 'insideEndTop'
2897
2927
  };
2898
2928
  const markLine = annotationVerticalLineList.flatMap((annotationVerticalLine)=>{
2899
- const { selector: selectorPoint, yValue, text = '', textPosition = 'insideEnd', textColor = '#ffffff', textFontSize = 12, textFontWeight = 400, textAlign = 'right', textBaseline = 'top', lineColor = '#212121', lineStyle = 'dashed', lineVisible = true, lineWidth = 1, textBackgroundVisible = true, textBackgroundColor = '#212121', textBackgroundBorderColor = '#212121', textBackgroundBorderRadius = 4, textBackgroundBorderWidth = 1, textBackgroundPadding = 2, offsetX = 0, offsetY = 0 } = annotationVerticalLine;
2929
+ const { selector: selectorPoint, yValue, text = '', textPosition = 'insideEnd', textColor = '#ffffff', textFontSize = 12, textFontWeight = 400, textAlign = 'right', textBaseline = 'top', lineColor = '#212121', lineStyle = 'dashed', lineVisible = true, lineWidth = 1, textBackgroundVisible = true, textBackgroundColor = '#212121', textBackgroundBorderColor = '#212121', textBackgroundBorderRadius = 4, textBackgroundBorderWidth = 1, textBackgroundPadding = 2 } = annotationVerticalLine;
2900
2930
  const dataset = advancedVSeed.dataset.flat();
2901
2931
  const generateOneMarkLine = (y)=>({
2902
2932
  y,
2903
- offsetX,
2904
- offsetY,
2905
2933
  zIndex: ANNOTATION_Z_INDEX,
2906
2934
  line: {
2907
2935
  style: {
@@ -2997,7 +3025,7 @@ const annotationArea_annotationArea = (spec, context)=>{
2997
3025
  right: 'insideRight'
2998
3026
  };
2999
3027
  const markArea = annotationAreaList.flatMap((annotationArea)=>{
3000
- const { selector: selectorPoint, text = '', textPosition = 'top', textColor = '#ffffff', textFontSize = 12, textFontWeight = 400, textAlign = 'center', textBaseline = 'top', textBackgroundVisible = true, textBackgroundColor = '#191d24', textBackgroundBorderColor = '#191d24', textBackgroundBorderWidth = 1, textBackgroundBorderRadius = 4, textBackgroundPadding = 4, areaColor = '#888888', areaColorOpacity = 0.15, areaBorderColor = '#888888', areaBorderRadius = 4, areaBorderWidth = 1, outerPadding = 4, offsetX = 0, offsetY = 0 } = annotationArea;
3028
+ const { selector: selectorPoint, text = '', textPosition = 'top', textColor = '#ffffff', textFontSize = 12, textFontWeight = 400, textAlign = 'center', textBaseline = 'top', textBackgroundVisible = true, textBackgroundColor = '#191d24', textBackgroundBorderColor = '#191d24', textBackgroundBorderWidth = 1, textBackgroundBorderRadius = 4, textBackgroundPadding = 4, areaColor = '#888888', areaColorOpacity = 0.15, areaBorderColor = '#888888', areaBorderRadius = 4, areaBorderWidth = 1, outerPadding = 4 } = annotationArea;
3001
3029
  const dataset = advancedVSeed.dataset.flat();
3002
3030
  const selectedData = selectorPoint ? dataset.filter((datum)=>selector_selector(datum, selectorPoint)) : [];
3003
3031
  const labelPosition = positionMap[textPosition || 'top'];
@@ -3005,8 +3033,6 @@ const annotationArea_annotationArea = (spec, context)=>{
3005
3033
  return {
3006
3034
  zIndex: ANNOTATION_Z_INDEX,
3007
3035
  regionRelative: true,
3008
- offsetX,
3009
- offsetY,
3010
3036
  positions: (data, context)=>{
3011
3037
  const positionData = data.filter((item)=>selectedData.some((datum)=>isSubset(datum, item)));
3012
3038
  const xyList = positionData.map((datum)=>context.dataToPosition(datum));
@@ -3426,11 +3452,11 @@ const pivotDiscreteLegend = (spec, context)=>{
3426
3452
  label: d,
3427
3453
  shape: {
3428
3454
  outerBorder: border ? {
3429
- stroke: colorScheme?.[index],
3455
+ stroke: colorScheme?.[index % colorScheme.length],
3430
3456
  distance: 3,
3431
3457
  lineWidth: 1
3432
3458
  } : void 0,
3433
- fill: colorScheme?.[index]
3459
+ fill: colorScheme?.[index % colorScheme.length]
3434
3460
  }
3435
3461
  })),
3436
3462
  item: {
@@ -3843,14 +3869,12 @@ const annotationAreaBand = (spec, context)=>{
3843
3869
  right: 'insideRight'
3844
3870
  };
3845
3871
  const markArea = annotationAreaList.flatMap((annotationArea)=>{
3846
- const { selector: selectorPoint, text = '', textPosition = 'top', textColor = '#ffffff', textFontSize = 12, textFontWeight = 400, textAlign = 'center', textBaseline = 'top', textBackgroundVisible = true, textBackgroundColor = '#191d24', textBackgroundBorderColor = '#191d24', textBackgroundBorderWidth = 1, textBackgroundBorderRadius = 4, textBackgroundPadding = 4, areaColor = '#888888', areaColorOpacity = 0.15, areaBorderColor = '#888888', areaBorderRadius = 4, areaBorderWidth = 1, outerPadding = 4, offsetX = 0, offsetY = 0 } = annotationArea;
3872
+ const { selector: selectorPoint, text = '', textPosition = 'top', textColor = '#ffffff', textFontSize = 12, textFontWeight = 400, textAlign = 'center', textBaseline = 'top', textBackgroundVisible = true, textBackgroundColor = '#191d24', textBackgroundBorderColor = '#191d24', textBackgroundBorderWidth = 1, textBackgroundBorderRadius = 4, textBackgroundPadding = 4, areaColor = '#888888', areaColorOpacity = 0.15, areaBorderColor = '#888888', areaBorderRadius = 4, areaBorderWidth = 1, outerPadding = 4 } = annotationArea;
3847
3873
  const dataset = advancedVSeed.dataset.flat();
3848
3874
  const selectedData = selectorPoint ? dataset.filter((datum)=>selector_selector(datum, selectorPoint)) : [];
3849
3875
  return {
3850
3876
  zIndex: ANNOTATION_Z_INDEX,
3851
3877
  regionRelative: true,
3852
- offsetX,
3853
- offsetY,
3854
3878
  positions: (data, context)=>{
3855
3879
  const positionData = data.filter((item)=>selectedData.some((datum)=>isSubset(datum, item)));
3856
3880
  const xyList = positionData.map((datum)=>context.dataToPosition(datum));
@@ -5925,6 +5949,7 @@ const dualAxisConfig = (advancedVSeed, context)=>{
5925
5949
  'legend',
5926
5950
  'tooltip',
5927
5951
  'dualChartType',
5952
+ 'alignTicks',
5928
5953
  'primaryYAxis',
5929
5954
  'secondaryYAxis',
5930
5955
  'crosshairLine'
@@ -6077,7 +6102,8 @@ const initDualAxisSecondary = (spec, context)=>{
6077
6102
  };
6078
6103
  const dualChartTypePrimary = (spec, context)=>{
6079
6104
  const result = {
6080
- ...spec
6105
+ ...spec,
6106
+ zIndex: DUAL_AXIS_CHART_NON_COLUMN_Z_INDEX
6081
6107
  };
6082
6108
  const { advancedVSeed, vseed } = context;
6083
6109
  const { chartType } = vseed;
@@ -6088,12 +6114,16 @@ const dualChartTypePrimary = (spec, context)=>{
6088
6114
  secondary: 'line'
6089
6115
  };
6090
6116
  const primary = Array.isArray(config) ? config[index].primary || config[0].primary : config.primary;
6091
- switch(primary){
6117
+ const secondary = Array.isArray(config) ? config[index].secondary || config[0].secondary : config.secondary;
6118
+ const bothColumn = 'column' === primary && 'column' === secondary;
6119
+ const type = bothColumn ? 'columnParallel' : primary;
6120
+ switch(type){
6092
6121
  case 'line':
6093
6122
  result.type = 'line';
6094
6123
  break;
6095
6124
  case 'column':
6096
6125
  result.type = 'bar';
6126
+ result.zIndex = DUAL_AXIS_CHART_COLUMN_Z_INDEX;
6097
6127
  break;
6098
6128
  case 'columnParallel':
6099
6129
  {
@@ -6104,6 +6134,7 @@ const dualChartTypePrimary = (spec, context)=>{
6104
6134
  datasetReshapeInfo[0].unfoldInfo.groupId
6105
6135
  ];
6106
6136
  columnSpec.type = 'bar';
6137
+ result.zIndex = DUAL_AXIS_CHART_COLUMN_Z_INDEX;
6107
6138
  break;
6108
6139
  }
6109
6140
  case 'columnPercent':
@@ -6127,7 +6158,8 @@ const dualChartTypePrimary = (spec, context)=>{
6127
6158
  };
6128
6159
  const dualChartTypeSecondary = (spec, context)=>{
6129
6160
  const result = {
6130
- ...spec
6161
+ ...spec,
6162
+ zIndex: DUAL_AXIS_CHART_NON_COLUMN_Z_INDEX
6131
6163
  };
6132
6164
  const { advancedVSeed, vseed } = context;
6133
6165
  const { chartType } = vseed;
@@ -6137,13 +6169,17 @@ const dualChartTypeSecondary = (spec, context)=>{
6137
6169
  secondary: 'line'
6138
6170
  };
6139
6171
  const index = datasetReshapeInfo[0].index;
6172
+ const primary = Array.isArray(config) ? config[index].primary || config[0].primary : config.primary;
6140
6173
  const secondary = Array.isArray(config) ? config[index].secondary || config[0].secondary : config.secondary;
6141
- switch(secondary){
6174
+ const bothColumn = 'column' === primary && 'column' === secondary;
6175
+ const type = bothColumn ? 'columnParallel' : secondary;
6176
+ switch(type){
6142
6177
  case 'line':
6143
6178
  result.type = 'line';
6144
6179
  break;
6145
6180
  case 'column':
6146
6181
  result.type = 'bar';
6182
+ result.zIndex = DUAL_AXIS_CHART_COLUMN_Z_INDEX;
6147
6183
  break;
6148
6184
  case 'columnParallel':
6149
6185
  {
@@ -6154,6 +6190,7 @@ const dualChartTypeSecondary = (spec, context)=>{
6154
6190
  datasetReshapeInfo[0].unfoldInfo.groupId
6155
6191
  ];
6156
6192
  columnSpec.type = 'bar';
6193
+ result.zIndex = DUAL_AXIS_CHART_COLUMN_Z_INDEX;
6157
6194
  break;
6158
6195
  }
6159
6196
  case 'columnPercent':
@@ -6492,12 +6529,18 @@ const yLinearPrimary = (spec, context)=>{
6492
6529
  const { locale, datasetReshapeInfo } = advancedVSeed;
6493
6530
  const index = datasetReshapeInfo[0].index;
6494
6531
  const primaryYAxis = advancedVSeed.config?.[chartType]?.primaryYAxis;
6495
- const config = Array.isArray(primaryYAxis) ? primaryYAxis[index] || primaryYAxis[0] : primaryYAxis;
6532
+ const yAxisConfig = Array.isArray(primaryYAxis) ? primaryYAxis[index] || primaryYAxis[0] : primaryYAxis;
6533
+ const alignTicks = advancedVSeed.config?.[chartType]?.alignTicks;
6534
+ const alignTicksConfig = Array.isArray(alignTicks) ? alignTicks[index] || alignTicks[0] : alignTicks;
6496
6535
  if (datasetReshapeInfo[0].foldInfoList?.[0] && (0, external_remeda_namespaceObject.isEmpty)(datasetReshapeInfo[0].foldInfoList[0].foldMap)) return result;
6497
6536
  const id = `${datasetReshapeInfo[0].id}-primary-axis`;
6498
- const seriesId = `${datasetReshapeInfo[0].id}-primary-series`;
6537
+ const seriesIds = [
6538
+ `${datasetReshapeInfo[0].id}-primary-series`,
6539
+ `${datasetReshapeInfo[0].id}-secondary-series`
6540
+ ];
6541
+ const seriesId = alignTicksConfig ? seriesIds : seriesIds[0];
6499
6542
  if (!result.axes) result.axes = [];
6500
- if (!config) {
6543
+ if (!yAxisConfig) {
6501
6544
  result.axes = [
6502
6545
  ...result.axes,
6503
6546
  {
@@ -6505,26 +6548,16 @@ const yLinearPrimary = (spec, context)=>{
6505
6548
  id,
6506
6549
  seriesId,
6507
6550
  type: 'linear',
6508
- orient: 'left',
6509
- sync: {
6510
- axisId: `${datasetReshapeInfo[0].id}-secondary-axis`,
6511
- tickAlign: false,
6512
- zeroAlign: true
6513
- }
6551
+ orient: 'left'
6514
6552
  }
6515
6553
  ];
6516
6554
  return result;
6517
6555
  }
6518
- const { visible = true, label, tick, title, grid, line, zero, nice, inverse, max, min, log, logBase = 10 } = config;
6556
+ const { visible = true, label, tick, title, grid, line, zero, nice, inverse, max, min, log, logBase = 10 } = yAxisConfig;
6519
6557
  const linearAxis = {
6520
6558
  visible,
6521
6559
  id,
6522
6560
  seriesId,
6523
- sync: {
6524
- axisId: `${datasetReshapeInfo[0].id}-secondary-axis`,
6525
- tickAlign: false,
6526
- zeroAlign: true
6527
- },
6528
6561
  type: log ? 'log' : 'linear',
6529
6562
  base: logBase,
6530
6563
  orient: 'left',
@@ -6593,12 +6626,22 @@ const yLinearSecondary = (spec, context)=>{
6593
6626
  const { locale, datasetReshapeInfo } = advancedVSeed;
6594
6627
  const index = datasetReshapeInfo[0].index;
6595
6628
  const secondaryYAxis = advancedVSeed.config?.[chartType]?.secondaryYAxis;
6596
- const config = Array.isArray(secondaryYAxis) ? secondaryYAxis[index] || secondaryYAxis[0] : secondaryYAxis;
6629
+ const yAxisConfig = Array.isArray(secondaryYAxis) ? secondaryYAxis[index] || secondaryYAxis[0] : secondaryYAxis;
6630
+ const alignTicks = advancedVSeed.config?.[chartType]?.alignTicks;
6631
+ const alignTicksConfig = Array.isArray(alignTicks) ? alignTicks[index] || alignTicks[0] : alignTicks;
6597
6632
  if ((0, external_remeda_namespaceObject.isNullish)(datasetReshapeInfo[0].foldInfoList?.[1])) return result;
6633
+ const sync = {
6634
+ axisId: `${datasetReshapeInfo[0].id}-primary-axis`,
6635
+ zeroAlign: true
6636
+ };
6598
6637
  const id = `${datasetReshapeInfo[0].id}-secondary-axis`;
6599
- const seriesId = `${datasetReshapeInfo[0].id}-secondary-series`;
6638
+ const seriesIds = [
6639
+ `${datasetReshapeInfo[0].id}-primary-series`,
6640
+ `${datasetReshapeInfo[0].id}-secondary-series`
6641
+ ];
6642
+ const seriesId = alignTicksConfig ? seriesIds : seriesIds[1];
6600
6643
  if (!result.axes) result.axes = [];
6601
- if (!config) {
6644
+ if (!yAxisConfig) {
6602
6645
  result.axes = [
6603
6646
  ...result.axes,
6604
6647
  {
@@ -6606,16 +6649,18 @@ const yLinearSecondary = (spec, context)=>{
6606
6649
  id,
6607
6650
  seriesId,
6608
6651
  type: 'linear',
6609
- orient: 'right'
6652
+ orient: 'right',
6653
+ sync
6610
6654
  }
6611
6655
  ];
6612
6656
  return result;
6613
6657
  }
6614
- const { visible = true, label, tick, title, grid, line, zero, nice, inverse, max, min, log, logBase = 10 } = config;
6658
+ const { visible = true, label, tick, title, grid, line, zero, nice, inverse, max, min, log, logBase = 10 } = yAxisConfig;
6615
6659
  const linearAxis = {
6616
6660
  visible,
6617
6661
  id,
6618
6662
  seriesId,
6663
+ sync,
6619
6664
  type: log ? 'log' : 'linear',
6620
6665
  base: logBase,
6621
6666
  orient: 'right',
@@ -9083,6 +9128,7 @@ const zDualAxisConfig = external_zod_namespaceObject.z.object({
9083
9128
  tooltip: zTooltip.nullish(),
9084
9129
  legend: zLegend.nullish(),
9085
9130
  dualChartType: external_zod_namespaceObject.z.array(zDualChartType).or(zDualChartType).nullish(),
9131
+ alignTicks: external_zod_namespaceObject.z.array(external_zod_namespaceObject.z.boolean()).or(external_zod_namespaceObject.z.boolean()).nullish(),
9086
9132
  primaryYAxis: external_zod_namespaceObject.z.array(zYLinearAxis).or(zYLinearAxis).nullish(),
9087
9133
  secondaryYAxis: external_zod_namespaceObject.z.array(zYLinearAxis).or(zYLinearAxis).nullish(),
9088
9134
  xAxis: zXBandAxis.nullish(),
@@ -9394,9 +9440,7 @@ const zAnnotationVerticalLine = external_zod_namespaceObject.z.object({
9394
9440
  external_zod_namespaceObject.z.literal('solid'),
9395
9441
  external_zod_namespaceObject.z.literal('dashed'),
9396
9442
  external_zod_namespaceObject.z.literal('dotted')
9397
- ]).default('dashed').nullish(),
9398
- offsetX: external_zod_namespaceObject.z.number().default(0),
9399
- offsetY: external_zod_namespaceObject.z.number().default(0)
9443
+ ]).default('dashed').nullish()
9400
9444
  });
9401
9445
  const zAnnotationHorizontalLine = external_zod_namespaceObject.z.object({
9402
9446
  selector: external_zod_namespaceObject.z.union([
@@ -9446,9 +9490,7 @@ const zAnnotationHorizontalLine = external_zod_namespaceObject.z.object({
9446
9490
  textBackgroundBorderColor: external_zod_namespaceObject.z.string().default('#212121').nullish(),
9447
9491
  textBackgroundBorderRadius: external_zod_namespaceObject.z.number().default(4).nullish(),
9448
9492
  textBackgroundBorderWidth: external_zod_namespaceObject.z.number().default(1).nullish(),
9449
- textBackgroundPadding: external_zod_namespaceObject.z.number().default(2).nullish(),
9450
- offsetX: external_zod_namespaceObject.z.number().default(0),
9451
- offsetY: external_zod_namespaceObject.z.number().default(0)
9493
+ textBackgroundPadding: external_zod_namespaceObject.z.number().default(2).nullish()
9452
9494
  });
9453
9495
  const zAnnotationArea = external_zod_namespaceObject.z.object({
9454
9496
  selector: external_zod_namespaceObject.z.union([
@@ -9490,9 +9532,7 @@ const zAnnotationArea = external_zod_namespaceObject.z.object({
9490
9532
  areaBorderColor: external_zod_namespaceObject.z.string().default('#888888').nullish(),
9491
9533
  areaBorderWidth: external_zod_namespaceObject.z.number().default(1).nullish(),
9492
9534
  areaBorderRadius: external_zod_namespaceObject.z.number().default(4).nullish(),
9493
- outerPadding: external_zod_namespaceObject.z.number().default(4).nullish(),
9494
- offsetX: external_zod_namespaceObject.z.number().default(0).nullish(),
9495
- offsetY: external_zod_namespaceObject.z.number().default(0).nullish()
9535
+ outerPadding: external_zod_namespaceObject.z.number().default(4).nullish()
9496
9536
  });
9497
9537
  const zAnnotation = external_zod_namespaceObject.z.object({
9498
9538
  annotationPoint: zAnnotationPoint.or(external_zod_namespaceObject.z.array(zAnnotationPoint)).nullish(),
@@ -9817,6 +9857,7 @@ const zDualAxis = external_zod_namespaceObject.z.object({
9817
9857
  measures: zMeasureTree.nullish(),
9818
9858
  dualMeasures: zDualMeasures.nullish(),
9819
9859
  dualChartType: external_zod_namespaceObject.z.array(zDualChartType).or(zDualChartType).nullish(),
9860
+ alignTicks: external_zod_namespaceObject.z.array(external_zod_namespaceObject.z.boolean()).or(external_zod_namespaceObject.z.boolean()).nullish(),
9820
9861
  primaryYAxis: external_zod_namespaceObject.z.array(zYLinearAxis).or(zYLinearAxis).nullish(),
9821
9862
  secondaryYAxis: external_zod_namespaceObject.z.array(zYLinearAxis).or(zYLinearAxis).nullish(),
9822
9863
  xAxis: zXBandAxis.nullish(),