@visactor/vseed 0.0.34 → 0.0.35

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.
package/dist/index.js CHANGED
@@ -5648,12 +5648,13 @@ const dualChartTypePrimary = (spec, context)=>{
5648
5648
  const { advancedVSeed, vseed } = context;
5649
5649
  const { chartType } = vseed;
5650
5650
  const { datasetReshapeInfo } = advancedVSeed;
5651
+ const index = datasetReshapeInfo[0].index;
5651
5652
  const config = advancedVSeed.config?.[chartType]?.dualChartType || {
5652
5653
  primary: 'column',
5653
5654
  secondary: 'line'
5654
5655
  };
5655
- if (Array.isArray(config)) return result;
5656
- switch(config.primary){
5656
+ const primary = Array.isArray(config) ? config[index].primary || config[0].primary : config.primary;
5657
+ switch(primary){
5657
5658
  case 'line':
5658
5659
  result.type = 'line';
5659
5660
  break;
@@ -5686,7 +5687,7 @@ const dualChartTypePrimary = (spec, context)=>{
5686
5687
  result.type = 'scatter';
5687
5688
  break;
5688
5689
  default:
5689
- result.type = config.primary;
5690
+ result.type = primary;
5690
5691
  }
5691
5692
  return result;
5692
5693
  };
@@ -5701,8 +5702,9 @@ const dualChartTypeSecondary = (spec, context)=>{
5701
5702
  primary: 'column',
5702
5703
  secondary: 'line'
5703
5704
  };
5704
- if (Array.isArray(config)) return result;
5705
- switch(config.secondary){
5705
+ const index = datasetReshapeInfo[0].index;
5706
+ const secondary = Array.isArray(config) ? config[index].secondary || config[0].secondary : config.secondary;
5707
+ switch(secondary){
5706
5708
  case 'line':
5707
5709
  result.type = 'line';
5708
5710
  break;
@@ -5735,7 +5737,7 @@ const dualChartTypeSecondary = (spec, context)=>{
5735
5737
  result.type = 'scatter';
5736
5738
  break;
5737
5739
  default:
5738
- result.type = config.secondary;
5740
+ result.type = secondary;
5739
5741
  }
5740
5742
  return result;
5741
5743
  };
@@ -6281,6 +6283,7 @@ const pivotDualAxis = [
6281
6283
  pivotIndicators_pivotIndicators([
6282
6284
  series([
6283
6285
  initDualAxisPrimary,
6286
+ dualChartTypePrimary,
6284
6287
  datasetPrimary,
6285
6288
  labelPrimary,
6286
6289
  tooltipPrimary,
@@ -6292,6 +6295,7 @@ const pivotDualAxis = [
6292
6295
  areaStyle_areaStyle
6293
6296
  ], [
6294
6297
  initDualAxisSecondary,
6298
+ dualChartTypeSecondary,
6295
6299
  datasetSecondary,
6296
6300
  labelSecondary,
6297
6301
  tooltipSecondary,
@@ -7795,7 +7799,12 @@ const lightTheme = ()=>{
7795
7799
  ...baseConfig,
7796
7800
  xAxis: bandAxis,
7797
7801
  primaryYAxis: linearAxis,
7798
- secondaryYAxis: linearAxis,
7802
+ secondaryYAxis: {
7803
+ ...linearAxis,
7804
+ grid: {
7805
+ visible: false
7806
+ }
7807
+ },
7799
7808
  dualChartType: {
7800
7809
  primary: 'column',
7801
7810
  secondary: 'line'
@@ -8128,7 +8137,12 @@ const darkTheme = ()=>{
8128
8137
  ...baseConfig,
8129
8138
  xAxis: bandAxis,
8130
8139
  primaryYAxis: linearAxis,
8131
- secondaryYAxis: linearAxis,
8140
+ secondaryYAxis: {
8141
+ ...linearAxis,
8142
+ grid: {
8143
+ visible: false
8144
+ }
8145
+ },
8132
8146
  dualChartType: {
8133
8147
  primary: 'column',
8134
8148
  secondary: 'line'
@@ -8244,19 +8258,15 @@ const zDualChartType = z.object({
8244
8258
  primary: z["enum"]([
8245
8259
  'line',
8246
8260
  'column',
8247
- 'columnPercent',
8248
8261
  'columnParallel',
8249
8262
  'area',
8250
- 'areaPercent',
8251
8263
  'scatter'
8252
8264
  ]).default('column'),
8253
8265
  secondary: z["enum"]([
8254
8266
  'line',
8255
8267
  'column',
8256
- 'columnPercent',
8257
8268
  'columnParallel',
8258
8269
  'area',
8259
- 'areaPercent',
8260
8270
  'scatter'
8261
8271
  ]).default('line')
8262
8272
  });