@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
package/dist/umd/index.js CHANGED
@@ -1259,6 +1259,9 @@
1259
1259
  tooltip: {
1260
1260
  isShowOverflowTextTooltip: true
1261
1261
  },
1262
+ corner: {
1263
+ titleOnDimension: 'all'
1264
+ },
1262
1265
  widthAdaptiveMode: 'all',
1263
1266
  animationAppear: {
1264
1267
  duration: 300,
@@ -2151,22 +2154,44 @@
2151
2154
  const colorIdMap = unfoldInfo.colorIdMap;
2152
2155
  const { color } = baseConfig;
2153
2156
  const { colorScheme, colorMapping } = color;
2154
- const mappingList = [];
2155
- if (colorMapping) Object.entries(colorMapping).sort((a, b)=>a[0].split(Separator).length - b[0].split(Separator).length).forEach(([key, value])=>{
2156
- const idMap = Object.entries(colorIdMap).filter(([_, v])=>v.includes(key));
2157
- for (const [colorId] of idMap)mappingList.push([
2158
- colorId,
2159
- value
2160
- ]);
2161
- });
2162
2157
  result.color = {
2163
2158
  type: 'ordinal',
2164
2159
  domain: colorItems,
2165
2160
  range: colorScheme,
2166
- specified: Object.fromEntries(mappingList)
2161
+ specified: createSpecifiedForColorMapping(colorMapping, colorIdMap, colorItems)
2167
2162
  };
2168
2163
  return result;
2169
2164
  };
2165
+ const createSpecifiedForColorMapping = (colorMapping, colorIdMap, colorItems)=>{
2166
+ if (!colorMapping || !colorIdMap || !colorItems) return;
2167
+ const matchedList = [];
2168
+ const colors = Object.entries(colorMapping).sort((a, b)=>b[0].length - a[0].length);
2169
+ const accurateMap = colors.reduce((prev, cur)=>{
2170
+ const name = cur[0];
2171
+ const colorValue = cur[1];
2172
+ const accurateMatchedList = Object.entries(colorIdMap).filter(([colorKey, colorAlias])=>colorKey === name || colorAlias === name);
2173
+ accurateMatchedList.forEach((item)=>{
2174
+ prev[item[0]] = colorValue;
2175
+ matchedList.push(name);
2176
+ });
2177
+ return prev;
2178
+ }, {});
2179
+ const fuzzyMap = colors.reduce((prev, cur)=>{
2180
+ const name = cur[0];
2181
+ const colorValue = cur[1];
2182
+ if (matchedList.includes(name)) return prev;
2183
+ const fuzzyMatchedList = Object.entries(colorIdMap).filter(([colorKey, colorAlias])=>colorKey.includes(name) || colorAlias.includes(name));
2184
+ fuzzyMatchedList.forEach((item)=>{
2185
+ if (prev[item[0]]) return;
2186
+ prev[item[0]] = colorValue;
2187
+ });
2188
+ return prev;
2189
+ }, {});
2190
+ return {
2191
+ ...fuzzyMap,
2192
+ ...accurateMap
2193
+ };
2194
+ };
2170
2195
  const background_backgroundColor = (spec, context)=>{
2171
2196
  const result = {
2172
2197
  ...spec
@@ -2333,6 +2358,8 @@
2333
2358
  };
2334
2359
  const ANNOTATION_Z_INDEX = 1000;
2335
2360
  const LINEAR_AXIS_INNER_OFFSET_TOP = 7;
2361
+ const DUAL_AXIS_CHART_COLUMN_Z_INDEX = 1000;
2362
+ const DUAL_AXIS_CHART_NON_COLUMN_Z_INDEX = 1001;
2336
2363
  const yLinear = (spec, context)=>{
2337
2364
  const result = {
2338
2365
  ...spec
@@ -2826,7 +2853,12 @@
2826
2853
  ...point.state || {},
2827
2854
  dimension_hover: {
2828
2855
  scaleX: 1.4,
2829
- scaleY: 1.4
2856
+ scaleY: 1.4,
2857
+ outerBorder: {
2858
+ lineWidth: 4,
2859
+ strokeOpacity: 0.25,
2860
+ distance: 2
2861
+ }
2830
2862
  }
2831
2863
  }
2832
2864
  }
@@ -3020,13 +3052,11 @@
3020
3052
  insideEnd: 'insideEndTop'
3021
3053
  };
3022
3054
  const markLine = annotationVerticalLineList.flatMap((annotationVerticalLine)=>{
3023
- 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;
3055
+ 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;
3024
3056
  const dataset = advancedVSeed.dataset.flat();
3025
3057
  const generateOneMarkLine = (x)=>({
3026
3058
  x: x,
3027
3059
  zIndex: ANNOTATION_Z_INDEX,
3028
- offsetX,
3029
- offsetY,
3030
3060
  line: {
3031
3061
  style: {
3032
3062
  visible: lineVisible,
@@ -3119,12 +3149,10 @@
3119
3149
  insideEnd: 'insideEndTop'
3120
3150
  };
3121
3151
  const markLine = annotationVerticalLineList.flatMap((annotationVerticalLine)=>{
3122
- 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;
3152
+ 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;
3123
3153
  const dataset = advancedVSeed.dataset.flat();
3124
3154
  const generateOneMarkLine = (y)=>({
3125
3155
  y,
3126
- offsetX,
3127
- offsetY,
3128
3156
  zIndex: ANNOTATION_Z_INDEX,
3129
3157
  line: {
3130
3158
  style: {
@@ -3220,7 +3248,7 @@
3220
3248
  right: 'insideRight'
3221
3249
  };
3222
3250
  const markArea = annotationAreaList.flatMap((annotationArea)=>{
3223
- 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;
3251
+ 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;
3224
3252
  const dataset = advancedVSeed.dataset.flat();
3225
3253
  const selectedData = selectorPoint ? dataset.filter((datum)=>selector_selector(datum, selectorPoint)) : [];
3226
3254
  const labelPosition = positionMap[textPosition || 'top'];
@@ -3228,8 +3256,6 @@
3228
3256
  return {
3229
3257
  zIndex: ANNOTATION_Z_INDEX,
3230
3258
  regionRelative: true,
3231
- offsetX,
3232
- offsetY,
3233
3259
  positions: (data, context)=>{
3234
3260
  const positionData = data.filter((item)=>selectedData.some((datum)=>isSubset(datum, item)));
3235
3261
  const xyList = positionData.map((datum)=>context.dataToPosition(datum));
@@ -3649,11 +3675,11 @@
3649
3675
  label: d,
3650
3676
  shape: {
3651
3677
  outerBorder: border ? {
3652
- stroke: colorScheme?.[index],
3678
+ stroke: colorScheme?.[index % colorScheme.length],
3653
3679
  distance: 3,
3654
3680
  lineWidth: 1
3655
3681
  } : void 0,
3656
- fill: colorScheme?.[index]
3682
+ fill: colorScheme?.[index % colorScheme.length]
3657
3683
  }
3658
3684
  })),
3659
3685
  item: {
@@ -4066,14 +4092,12 @@
4066
4092
  right: 'insideRight'
4067
4093
  };
4068
4094
  const markArea = annotationAreaList.flatMap((annotationArea)=>{
4069
- 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;
4095
+ 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;
4070
4096
  const dataset = advancedVSeed.dataset.flat();
4071
4097
  const selectedData = selectorPoint ? dataset.filter((datum)=>selector_selector(datum, selectorPoint)) : [];
4072
4098
  return {
4073
4099
  zIndex: ANNOTATION_Z_INDEX,
4074
4100
  regionRelative: true,
4075
- offsetX,
4076
- offsetY,
4077
4101
  positions: (data, context)=>{
4078
4102
  const positionData = data.filter((item)=>selectedData.some((datum)=>isSubset(datum, item)));
4079
4103
  const xyList = positionData.map((datum)=>context.dataToPosition(datum));
@@ -6148,6 +6172,7 @@
6148
6172
  'legend',
6149
6173
  'tooltip',
6150
6174
  'dualChartType',
6175
+ 'alignTicks',
6151
6176
  'primaryYAxis',
6152
6177
  'secondaryYAxis',
6153
6178
  'crosshairLine'
@@ -6300,7 +6325,8 @@
6300
6325
  };
6301
6326
  const dualChartTypePrimary = (spec, context)=>{
6302
6327
  const result = {
6303
- ...spec
6328
+ ...spec,
6329
+ zIndex: DUAL_AXIS_CHART_NON_COLUMN_Z_INDEX
6304
6330
  };
6305
6331
  const { advancedVSeed, vseed } = context;
6306
6332
  const { chartType } = vseed;
@@ -6311,12 +6337,16 @@
6311
6337
  secondary: 'line'
6312
6338
  };
6313
6339
  const primary = Array.isArray(config) ? config[index].primary || config[0].primary : config.primary;
6314
- switch(primary){
6340
+ const secondary = Array.isArray(config) ? config[index].secondary || config[0].secondary : config.secondary;
6341
+ const bothColumn = 'column' === primary && 'column' === secondary;
6342
+ const type = bothColumn ? 'columnParallel' : primary;
6343
+ switch(type){
6315
6344
  case 'line':
6316
6345
  result.type = 'line';
6317
6346
  break;
6318
6347
  case 'column':
6319
6348
  result.type = 'bar';
6349
+ result.zIndex = DUAL_AXIS_CHART_COLUMN_Z_INDEX;
6320
6350
  break;
6321
6351
  case 'columnParallel':
6322
6352
  {
@@ -6327,6 +6357,7 @@
6327
6357
  datasetReshapeInfo[0].unfoldInfo.groupId
6328
6358
  ];
6329
6359
  columnSpec.type = 'bar';
6360
+ result.zIndex = DUAL_AXIS_CHART_COLUMN_Z_INDEX;
6330
6361
  break;
6331
6362
  }
6332
6363
  case 'columnPercent':
@@ -6350,7 +6381,8 @@
6350
6381
  };
6351
6382
  const dualChartTypeSecondary = (spec, context)=>{
6352
6383
  const result = {
6353
- ...spec
6384
+ ...spec,
6385
+ zIndex: DUAL_AXIS_CHART_NON_COLUMN_Z_INDEX
6354
6386
  };
6355
6387
  const { advancedVSeed, vseed } = context;
6356
6388
  const { chartType } = vseed;
@@ -6360,13 +6392,17 @@
6360
6392
  secondary: 'line'
6361
6393
  };
6362
6394
  const index = datasetReshapeInfo[0].index;
6395
+ const primary = Array.isArray(config) ? config[index].primary || config[0].primary : config.primary;
6363
6396
  const secondary = Array.isArray(config) ? config[index].secondary || config[0].secondary : config.secondary;
6364
- switch(secondary){
6397
+ const bothColumn = 'column' === primary && 'column' === secondary;
6398
+ const type = bothColumn ? 'columnParallel' : secondary;
6399
+ switch(type){
6365
6400
  case 'line':
6366
6401
  result.type = 'line';
6367
6402
  break;
6368
6403
  case 'column':
6369
6404
  result.type = 'bar';
6405
+ result.zIndex = DUAL_AXIS_CHART_COLUMN_Z_INDEX;
6370
6406
  break;
6371
6407
  case 'columnParallel':
6372
6408
  {
@@ -6377,6 +6413,7 @@
6377
6413
  datasetReshapeInfo[0].unfoldInfo.groupId
6378
6414
  ];
6379
6415
  columnSpec.type = 'bar';
6416
+ result.zIndex = DUAL_AXIS_CHART_COLUMN_Z_INDEX;
6380
6417
  break;
6381
6418
  }
6382
6419
  case 'columnPercent':
@@ -6715,12 +6752,18 @@
6715
6752
  const { locale, datasetReshapeInfo } = advancedVSeed;
6716
6753
  const index = datasetReshapeInfo[0].index;
6717
6754
  const primaryYAxis = advancedVSeed.config?.[chartType]?.primaryYAxis;
6718
- const config = Array.isArray(primaryYAxis) ? primaryYAxis[index] || primaryYAxis[0] : primaryYAxis;
6755
+ const yAxisConfig = Array.isArray(primaryYAxis) ? primaryYAxis[index] || primaryYAxis[0] : primaryYAxis;
6756
+ const alignTicks = advancedVSeed.config?.[chartType]?.alignTicks;
6757
+ const alignTicksConfig = Array.isArray(alignTicks) ? alignTicks[index] || alignTicks[0] : alignTicks;
6719
6758
  if (datasetReshapeInfo[0].foldInfoList?.[0] && chunk_VCYTMP4D_n(datasetReshapeInfo[0].foldInfoList[0].foldMap)) return result;
6720
6759
  const id = `${datasetReshapeInfo[0].id}-primary-axis`;
6721
- const seriesId = `${datasetReshapeInfo[0].id}-primary-series`;
6760
+ const seriesIds = [
6761
+ `${datasetReshapeInfo[0].id}-primary-series`,
6762
+ `${datasetReshapeInfo[0].id}-secondary-series`
6763
+ ];
6764
+ const seriesId = alignTicksConfig ? seriesIds : seriesIds[0];
6722
6765
  if (!result.axes) result.axes = [];
6723
- if (!config) {
6766
+ if (!yAxisConfig) {
6724
6767
  result.axes = [
6725
6768
  ...result.axes,
6726
6769
  {
@@ -6728,26 +6771,16 @@
6728
6771
  id,
6729
6772
  seriesId,
6730
6773
  type: 'linear',
6731
- orient: 'left',
6732
- sync: {
6733
- axisId: `${datasetReshapeInfo[0].id}-secondary-axis`,
6734
- tickAlign: false,
6735
- zeroAlign: true
6736
- }
6774
+ orient: 'left'
6737
6775
  }
6738
6776
  ];
6739
6777
  return result;
6740
6778
  }
6741
- const { visible = true, label, tick, title, grid, line, zero, nice, inverse, max, min, log, logBase = 10 } = config;
6779
+ const { visible = true, label, tick, title, grid, line, zero, nice, inverse, max, min, log, logBase = 10 } = yAxisConfig;
6742
6780
  const linearAxis = {
6743
6781
  visible,
6744
6782
  id,
6745
6783
  seriesId,
6746
- sync: {
6747
- axisId: `${datasetReshapeInfo[0].id}-secondary-axis`,
6748
- tickAlign: false,
6749
- zeroAlign: true
6750
- },
6751
6784
  type: log ? 'log' : 'linear',
6752
6785
  base: logBase,
6753
6786
  orient: 'left',
@@ -6816,12 +6849,22 @@
6816
6849
  const { locale, datasetReshapeInfo } = advancedVSeed;
6817
6850
  const index = datasetReshapeInfo[0].index;
6818
6851
  const secondaryYAxis = advancedVSeed.config?.[chartType]?.secondaryYAxis;
6819
- const config = Array.isArray(secondaryYAxis) ? secondaryYAxis[index] || secondaryYAxis[0] : secondaryYAxis;
6852
+ const yAxisConfig = Array.isArray(secondaryYAxis) ? secondaryYAxis[index] || secondaryYAxis[0] : secondaryYAxis;
6853
+ const alignTicks = advancedVSeed.config?.[chartType]?.alignTicks;
6854
+ const alignTicksConfig = Array.isArray(alignTicks) ? alignTicks[index] || alignTicks[0] : alignTicks;
6820
6855
  if (chunk_JK3VNB42_n(datasetReshapeInfo[0].foldInfoList?.[1])) return result;
6856
+ const sync = {
6857
+ axisId: `${datasetReshapeInfo[0].id}-primary-axis`,
6858
+ zeroAlign: true
6859
+ };
6821
6860
  const id = `${datasetReshapeInfo[0].id}-secondary-axis`;
6822
- const seriesId = `${datasetReshapeInfo[0].id}-secondary-series`;
6861
+ const seriesIds = [
6862
+ `${datasetReshapeInfo[0].id}-primary-series`,
6863
+ `${datasetReshapeInfo[0].id}-secondary-series`
6864
+ ];
6865
+ const seriesId = alignTicksConfig ? seriesIds : seriesIds[1];
6823
6866
  if (!result.axes) result.axes = [];
6824
- if (!config) {
6867
+ if (!yAxisConfig) {
6825
6868
  result.axes = [
6826
6869
  ...result.axes,
6827
6870
  {
@@ -6829,16 +6872,18 @@
6829
6872
  id,
6830
6873
  seriesId,
6831
6874
  type: 'linear',
6832
- orient: 'right'
6875
+ orient: 'right',
6876
+ sync
6833
6877
  }
6834
6878
  ];
6835
6879
  return result;
6836
6880
  }
6837
- const { visible = true, label, tick, title, grid, line, zero, nice, inverse, max, min, log, logBase = 10 } = config;
6881
+ const { visible = true, label, tick, title, grid, line, zero, nice, inverse, max, min, log, logBase = 10 } = yAxisConfig;
6838
6882
  const linearAxis = {
6839
6883
  visible,
6840
6884
  id,
6841
6885
  seriesId,
6886
+ sync,
6842
6887
  type: log ? 'log' : 'linear',
6843
6888
  base: logBase,
6844
6889
  orient: 'right',
@@ -12588,6 +12633,7 @@
12588
12633
  tooltip: zTooltip.nullish(),
12589
12634
  legend: zLegend.nullish(),
12590
12635
  dualChartType: schemas_array(zDualChartType).or(zDualChartType).nullish(),
12636
+ alignTicks: schemas_array(schemas_boolean()).or(schemas_boolean()).nullish(),
12591
12637
  primaryYAxis: schemas_array(zYLinearAxis).or(zYLinearAxis).nullish(),
12592
12638
  secondaryYAxis: schemas_array(zYLinearAxis).or(zYLinearAxis).nullish(),
12593
12639
  xAxis: zXBandAxis.nullish(),
@@ -12899,9 +12945,7 @@
12899
12945
  literal('solid'),
12900
12946
  literal('dashed'),
12901
12947
  literal('dotted')
12902
- ]).default('dashed').nullish(),
12903
- offsetX: schemas_number().default(0),
12904
- offsetY: schemas_number().default(0)
12948
+ ]).default('dashed').nullish()
12905
12949
  });
12906
12950
  const zAnnotationHorizontalLine = schemas_object({
12907
12951
  selector: union([
@@ -12951,9 +12995,7 @@
12951
12995
  textBackgroundBorderColor: schemas_string().default('#212121').nullish(),
12952
12996
  textBackgroundBorderRadius: schemas_number().default(4).nullish(),
12953
12997
  textBackgroundBorderWidth: schemas_number().default(1).nullish(),
12954
- textBackgroundPadding: schemas_number().default(2).nullish(),
12955
- offsetX: schemas_number().default(0),
12956
- offsetY: schemas_number().default(0)
12998
+ textBackgroundPadding: schemas_number().default(2).nullish()
12957
12999
  });
12958
13000
  const zAnnotationArea = schemas_object({
12959
13001
  selector: union([
@@ -12995,9 +13037,7 @@
12995
13037
  areaBorderColor: schemas_string().default('#888888').nullish(),
12996
13038
  areaBorderWidth: schemas_number().default(1).nullish(),
12997
13039
  areaBorderRadius: schemas_number().default(4).nullish(),
12998
- outerPadding: schemas_number().default(4).nullish(),
12999
- offsetX: schemas_number().default(0).nullish(),
13000
- offsetY: schemas_number().default(0).nullish()
13040
+ outerPadding: schemas_number().default(4).nullish()
13001
13041
  });
13002
13042
  const zAnnotation = schemas_object({
13003
13043
  annotationPoint: zAnnotationPoint.or(schemas_array(zAnnotationPoint)).nullish(),
@@ -13322,6 +13362,7 @@
13322
13362
  measures: zMeasureTree.nullish(),
13323
13363
  dualMeasures: zDualMeasures.nullish(),
13324
13364
  dualChartType: schemas_array(zDualChartType).or(zDualChartType).nullish(),
13365
+ alignTicks: schemas_array(schemas_boolean()).or(schemas_boolean()).nullish(),
13325
13366
  primaryYAxis: schemas_array(zYLinearAxis).or(zYLinearAxis).nullish(),
13326
13367
  secondaryYAxis: schemas_array(zYLinearAxis).or(zYLinearAxis).nullish(),
13327
13368
  xAxis: zXBandAxis.nullish(),