@visactor/vseed 0.0.36 → 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 (123) hide show
  1. package/dist/builder/builder/builder.d.ts +8922 -8928
  2. package/dist/index.cjs +1192 -917
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.js +1160 -903
  5. package/dist/index.js.map +1 -1
  6. package/dist/pipeline/advanced/table/pipes/config/index.d.ts +2 -0
  7. package/dist/pipeline/advanced/table/pipes/config/pivotTableConfig.d.ts +2 -0
  8. package/dist/pipeline/advanced/table/pipes/config/tableConfig.d.ts +2 -0
  9. package/dist/pipeline/advanced/table/pipes/index.d.ts +1 -0
  10. package/dist/pipeline/spec/chart/pipes/series/index.d.ts +1 -1
  11. package/dist/pipeline/spec/chart/pipes/series/series.d.ts +1 -0
  12. package/dist/pipeline/spec/table/pipes/columns/dimensionsToColumns.d.ts +2 -0
  13. package/dist/pipeline/spec/table/pipes/columns/index.d.ts +1 -0
  14. package/dist/pipeline/spec/table/pipes/columns/measuresToColumns.d.ts +0 -1
  15. package/dist/pipeline/spec/table/pipes/indicators/index.d.ts +1 -0
  16. package/dist/pipeline/spec/table/pipes/indicators/pivotDataConfig.d.ts +2 -0
  17. package/dist/pipeline/utils/constant.d.ts +2 -0
  18. package/dist/pipeline/utils/dimensions/index.d.ts +1 -0
  19. package/dist/pipeline/utils/dimensions/typeGuard.d.ts +4 -0
  20. package/dist/pipeline/utils/measures/index.d.ts +1 -0
  21. package/dist/pipeline/utils/measures/typeGuard.d.ts +4 -0
  22. package/dist/types/advancedVSeed.d.ts +3841 -3847
  23. package/dist/types/chartType/area/area.d.ts +11 -2
  24. package/dist/types/chartType/area/zArea.d.ts +565 -577
  25. package/dist/types/chartType/areaPercent/areaPercent.d.ts +4 -0
  26. package/dist/types/chartType/areaPercent/zAreaPercent.d.ts +565 -577
  27. package/dist/types/chartType/areaRange/areaRange.d.ts +4 -0
  28. package/dist/types/chartType/areaRange/zAreaRange.d.ts +546 -558
  29. package/dist/types/chartType/bar/bar.d.ts +4 -1183
  30. package/dist/types/chartType/bar/index.d.ts +2 -1
  31. package/dist/types/chartType/bar/zBar.d.ts +1171 -0
  32. package/dist/types/chartType/barParallel/barParallel.d.ts +4 -1183
  33. package/dist/types/chartType/barParallel/index.d.ts +2 -1
  34. package/dist/types/chartType/barParallel/zBarParallel.d.ts +1171 -0
  35. package/dist/types/chartType/barPercent/barPercent.d.ts +4 -1183
  36. package/dist/types/chartType/barPercent/index.d.ts +2 -1
  37. package/dist/types/chartType/barPercent/zBarPercent.d.ts +1171 -0
  38. package/dist/types/chartType/column/column.d.ts +4 -1183
  39. package/dist/types/chartType/column/index.d.ts +2 -1
  40. package/dist/types/chartType/column/zColumn.d.ts +1171 -0
  41. package/dist/types/chartType/columnParallel/columnParallel.d.ts +4 -1183
  42. package/dist/types/chartType/columnParallel/index.d.ts +2 -1
  43. package/dist/types/chartType/columnParallel/zColumnParallel.d.ts +1171 -0
  44. package/dist/types/chartType/columnPercent/columnPercent.d.ts +4 -1183
  45. package/dist/types/chartType/columnPercent/index.d.ts +2 -1
  46. package/dist/types/chartType/columnPercent/zColumnPercent.d.ts +1171 -0
  47. package/dist/types/chartType/donut/donut.d.ts +4 -119
  48. package/dist/types/chartType/donut/index.d.ts +2 -1
  49. package/dist/types/chartType/donut/zDonut.d.ts +119 -0
  50. package/dist/types/chartType/dualAxis/dualAxis.d.ts +9 -0
  51. package/dist/types/chartType/dualAxis/zDualAxis.d.ts +744 -755
  52. package/dist/types/chartType/funnel/funnel.d.ts +4 -89
  53. package/dist/types/chartType/funnel/index.d.ts +2 -1
  54. package/dist/types/chartType/funnel/zFunnel.d.ts +89 -0
  55. package/dist/types/chartType/heatmap/heatmap.d.ts +4 -89
  56. package/dist/types/chartType/heatmap/index.d.ts +2 -1
  57. package/dist/types/chartType/heatmap/zHeatmap.d.ts +89 -0
  58. package/dist/types/chartType/line/index.d.ts +2 -1
  59. package/dist/types/chartType/line/line.d.ts +8 -1367
  60. package/dist/types/chartType/line/zLine.d.ts +1353 -0
  61. package/dist/types/chartType/pie/index.d.ts +2 -1
  62. package/dist/types/chartType/pie/pie.d.ts +4 -119
  63. package/dist/types/chartType/pie/zPie.d.ts +119 -0
  64. package/dist/types/chartType/pivotTable/index.d.ts +2 -1
  65. package/dist/types/chartType/pivotTable/pivotTable.d.ts +48 -60
  66. package/dist/types/chartType/pivotTable/zPivotTable.d.ts +68 -0
  67. package/dist/types/chartType/radar/index.d.ts +2 -1
  68. package/dist/types/chartType/radar/radar.d.ts +4 -119
  69. package/dist/types/chartType/radar/zRadar.d.ts +119 -0
  70. package/dist/types/chartType/rose/index.d.ts +2 -1
  71. package/dist/types/chartType/rose/rose.d.ts +4 -119
  72. package/dist/types/chartType/rose/zRose.d.ts +119 -0
  73. package/dist/types/chartType/roseParallel/index.d.ts +2 -1
  74. package/dist/types/chartType/roseParallel/roseParallel.d.ts +4 -119
  75. package/dist/types/chartType/roseParallel/zRoseParallel.d.ts +119 -0
  76. package/dist/types/chartType/scatter/index.d.ts +2 -1
  77. package/dist/types/chartType/scatter/scatter.d.ts +4 -1191
  78. package/dist/types/chartType/scatter/zScatter.d.ts +1179 -0
  79. package/dist/types/chartType/table/index.d.ts +2 -1
  80. package/dist/types/chartType/table/table.d.ts +49 -64
  81. package/dist/types/chartType/table/zTable.d.ts +68 -0
  82. package/dist/types/dataSelector/selector.d.ts +70 -16
  83. package/dist/types/properties/analysis/analysis.d.ts +1 -1
  84. package/dist/types/properties/analysis/sort.d.ts +2 -4
  85. package/dist/types/properties/analysis/sortLegend.d.ts +2 -3
  86. package/dist/types/properties/annotation/annotation.d.ts +304 -316
  87. package/dist/types/properties/annotation/annotationArea.d.ts +12 -137
  88. package/dist/types/properties/annotation/annotationHorizontalLine.d.ts +27 -148
  89. package/dist/types/properties/annotation/annotationPoint.d.ts +20 -114
  90. package/dist/types/properties/annotation/annotationVerticalLine.d.ts +6 -127
  91. package/dist/types/properties/annotation/index.d.ts +8 -4
  92. package/dist/types/properties/annotation/zAnnotationArea.d.ts +108 -0
  93. package/dist/types/properties/annotation/zAnnotationHorizontalLine.d.ts +105 -0
  94. package/dist/types/properties/annotation/zAnnotationPoint.d.ts +94 -0
  95. package/dist/types/properties/annotation/zAnnotationVerticalLine.d.ts +105 -0
  96. package/dist/types/properties/config/axes/axis.d.ts +44 -58
  97. package/dist/types/properties/config/axes/bandAxis.d.ts +74 -74
  98. package/dist/types/properties/config/axes/linearAxis.d.ts +76 -76
  99. package/dist/types/properties/config/backgroundColor/backgroundColor.d.ts +1 -1
  100. package/dist/types/properties/config/color/color.d.ts +7 -9
  101. package/dist/types/properties/config/config.d.ts +3288 -3282
  102. package/dist/types/properties/config/crosshair/crosshair.d.ts +14 -17
  103. package/dist/types/properties/config/crosshair/index.d.ts +2 -1
  104. package/dist/types/properties/config/crosshair/zCrosshair.d.ts +15 -0
  105. package/dist/types/properties/config/label/label.d.ts +1 -1
  106. package/dist/types/properties/config/legend/legend.d.ts +13 -17
  107. package/dist/types/properties/config/tooltip/tooltip.d.ts +1 -1
  108. package/dist/types/properties/datasetReshapeInfo/datasetReshapeInfo.d.ts +2 -2
  109. package/dist/types/properties/dimensions/dimensions.d.ts +6 -29
  110. package/dist/types/properties/dimensions/index.d.ts +2 -1
  111. package/dist/types/properties/dimensions/zDimensions.d.ts +30 -0
  112. package/dist/types/properties/encoding/encoding.d.ts +8 -8
  113. package/dist/types/properties/markStyle/areaStyle.d.ts +20 -20
  114. package/dist/types/properties/markStyle/barStyle.d.ts +24 -24
  115. package/dist/types/properties/markStyle/lineStyle.d.ts +24 -24
  116. package/dist/types/properties/markStyle/markStyle.d.ts +194 -194
  117. package/dist/types/properties/markStyle/pointStyle.d.ts +35 -35
  118. package/dist/types/properties/measures/measures.d.ts +3 -0
  119. package/dist/types/properties/theme/customTheme.d.ts +3336 -3330
  120. package/dist/types/vseed.d.ts +6734 -6851
  121. package/dist/umd/index.js +1202 -939
  122. package/dist/umd/index.js.map +1 -1
  123. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -286,6 +286,33 @@ const records_records = (advancedVSeed, context)=>{
286
286
  dataset
287
287
  };
288
288
  };
289
+ const tableConfig_tableConfig = (advancedVSeed, context)=>{
290
+ const { vseed } = context;
291
+ const { chartType } = vseed;
292
+ const result = {
293
+ ...advancedVSeed
294
+ };
295
+ const config = pick(vseed, [
296
+ 'backgroundColor',
297
+ 'bodyFontSize',
298
+ 'bodyFontColor',
299
+ 'bodyBackgroundColor',
300
+ 'headerFontSize',
301
+ 'headerFontColor',
302
+ 'headerBackgroundColor',
303
+ 'hoverHeaderBackgroundColor',
304
+ 'hoverHeaderInlineBackgroundColor',
305
+ 'selectedBorderColor',
306
+ 'selectedBackgroundColor'
307
+ ]);
308
+ result.config = {
309
+ ...result.config || {},
310
+ [chartType]: {
311
+ ...config
312
+ }
313
+ };
314
+ return result;
315
+ };
289
316
  const theme_theme = (advancedVSeed, context)=>{
290
317
  const { customTheme, vseed } = context;
291
318
  const { theme = 'light', chartType } = vseed;
@@ -314,6 +341,7 @@ const theme_theme = (advancedVSeed, context)=>{
314
341
  return result;
315
342
  };
316
343
  const mergeArray = (arr, themeItem)=>{
344
+ if (isNullish(themeItem) || isString(themeItem) || isNumber(themeItem)) return arr;
317
345
  if (!Array.isArray(arr)) return arr;
318
346
  if (arr.some((d)=>!isObjectType(d))) return arr;
319
347
  return arr.map((item)=>merge(themeItem, item));
@@ -323,11 +351,14 @@ const tableAdvancedPipeline = [
323
351
  autoMeasures,
324
352
  autoDimensions,
325
353
  records_records,
354
+ tableConfig_tableConfig,
326
355
  theme_theme
327
356
  ];
328
357
  const initTable = (spec, context)=>{
329
358
  const { advancedVSeed } = context;
330
359
  const { dataset } = advancedVSeed;
360
+ const { config } = advancedVSeed;
361
+ const { backgroundColor = 'transparent' } = config.table || {};
331
362
  return {
332
363
  ...spec,
333
364
  records: dataset,
@@ -349,23 +380,26 @@ const initTable = (spec, context)=>{
349
380
  highlightMode: 'row'
350
381
  },
351
382
  theme: {
352
- underlayBackgroundColor: 'transparent'
383
+ underlayBackgroundColor: backgroundColor
353
384
  }
354
385
  };
355
386
  };
356
- const measureTreeToColumns = (spec, context)=>{
387
+ const isMeasure = (measure)=>!('children' in measure);
388
+ const isMeasureGroup = (measure)=>'children' in measure;
389
+ const isMeasures = (measures)=>measures.every(isMeasure);
390
+ const dimensionTreeToColumns = (spec, context)=>{
357
391
  const { advancedVSeed } = context;
358
- const measures = advancedVSeed.measures;
392
+ const dimensions = advancedVSeed.dimensions;
359
393
  const result = {
360
394
  ...spec
361
395
  };
362
396
  const eachNode = (node)=>{
363
- if ('children' in node) return {};
364
- return {
397
+ if (isMeasure(node)) return {
365
398
  width: 'auto'
366
399
  };
400
+ return {};
367
401
  };
368
- const columns = treeTreeToColumns(measures, eachNode);
402
+ const columns = treeTreeToColumns(dimensions, eachNode);
369
403
  return {
370
404
  ...result,
371
405
  columns: [
@@ -374,19 +408,106 @@ const measureTreeToColumns = (spec, context)=>{
374
408
  ]
375
409
  };
376
410
  };
377
- const dimensionTreeToColumns = (spec, context)=>{
411
+ const treeTreeToColumns = (tree, callback)=>{
412
+ const result = tree.map((item)=>{
413
+ if ('children' in item && Array.isArray(item.children)) {
414
+ const groupNode = item;
415
+ const field = groupNode.id;
416
+ const title = groupNode.alias ?? groupNode.id;
417
+ const props = callback?.(groupNode) || {};
418
+ return {
419
+ field,
420
+ title,
421
+ columns: treeTreeToColumns(item.children, callback),
422
+ ...props
423
+ };
424
+ }
425
+ {
426
+ const field = item.id;
427
+ const title = item.alias ?? item.id;
428
+ const props = callback?.(item) || {};
429
+ return {
430
+ field,
431
+ title,
432
+ ...props
433
+ };
434
+ }
435
+ });
436
+ return result || [];
437
+ };
438
+ const createNumFormatter = (format, locale = intl.getLocale())=>{
439
+ const { type = 'number', ratio = 1, symbol = '', thousandSeparator = true, prefix = '', suffix = '', fractionDigits = 2, significantDigits, roundingMode = 'halfExpand', roundingPriority = 'auto' } = format || {};
440
+ const numFormatterOptions = {
441
+ style: 'decimal',
442
+ notation: 'scientific' === type ? 'scientific' : 'standard',
443
+ roundingMode,
444
+ roundingPriority
445
+ };
446
+ if (isNumber(fractionDigits)) {
447
+ if (fractionDigits >= 0) {
448
+ numFormatterOptions.minimumFractionDigits = fractionDigits;
449
+ numFormatterOptions.maximumFractionDigits = fractionDigits;
450
+ }
451
+ }
452
+ if (isNumber(significantDigits) && significantDigits > 0) {
453
+ if (significantDigits > 0) {
454
+ numFormatterOptions.minimumSignificantDigits = significantDigits;
455
+ numFormatterOptions.maximumSignificantDigits = significantDigits;
456
+ }
457
+ }
458
+ const numFormatter = new Intl.NumberFormat(locale, numFormatterOptions);
459
+ return (value)=>{
460
+ let num = Number(value);
461
+ let typeSymbol = '';
462
+ if (Number.isNaN(num)) return String(value);
463
+ if ('percent' === type) {
464
+ num *= 100;
465
+ typeSymbol = '%';
466
+ } else if ('permille' === type) {
467
+ num *= 1000;
468
+ typeSymbol = "\u2030";
469
+ } else if ('number' === type) num /= ratio || 1;
470
+ let numStr = numFormatter.format(num);
471
+ if (thousandSeparator) {
472
+ const parts = numStr.split('.');
473
+ parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ',');
474
+ numStr = parts.join('.');
475
+ }
476
+ return `${prefix}${numStr}${typeSymbol}${symbol}${suffix}`;
477
+ };
478
+ };
479
+ const autoNumFormatter = (value, locale = intl.getLocale())=>{
480
+ if (null == value) return String(value);
481
+ const num = Number(value);
482
+ if (Number.isNaN(num)) return String(value);
483
+ const numFormatterOptions = {
484
+ style: 'decimal',
485
+ notation: 'compact'
486
+ };
487
+ numFormatterOptions.minimumFractionDigits = 0;
488
+ numFormatterOptions.maximumFractionDigits = 2;
489
+ const numFormatter = new Intl.NumberFormat(locale, {
490
+ ...numFormatterOptions
491
+ });
492
+ return numFormatter.format(Number(value));
493
+ };
494
+ const createFormatter = (format)=>createNumFormatter(format);
495
+ const autoFormatter = (value, locale)=>autoNumFormatter(value, locale);
496
+ const measureTreeToColumns = (spec, context)=>{
378
497
  const { advancedVSeed } = context;
379
- const dimensions = advancedVSeed.dimensions;
498
+ const { locale } = advancedVSeed;
499
+ const measures = advancedVSeed.measures;
380
500
  const result = {
381
501
  ...spec
382
502
  };
383
503
  const eachNode = (node)=>{
384
- if ('children' in node) return {};
385
- return {
386
- width: 'auto'
504
+ if (isMeasure(node)) return {
505
+ width: 'auto',
506
+ fieldFormat: fieldFormat(node, locale)
387
507
  };
508
+ return {};
388
509
  };
389
- const columns = treeTreeToColumns(dimensions, eachNode);
510
+ const columns = measuresToColumns_treeTreeToColumns(measures, eachNode);
390
511
  return {
391
512
  ...result,
392
513
  columns: [
@@ -395,7 +516,16 @@ const dimensionTreeToColumns = (spec, context)=>{
395
516
  ]
396
517
  };
397
518
  };
398
- const treeTreeToColumns = (tree, callback)=>{
519
+ const fieldFormat = (node, locale)=>(datum)=>{
520
+ const { format = {}, autoFormat = true, id } = node;
521
+ const value = datum[id];
522
+ if (!isEmpty(format)) {
523
+ const formatter = createFormatter(format);
524
+ return formatter(value);
525
+ }
526
+ if (autoFormat) return autoFormatter(value, locale);
527
+ };
528
+ const measuresToColumns_treeTreeToColumns = (tree, callback)=>{
399
529
  const result = tree.map((item)=>{
400
530
  if ('children' in item && Array.isArray(item.children)) {
401
531
  const groupNode = item;
@@ -405,7 +535,7 @@ const treeTreeToColumns = (tree, callback)=>{
405
535
  return {
406
536
  field,
407
537
  title,
408
- columns: treeTreeToColumns(item.children, callback),
538
+ columns: measuresToColumns_treeTreeToColumns(item.children, callback),
409
539
  ...props
410
540
  };
411
541
  }
@@ -427,8 +557,8 @@ const bodyStyle = (spec, context)=>{
427
557
  ...spec
428
558
  };
429
559
  const { advancedVSeed } = context;
430
- const { customTheme, chartType } = advancedVSeed;
431
- const themeConfig = customTheme?.config?.[chartType];
560
+ const { chartType, config } = advancedVSeed;
561
+ const themeConfig = config?.[chartType];
432
562
  if (!result.theme || !themeConfig) return result;
433
563
  const borderColor = themeConfig.borderColor || 'rgb(224, 224, 224)';
434
564
  const backgroundColor = themeConfig.bodyBackgroundColor || '#fff';
@@ -466,8 +596,8 @@ const headerStyle = (spec, context)=>{
466
596
  ...spec
467
597
  };
468
598
  const { advancedVSeed } = context;
469
- const { customTheme, chartType } = advancedVSeed;
470
- const themConfig = customTheme?.config?.[chartType];
599
+ const { config, chartType } = advancedVSeed;
600
+ const themConfig = config?.[chartType];
471
601
  if (!result.theme || !themConfig) return result;
472
602
  const borderColor = themConfig.borderColor || 'rgb(224, 224, 224)';
473
603
  const backgroundColor = themConfig.headerBackgroundColor || '#EEF1F5';
@@ -514,8 +644,8 @@ const frameStyle = (spec, context)=>{
514
644
  ...spec
515
645
  };
516
646
  const { advancedVSeed } = context;
517
- const { customTheme, chartType } = advancedVSeed;
518
- const themConfig = customTheme?.config?.[chartType];
647
+ const { config, chartType } = advancedVSeed;
648
+ const themConfig = config?.[chartType];
519
649
  if (!result.theme || !themConfig) return result;
520
650
  const borderColor = themConfig.borderColor || 'rgb(224, 224, 224)';
521
651
  result.theme.frameStyle = {
@@ -530,8 +660,8 @@ const selectionStyle = (spec, context)=>{
530
660
  ...spec
531
661
  };
532
662
  const { advancedVSeed } = context;
533
- const { customTheme, chartType } = advancedVSeed;
534
- const themConfig = customTheme?.config?.[chartType];
663
+ const { config, chartType } = advancedVSeed;
664
+ const themConfig = config?.[chartType];
535
665
  if (!result.theme || !themConfig) return result;
536
666
  const borderColor = themConfig.selectedBorderColor || 'rgb(224, 224, 224)';
537
667
  const backgroundColor = themConfig.selectedBackgroundColor || 'rgb(224, 224, 224, 0.5)';
@@ -655,16 +785,46 @@ const autoPivotDimensions = (advancedVSeed, context)=>{
655
785
  }));
656
786
  return result;
657
787
  };
788
+ const pivotTableConfig = (advancedVSeed, context)=>{
789
+ const { vseed } = context;
790
+ const { chartType } = vseed;
791
+ const result = {
792
+ ...advancedVSeed
793
+ };
794
+ const config = pick(vseed, [
795
+ 'backgroundColor',
796
+ 'bodyFontSize',
797
+ 'bodyFontColor',
798
+ 'bodyBackgroundColor',
799
+ 'headerFontSize',
800
+ 'headerFontColor',
801
+ 'headerBackgroundColor',
802
+ 'hoverHeaderBackgroundColor',
803
+ 'hoverHeaderInlineBackgroundColor',
804
+ 'selectedBorderColor',
805
+ 'selectedBackgroundColor'
806
+ ]);
807
+ result.config = {
808
+ ...result.config || {},
809
+ [chartType]: {
810
+ ...config
811
+ }
812
+ };
813
+ return result;
814
+ };
658
815
  const pivotTableAdvancedPipeline = [
659
816
  initAdvancedVSeed,
660
817
  autoPivotMeasures,
661
818
  autoPivotDimensions,
662
819
  records_records,
820
+ pivotTableConfig,
663
821
  theme_theme
664
822
  ];
665
823
  const initPivotTable = (spec, context)=>{
666
824
  const { advancedVSeed } = context;
667
825
  const { dataset } = advancedVSeed;
826
+ const { config } = advancedVSeed;
827
+ const { backgroundColor = 'transparent' } = config.pivotTable || {};
668
828
  return {
669
829
  ...spec,
670
830
  records: dataset,
@@ -685,6 +845,9 @@ const initPivotTable = (spec, context)=>{
685
845
  tooltip: {
686
846
  isShowOverflowTextTooltip: true
687
847
  },
848
+ corner: {
849
+ titleOnDimension: 'all'
850
+ },
688
851
  widthAdaptiveMode: 'all',
689
852
  animationAppear: {
690
853
  duration: 300,
@@ -693,7 +856,7 @@ const initPivotTable = (spec, context)=>{
693
856
  direction: 'row'
694
857
  },
695
858
  theme: {
696
- underlayBackgroundColor: 'transparent'
859
+ underlayBackgroundColor: backgroundColor
697
860
  }
698
861
  };
699
862
  };
@@ -725,26 +888,39 @@ const pivotRows = (spec, context)=>{
725
888
  };
726
889
  const pivotIndicators = (spec, context)=>{
727
890
  const { advancedVSeed } = context;
891
+ const { locale } = advancedVSeed;
728
892
  const measures = advancedVSeed.measures;
729
893
  return {
730
894
  ...spec,
731
895
  indicatorsAsCol: true,
732
896
  indicatorTitle: intl.i18n`指标名称`,
733
- indicators: measures.map((item)=>({
897
+ indicators: measures.map((item)=>{
898
+ if (isMeasure(item)) return {
734
899
  cellType: 'text',
735
900
  indicatorKey: item.id,
736
901
  title: item.alias || item.id,
737
- width: 'auto'
738
- }))
902
+ width: 'auto',
903
+ format: pivotIndicators_fieldFormat(item, locale)
904
+ };
905
+ return {};
906
+ })
739
907
  };
740
908
  };
909
+ const pivotIndicators_fieldFormat = (node, locale)=>(value)=>{
910
+ const { format = {}, autoFormat = true } = node;
911
+ if (!isEmpty(format)) {
912
+ const formatter = createFormatter(format);
913
+ return formatter(value);
914
+ }
915
+ if (autoFormat) return autoFormatter(value, locale);
916
+ };
741
917
  const rowHeaderStyle = (spec, context)=>{
742
918
  const result = {
743
919
  ...spec
744
920
  };
745
921
  const { advancedVSeed } = context;
746
- const { customTheme, chartType } = advancedVSeed;
747
- const themConfig = customTheme?.config?.[chartType];
922
+ const { config, chartType } = advancedVSeed;
923
+ const themConfig = config?.[chartType];
748
924
  if (!result.theme || !themConfig) return result;
749
925
  const borderColor = themConfig.borderColor || 'rgb(224, 224, 224)';
750
926
  const backgroundColor = themConfig.headerBackgroundColor || '#EEF1F5';
@@ -791,8 +967,8 @@ const cornerHeaderStyle = (spec, context)=>{
791
967
  ...spec
792
968
  };
793
969
  const { advancedVSeed } = context;
794
- const { customTheme, chartType } = advancedVSeed;
795
- const themConfig = customTheme?.config?.[chartType];
970
+ const { config, chartType } = advancedVSeed;
971
+ const themConfig = config?.[chartType];
796
972
  if (!result.theme || !themConfig) return result;
797
973
  const borderColor = themConfig.borderColor || 'rgb(224, 224, 224)';
798
974
  const backgroundColor = themConfig.headerBackgroundColor || '#EEF1F5';
@@ -814,9 +990,9 @@ const cornerHeaderStyle = (spec, context)=>{
814
990
  ],
815
991
  textAlign: 'left',
816
992
  hover: {
817
- cellBgColor: hoverCellColor,
818
- inlineRowBgColor: hoverInlineColor,
819
- inlineColumnBgColor: hoverInlineColor
993
+ cellBgColor: hoverCellColor || void 0,
994
+ inlineRowBgColor: hoverInlineColor || void 0,
995
+ inlineColumnBgColor: hoverInlineColor || void 0
820
996
  },
821
997
  frameStyle: {
822
998
  borderColor: [
@@ -837,6 +1013,29 @@ const cornerHeaderStyle = (spec, context)=>{
837
1013
  };
838
1014
  return result;
839
1015
  };
1016
+ var new_data_set_AggregationType;
1017
+ !function(AggregationType) {
1018
+ AggregationType.RECORD = "RECORD", AggregationType.NONE = "NONE", AggregationType.SUM = "SUM", AggregationType.MIN = "MIN", AggregationType.MAX = "MAX", AggregationType.AVG = "AVG", AggregationType.COUNT = "COUNT", AggregationType.CUSTOM = "CUSTOM", AggregationType.RECALCULATE = "RECALCULATE";
1019
+ }(new_data_set_AggregationType || (new_data_set_AggregationType = {}));
1020
+ var new_data_set_SortType;
1021
+ !function(SortType) {
1022
+ SortType.ASC = "ASC", SortType.DESC = "DESC", SortType.NORMAL = "NORMAL", SortType.desc = "desc", SortType.asc = "asc", SortType.normal = "normal";
1023
+ }(new_data_set_SortType || (new_data_set_SortType = {}));
1024
+ const dataConfig = (spec, context)=>{
1025
+ const { advancedVSeed } = context;
1026
+ const measures = findAllMeasures(advancedVSeed.measures);
1027
+ const aggregationRules = measures.map((measure)=>({
1028
+ field: measure.id,
1029
+ aggregationType: new_data_set_AggregationType.NONE,
1030
+ indicatorKey: measure.id
1031
+ }));
1032
+ return {
1033
+ ...spec,
1034
+ dataConfig: {
1035
+ aggregationRules
1036
+ }
1037
+ };
1038
+ };
840
1039
  const pivotTableSpecPipeline = [
841
1040
  initPivotTable,
842
1041
  pivotColumns,
@@ -847,7 +1046,8 @@ const pivotTableSpecPipeline = [
847
1046
  rowHeaderStyle,
848
1047
  cornerHeaderStyle,
849
1048
  frameStyle,
850
- selectionStyle
1049
+ selectionStyle,
1050
+ dataConfig
851
1051
  ];
852
1052
  const registerPivotTable = ()=>{
853
1053
  Builder._advancedPipelineMap.pivotTable = pivotTableAdvancedPipeline;
@@ -1510,22 +1710,44 @@ const color_color = (spec, context)=>{
1510
1710
  const colorIdMap = unfoldInfo.colorIdMap;
1511
1711
  const { color } = baseConfig;
1512
1712
  const { colorScheme, colorMapping } = color;
1513
- const mappingList = [];
1514
- if (colorMapping) Object.entries(colorMapping).sort((a, b)=>a[0].split(Separator).length - b[0].split(Separator).length).forEach(([key, value])=>{
1515
- const idMap = Object.entries(colorIdMap).filter(([_, v])=>v.includes(key));
1516
- for (const [colorId] of idMap)mappingList.push([
1517
- colorId,
1518
- value
1519
- ]);
1520
- });
1521
1713
  result.color = {
1522
1714
  type: 'ordinal',
1523
1715
  domain: colorItems,
1524
1716
  range: colorScheme,
1525
- specified: Object.fromEntries(mappingList)
1717
+ specified: createSpecifiedForColorMapping(colorMapping, colorIdMap, colorItems)
1526
1718
  };
1527
1719
  return result;
1528
1720
  };
1721
+ const createSpecifiedForColorMapping = (colorMapping, colorIdMap, colorItems)=>{
1722
+ if (!colorMapping || !colorIdMap || !colorItems) return;
1723
+ const matchedList = [];
1724
+ const colors = Object.entries(colorMapping).sort((a, b)=>b[0].length - a[0].length);
1725
+ const accurateMap = colors.reduce((prev, cur)=>{
1726
+ const name = cur[0];
1727
+ const colorValue = cur[1];
1728
+ const accurateMatchedList = Object.entries(colorIdMap).filter(([colorKey, colorAlias])=>colorKey === name || colorAlias === name);
1729
+ accurateMatchedList.forEach((item)=>{
1730
+ prev[item[0]] = colorValue;
1731
+ matchedList.push(name);
1732
+ });
1733
+ return prev;
1734
+ }, {});
1735
+ const fuzzyMap = colors.reduce((prev, cur)=>{
1736
+ const name = cur[0];
1737
+ const colorValue = cur[1];
1738
+ if (matchedList.includes(name)) return prev;
1739
+ const fuzzyMatchedList = Object.entries(colorIdMap).filter(([colorKey, colorAlias])=>colorKey.includes(name) || colorAlias.includes(name));
1740
+ fuzzyMatchedList.forEach((item)=>{
1741
+ if (prev[item[0]]) return;
1742
+ prev[item[0]] = colorValue;
1743
+ });
1744
+ return prev;
1745
+ }, {});
1746
+ return {
1747
+ ...fuzzyMap,
1748
+ ...accurateMap
1749
+ };
1750
+ };
1529
1751
  const background_backgroundColor = (spec, context)=>{
1530
1752
  const result = {
1531
1753
  ...spec
@@ -1542,7 +1764,7 @@ const background_backgroundColor = (spec, context)=>{
1542
1764
  const datasetXY = (spec, context)=>{
1543
1765
  const { advancedVSeed, vseed } = context;
1544
1766
  const { encoding, analysis, datasetReshapeInfo } = advancedVSeed;
1545
- const { orderMapping = {} } = analysis ?? {};
1767
+ const orderMapping = analysis?.orderMapping || {};
1546
1768
  const angle = encoding[0]?.angle?.[0];
1547
1769
  const x = encoding[0]?.x?.[0];
1548
1770
  const group = encoding[0]?.group?.[0];
@@ -1587,7 +1809,7 @@ const progressive = (spec, context)=>{
1587
1809
  ...spec
1588
1810
  };
1589
1811
  const { advancedVSeed } = context;
1590
- const { dataset } = advancedVSeed;
1812
+ const { dataset = [] } = advancedVSeed;
1591
1813
  const size = dataset.length;
1592
1814
  if (size < 5000) return result;
1593
1815
  result.large = true;
@@ -1692,64 +1914,8 @@ const xBand = (spec, context)=>{
1692
1914
  };
1693
1915
  const ANNOTATION_Z_INDEX = 1000;
1694
1916
  const LINEAR_AXIS_INNER_OFFSET_TOP = 7;
1695
- const createNumFormatter = (format, locale = intl.getLocale())=>{
1696
- const { type = 'number', ratio = 1, symbol = '', thousandSeparator = true, prefix = '', suffix = '', fractionDigits = 2, significantDigits, roundingMode = 'halfExpand', roundingPriority = 'auto' } = format || {};
1697
- const numFormatterOptions = {
1698
- style: 'decimal',
1699
- notation: 'scientific' === type ? 'scientific' : 'standard',
1700
- roundingMode,
1701
- roundingPriority
1702
- };
1703
- if (isNumber(fractionDigits)) {
1704
- if (fractionDigits >= 0) {
1705
- numFormatterOptions.minimumFractionDigits = fractionDigits;
1706
- numFormatterOptions.maximumFractionDigits = fractionDigits;
1707
- }
1708
- }
1709
- if (isNumber(significantDigits) && significantDigits > 0) {
1710
- if (significantDigits > 0) {
1711
- numFormatterOptions.minimumSignificantDigits = significantDigits;
1712
- numFormatterOptions.maximumSignificantDigits = significantDigits;
1713
- }
1714
- }
1715
- const numFormatter = new Intl.NumberFormat(locale, numFormatterOptions);
1716
- return (value)=>{
1717
- let num = Number(value);
1718
- let typeSymbol = '';
1719
- if (Number.isNaN(num)) return num.toString();
1720
- if ('percent' === type) {
1721
- num *= 100;
1722
- typeSymbol = '%';
1723
- } else if ('permille' === type) {
1724
- num *= 1000;
1725
- typeSymbol = "\u2030";
1726
- } else if ('number' === type) num /= ratio || 1;
1727
- let numStr = numFormatter.format(num);
1728
- if (thousandSeparator) {
1729
- const parts = numStr.split('.');
1730
- parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ',');
1731
- numStr = parts.join('.');
1732
- }
1733
- return `${prefix}${numStr}${typeSymbol}${symbol}${suffix}`;
1734
- };
1735
- };
1736
- const autoNumFormatter = (value, locale = intl.getLocale())=>{
1737
- if (null == value) return String(value);
1738
- const num = Number(value);
1739
- if (Number.isNaN(num)) return String(value);
1740
- const numFormatterOptions = {
1741
- style: 'decimal',
1742
- notation: 'compact'
1743
- };
1744
- numFormatterOptions.minimumFractionDigits = 0;
1745
- numFormatterOptions.maximumFractionDigits = 2;
1746
- const numFormatter = new Intl.NumberFormat(locale, {
1747
- ...numFormatterOptions
1748
- });
1749
- return numFormatter.format(Number(value));
1750
- };
1751
- const createFormatter = (format)=>createNumFormatter(format);
1752
- const autoFormatter = (value, locale)=>autoNumFormatter(value, locale);
1917
+ const DUAL_AXIS_CHART_COLUMN_Z_INDEX = 1000;
1918
+ const DUAL_AXIS_CHART_NON_COLUMN_Z_INDEX = 1001;
1753
1919
  const yLinear = (spec, context)=>{
1754
1920
  const result = {
1755
1921
  ...spec
@@ -1952,7 +2118,11 @@ const verticalCrosshairLine = (spec, context)=>{
1952
2118
  const config = advancedVSeed.config?.[chartType]?.crosshairLine;
1953
2119
  if (!config) return result;
1954
2120
  if (!result.crosshair) result.crosshair = {};
1955
- const { visible = true, lineColor, labelColor, labelVisible, labelBackgroundColor } = config;
2121
+ const visible = config.visible || true;
2122
+ const lineColor = config.lineColor || void 0;
2123
+ const labelColor = config.labelColor || void 0;
2124
+ const labelVisible = config.labelVisible || void 0;
2125
+ const labelBackgroundColor = config.labelBackgroundColor || void 0;
1956
2126
  const crosshair = result.crosshair;
1957
2127
  crosshair.xField = {
1958
2128
  visible,
@@ -2239,7 +2409,12 @@ const pointStateDimensionHover = (spec)=>{
2239
2409
  ...point.state || {},
2240
2410
  dimension_hover: {
2241
2411
  scaleX: 1.4,
2242
- scaleY: 1.4
2412
+ scaleY: 1.4,
2413
+ outerBorder: {
2414
+ lineWidth: 4,
2415
+ strokeOpacity: 0.25,
2416
+ distance: 2
2417
+ }
2243
2418
  }
2244
2419
  }
2245
2420
  }
@@ -2342,7 +2517,7 @@ const annotationPoint_annotationPoint = (spec, context)=>{
2342
2517
  annotationPoint
2343
2518
  ];
2344
2519
  const markPoint = annotationPointList.flatMap((annotationPoint)=>{
2345
- const { selector: selectorPoint, text = '', textColor = '#ffffff', textFontSize = 12, textFontWeight = 400, textAlign = 'center', textBaseline = 'top', backgroundBorderColor, backgroundBorderRadius = 4, backgroundBorderWidth = 1, backgroundColor = '#212121', backgroundPadding = 2, backgroundVisible = true, offsetX = 0, offsetY = 0 } = annotationPoint;
2520
+ const { selector: selectorPoint, text = '', textColor = '#ffffff', textFontSize = 12, textFontWeight = 400, textAlign = 'center', textBaseline = 'top', textBackgroundBorderColor, textBackgroundBorderRadius = 4, textBackgroundBorderWidth = 1, textBackgroundColor = '#212121', textBackgroundPadding = 2, textBackgroundVisible = true, offsetX = 0, offsetY = 0 } = annotationPoint;
2346
2521
  const dataset = advancedVSeed.dataset.flat();
2347
2522
  const selectedData = selectorPoint ? dataset.filter((datum)=>selector_selector(datum, selectorPoint)) : [];
2348
2523
  return selectedData.map((datum)=>({
@@ -2371,20 +2546,20 @@ const annotationPoint_annotationPoint = (spec, context)=>{
2371
2546
  textAlign: textAlign,
2372
2547
  textBaseline: textBaseline,
2373
2548
  fill: textColor,
2374
- stroke: backgroundColor,
2549
+ stroke: textBackgroundColor,
2375
2550
  lineWidth: 1,
2376
2551
  fontSize: textFontSize,
2377
2552
  fontWeight: textFontWeight,
2378
2553
  dy: textFontSize
2379
2554
  },
2380
2555
  labelBackground: {
2381
- visible: backgroundVisible,
2382
- padding: backgroundPadding,
2556
+ visible: textBackgroundVisible,
2557
+ padding: textBackgroundPadding,
2383
2558
  style: {
2384
- cornerRadius: backgroundBorderRadius ?? 4,
2385
- fill: backgroundColor,
2386
- stroke: backgroundBorderColor,
2387
- lineWidth: backgroundBorderWidth,
2559
+ cornerRadius: textBackgroundBorderRadius ?? 4,
2560
+ fill: textBackgroundColor,
2561
+ stroke: textBackgroundBorderColor,
2562
+ lineWidth: textBackgroundBorderWidth,
2388
2563
  dy: textFontSize
2389
2564
  }
2390
2565
  }
@@ -2414,13 +2589,11 @@ const annotationVerticalLine_annotationVerticalLine = (spec, context)=>{
2414
2589
  insideEnd: 'insideEndTop'
2415
2590
  };
2416
2591
  const markLine = annotationVerticalLineList.flatMap((annotationVerticalLine)=>{
2417
- const { selector: selectorPoint, xValue, text = '', textPosition = 'insideEnd', textColor = '#ffffff', textFontSize = 12, textFontWeight = 400, textAlign = 'right', textBaseline = 'top', backgroundVisible = true, backgroundBorderColor = '#212121', backgroundColor = '#212121', backgroundBorderRadius = 4, backgroundBorderWidth = 1, backgroundPadding = 2, lineVisible = true, lineColor = '#212121', lineWidth = 1, lineStyle = 'dashed', offsetX = 0, offsetY = 0 } = annotationVerticalLine;
2592
+ 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;
2418
2593
  const dataset = advancedVSeed.dataset.flat();
2419
2594
  const generateOneMarkLine = (x)=>({
2420
2595
  x: x,
2421
2596
  zIndex: ANNOTATION_Z_INDEX,
2422
- offsetX,
2423
- offsetY,
2424
2597
  line: {
2425
2598
  style: {
2426
2599
  visible: lineVisible,
@@ -2440,10 +2613,10 @@ const annotationVerticalLine_annotationVerticalLine = (spec, context)=>{
2440
2613
  },
2441
2614
  label: {
2442
2615
  text: text,
2443
- position: positionMap[textPosition],
2616
+ position: positionMap[textPosition || 'insideEnd'],
2444
2617
  style: {
2445
2618
  visible: true,
2446
- stroke: backgroundColor,
2619
+ stroke: textBackgroundColor,
2447
2620
  lineWidth: 1,
2448
2621
  textAlign: textAlign,
2449
2622
  textBaseline: textBaseline,
@@ -2453,20 +2626,20 @@ const annotationVerticalLine_annotationVerticalLine = (spec, context)=>{
2453
2626
  dy: textFontSize
2454
2627
  },
2455
2628
  labelBackground: {
2456
- visible: backgroundVisible,
2457
- padding: backgroundPadding,
2629
+ visible: textBackgroundVisible,
2630
+ padding: textBackgroundPadding,
2458
2631
  style: {
2459
2632
  dy: textFontSize,
2460
- cornerRadius: backgroundBorderRadius ?? 4,
2461
- fill: backgroundColor,
2462
- stroke: backgroundBorderColor,
2463
- lineWidth: backgroundBorderWidth
2633
+ cornerRadius: textBackgroundBorderRadius ?? 4,
2634
+ fill: textBackgroundColor,
2635
+ stroke: textBackgroundBorderColor,
2636
+ lineWidth: textBackgroundBorderWidth
2464
2637
  }
2465
2638
  }
2466
2639
  },
2467
2640
  endSymbol: {
2468
2641
  visible: true,
2469
- size: 10 + lineWidth,
2642
+ size: 10 + (lineWidth || 1),
2470
2643
  style: {
2471
2644
  dy: 4,
2472
2645
  fill: lineColor
@@ -2513,12 +2686,10 @@ const annotationHorizontalLine_annotationHorizontalLine = (spec, context)=>{
2513
2686
  insideEnd: 'insideEndTop'
2514
2687
  };
2515
2688
  const markLine = annotationVerticalLineList.flatMap((annotationVerticalLine)=>{
2516
- 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, backgroundVisible = true, backgroundColor = '#212121', backgroundBorderColor = '#212121', backgroundBorderRadius = 4, backgroundBorderWidth = 1, backgroundPadding = 2, offsetX = 0, offsetY = 0 } = annotationVerticalLine;
2689
+ 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;
2517
2690
  const dataset = advancedVSeed.dataset.flat();
2518
2691
  const generateOneMarkLine = (y)=>({
2519
2692
  y,
2520
- offsetX,
2521
- offsetY,
2522
2693
  zIndex: ANNOTATION_Z_INDEX,
2523
2694
  line: {
2524
2695
  style: {
@@ -2539,11 +2710,11 @@ const annotationHorizontalLine_annotationHorizontalLine = (spec, context)=>{
2539
2710
  },
2540
2711
  label: {
2541
2712
  text: text,
2542
- position: positionMap[textPosition],
2713
+ position: positionMap[textPosition || 'insideEnd'],
2543
2714
  style: {
2544
2715
  visible: true,
2545
2716
  dy: textFontSize,
2546
- stroke: backgroundColor,
2717
+ stroke: textBackgroundColor,
2547
2718
  lineWidth: 1,
2548
2719
  textAlign: textAlign,
2549
2720
  textBaseline: textBaseline,
@@ -2552,20 +2723,20 @@ const annotationHorizontalLine_annotationHorizontalLine = (spec, context)=>{
2552
2723
  fontWeight: textFontWeight
2553
2724
  },
2554
2725
  labelBackground: {
2555
- visible: backgroundVisible,
2556
- padding: backgroundPadding,
2726
+ visible: textBackgroundVisible,
2727
+ padding: textBackgroundPadding,
2557
2728
  style: {
2558
2729
  dy: textFontSize,
2559
- cornerRadius: backgroundBorderRadius ?? 4,
2560
- fill: backgroundColor,
2561
- stroke: backgroundBorderColor,
2562
- lineWidth: backgroundBorderWidth
2730
+ cornerRadius: textBackgroundBorderRadius ?? 4,
2731
+ fill: textBackgroundColor,
2732
+ stroke: textBackgroundBorderColor,
2733
+ lineWidth: textBackgroundBorderWidth
2563
2734
  }
2564
2735
  }
2565
2736
  },
2566
2737
  endSymbol: {
2567
2738
  visible: true,
2568
- size: 10 + lineWidth,
2739
+ size: 10 + (lineWidth || 1),
2569
2740
  style: {
2570
2741
  dx: -4,
2571
2742
  fill: lineColor
@@ -2614,14 +2785,14 @@ const annotationArea_annotationArea = (spec, context)=>{
2614
2785
  right: 'insideRight'
2615
2786
  };
2616
2787
  const markArea = annotationAreaList.flatMap((annotationArea)=>{
2617
- const { selector: selectorPoint, text = '', textPosition = 'top', textColor = '#ffffff', textFontSize = 12, textFontWeight = 400, textAlign = 'center', textBaseline = 'top', backgroundVisible = true, backgroundColor = '#191d24', backgroundBorderColor = '#191d24', backgroundBorderWidth = 1, backgroundBorderRadius = 4, backgroundPadding = 4, areaColor = '#888888', areaColorOpacity = 0.15, areaBorderColor = '#888888', areaBorderRadius = 4, areaBorderWidth = 1, outerPadding = 4, offsetX = 0, offsetY = 0 } = annotationArea;
2788
+ 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;
2618
2789
  const dataset = advancedVSeed.dataset.flat();
2619
2790
  const selectedData = selectorPoint ? dataset.filter((datum)=>selector_selector(datum, selectorPoint)) : [];
2791
+ const labelPosition = positionMap[textPosition || 'top'];
2792
+ const isBottom = labelPosition.toLocaleLowerCase().includes('bottom');
2620
2793
  return {
2621
2794
  zIndex: ANNOTATION_Z_INDEX,
2622
2795
  regionRelative: true,
2623
- offsetX,
2624
- offsetY,
2625
2796
  positions: (data, context)=>{
2626
2797
  const positionData = data.filter((item)=>selectedData.some((datum)=>isSubset(datum, item)));
2627
2798
  const xyList = positionData.map((datum)=>context.dataToPosition(datum));
@@ -2629,8 +2800,8 @@ const annotationArea_annotationArea = (spec, context)=>{
2629
2800
  const xAxisHelper = context.getXAxisHelper();
2630
2801
  if ('function' == typeof xAxisHelper?.getBandwidth) {
2631
2802
  const yScale = yAxisHelper.getScale();
2632
- const minX = Math.min(...xyList.map((item)=>item.x)) - outerPadding;
2633
- const maxX = Math.max(...xyList.map((item)=>item.x)) + outerPadding;
2803
+ const minX = Math.min(...xyList.map((item)=>item.x)) - (outerPadding || 4);
2804
+ const maxX = Math.max(...xyList.map((item)=>item.x)) + (outerPadding || 4);
2634
2805
  const minY = Math.min(...yScale.range());
2635
2806
  const maxY = Math.max(...yScale.range());
2636
2807
  return [
@@ -2654,8 +2825,8 @@ const annotationArea_annotationArea = (spec, context)=>{
2654
2825
  }
2655
2826
  if ('function' == typeof yAxisHelper?.getBandwidth) {
2656
2827
  const xScale = xAxisHelper.getScale();
2657
- const minY = Math.min(...xyList.map((item)=>item.y)) - outerPadding;
2658
- const maxY = Math.max(...xyList.map((item)=>item.y)) + outerPadding;
2828
+ const minY = Math.min(...xyList.map((item)=>item.y)) - (outerPadding || 4);
2829
+ const maxY = Math.max(...xyList.map((item)=>item.y)) + (outerPadding || 4);
2659
2830
  const minX = Math.min(...xScale.range());
2660
2831
  const maxX = Math.max(...xScale.range());
2661
2832
  return [
@@ -2680,28 +2851,28 @@ const annotationArea_annotationArea = (spec, context)=>{
2680
2851
  return [];
2681
2852
  },
2682
2853
  label: {
2683
- position: positionMap[textPosition],
2854
+ position: labelPosition,
2684
2855
  visible: true,
2685
2856
  text: text,
2686
2857
  style: {
2687
- dy: textFontSize,
2858
+ dy: isBottom ? 2 * -(textFontSize || 12) : textFontSize,
2688
2859
  textAlign: textAlign,
2689
2860
  textBaseline: textBaseline,
2690
2861
  fill: textColor,
2691
- stroke: backgroundColor,
2862
+ stroke: textBackgroundColor,
2692
2863
  lineWidth: 1,
2693
2864
  fontSize: textFontSize,
2694
2865
  fontWeight: textFontWeight
2695
2866
  },
2696
2867
  labelBackground: {
2697
- visible: backgroundVisible,
2698
- padding: backgroundPadding,
2868
+ visible: textBackgroundVisible,
2869
+ padding: textBackgroundPadding,
2699
2870
  style: {
2700
- dy: textFontSize,
2701
- cornerRadius: backgroundBorderRadius ?? 4,
2702
- fill: backgroundColor,
2703
- stroke: backgroundBorderColor,
2704
- lineWidth: backgroundBorderWidth
2871
+ dy: isBottom ? 2 * -(textFontSize || 12) : textFontSize,
2872
+ cornerRadius: textBackgroundBorderRadius ?? 4,
2873
+ fill: textBackgroundColor,
2874
+ stroke: textBackgroundBorderColor,
2875
+ lineWidth: textBackgroundBorderWidth
2705
2876
  }
2706
2877
  }
2707
2878
  },
@@ -3041,11 +3212,11 @@ const pivotDiscreteLegend = (spec, context)=>{
3041
3212
  label: d,
3042
3213
  shape: {
3043
3214
  outerBorder: border ? {
3044
- stroke: colorScheme?.[index],
3215
+ stroke: colorScheme?.[index % colorScheme.length],
3045
3216
  distance: 3,
3046
3217
  lineWidth: 1
3047
3218
  } : void 0,
3048
- fill: colorScheme?.[index]
3219
+ fill: colorScheme?.[index % colorScheme.length]
3049
3220
  }
3050
3221
  })),
3051
3222
  item: {
@@ -3343,7 +3514,11 @@ const verticalCrosshairRect = (spec, context)=>{
3343
3514
  const config = advancedVSeed.config?.[chartType]?.crosshairRect;
3344
3515
  if (!config) return result;
3345
3516
  if (!result.crosshair) result.crosshair = {};
3346
- const { visible = true, rectColor, labelColor, labelVisible, labelBackgroundColor } = config;
3517
+ const visible = config.visible || true;
3518
+ const rectColor = config.rectColor || void 0;
3519
+ const labelColor = config.labelColor || void 0;
3520
+ const labelVisible = config.labelVisible || false;
3521
+ const labelBackgroundColor = config.labelBackgroundColor || void 0;
3347
3522
  const crosshair = result.crosshair;
3348
3523
  crosshair.xField = {
3349
3524
  visible,
@@ -3372,14 +3547,13 @@ const verticalCrosshairRect = (spec, context)=>{
3372
3547
  };
3373
3548
  const barStyle_barStyle = (spec, context)=>{
3374
3549
  const { advancedVSeed } = context;
3375
- const { markStyle, dataset } = advancedVSeed;
3550
+ const { markStyle, dataset = [] } = advancedVSeed;
3376
3551
  const { barStyle } = markStyle;
3377
3552
  const showStroke = dataset.length <= 100;
3378
3553
  const result = {
3379
3554
  ...spec,
3380
3555
  bar: {
3381
3556
  style: {
3382
- stroke: '#fff',
3383
3557
  lineWidth: showStroke ? 1 : 0
3384
3558
  },
3385
3559
  state: {
@@ -3455,14 +3629,12 @@ const annotationAreaBand = (spec, context)=>{
3455
3629
  right: 'insideRight'
3456
3630
  };
3457
3631
  const markArea = annotationAreaList.flatMap((annotationArea)=>{
3458
- const { selector: selectorPoint, text = '', textPosition = 'top', textColor = '#ffffff', textFontSize = 12, textFontWeight = 400, textAlign = 'center', textBaseline = 'top', backgroundVisible = true, backgroundColor = '#191d24', backgroundBorderColor = '#191d24', backgroundBorderWidth = 1, backgroundBorderRadius = 4, backgroundPadding = 4, areaColor = '#888888', areaColorOpacity = 0.15, areaBorderColor = '#888888', areaBorderRadius = 4, areaBorderWidth = 1, outerPadding = 4, offsetX = 0, offsetY = 0 } = annotationArea;
3632
+ 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;
3459
3633
  const dataset = advancedVSeed.dataset.flat();
3460
3634
  const selectedData = selectorPoint ? dataset.filter((datum)=>selector_selector(datum, selectorPoint)) : [];
3461
3635
  return {
3462
3636
  zIndex: ANNOTATION_Z_INDEX,
3463
3637
  regionRelative: true,
3464
- offsetX,
3465
- offsetY,
3466
3638
  positions: (data, context)=>{
3467
3639
  const positionData = data.filter((item)=>selectedData.some((datum)=>isSubset(datum, item)));
3468
3640
  const xyList = positionData.map((datum)=>context.dataToPosition(datum));
@@ -3472,8 +3644,8 @@ const annotationAreaBand = (spec, context)=>{
3472
3644
  const depth = context.fieldX.length ?? 0;
3473
3645
  const xBandWidth = xAxisHelper?.getBandwidth?.(depth - 1);
3474
3646
  const yScale = yAxisHelper.getScale();
3475
- const minX = Math.min(...xyList.map((item)=>item.x)) - outerPadding;
3476
- const maxX = Math.max(...xyList.map((item)=>item.x)) + xBandWidth + outerPadding;
3647
+ const minX = Math.min(...xyList.map((item)=>item.x)) - (outerPadding || 4);
3648
+ const maxX = Math.max(...xyList.map((item)=>item.x)) + xBandWidth + (outerPadding || 4);
3477
3649
  const minY = Math.min(...yScale.range());
3478
3650
  const maxY = Math.max(...yScale.range());
3479
3651
  return [
@@ -3499,8 +3671,8 @@ const annotationAreaBand = (spec, context)=>{
3499
3671
  const depth = context.fieldY.length ?? 0;
3500
3672
  const yBandWidth = yAxisHelper?.getBandwidth?.(depth - 1);
3501
3673
  const xScale = xAxisHelper.getScale();
3502
- const minY = Math.min(...xyList.map((item)=>item.y)) - outerPadding;
3503
- const maxY = Math.max(...xyList.map((item)=>item.y)) + yBandWidth + outerPadding;
3674
+ const minY = Math.min(...xyList.map((item)=>item.y)) - (outerPadding || 4);
3675
+ const maxY = Math.max(...xyList.map((item)=>item.y)) + yBandWidth + (outerPadding || 4);
3504
3676
  const minX = Math.min(...xScale.range());
3505
3677
  const maxX = Math.max(...xScale.range());
3506
3678
  return [
@@ -3525,28 +3697,28 @@ const annotationAreaBand = (spec, context)=>{
3525
3697
  return [];
3526
3698
  },
3527
3699
  label: {
3528
- position: positionMap[textPosition],
3700
+ position: positionMap[textPosition || 'top'],
3529
3701
  visible: true,
3530
3702
  text: text,
3531
3703
  style: {
3532
3704
  dy: textFontSize,
3533
3705
  textAlign: textAlign,
3534
3706
  textBaseline: textBaseline,
3535
- stroke: backgroundColor,
3707
+ stroke: textBackgroundColor,
3536
3708
  lineWidth: 1,
3537
3709
  fill: textColor,
3538
3710
  fontSize: textFontSize,
3539
3711
  fontWeight: textFontWeight
3540
3712
  },
3541
3713
  labelBackground: {
3542
- visible: backgroundVisible,
3543
- padding: backgroundPadding,
3714
+ visible: textBackgroundVisible,
3715
+ padding: textBackgroundPadding,
3544
3716
  style: {
3545
3717
  dy: textFontSize,
3546
- cornerRadius: backgroundBorderRadius ?? 4,
3547
- fill: backgroundColor,
3548
- stroke: backgroundBorderColor,
3549
- lineWidth: backgroundBorderWidth
3718
+ cornerRadius: textBackgroundBorderRadius ?? 4,
3719
+ fill: textBackgroundColor,
3720
+ stroke: textBackgroundBorderColor,
3721
+ lineWidth: textBackgroundBorderWidth
3550
3722
  }
3551
3723
  }
3552
3724
  },
@@ -3876,7 +4048,7 @@ const initBar = (spec, context)=>{
3876
4048
  const datasetYX = (spec, context)=>{
3877
4049
  const { advancedVSeed, vseed } = context;
3878
4050
  const { encoding, analysis, datasetReshapeInfo } = advancedVSeed;
3879
- const { orderMapping = {} } = analysis ?? {};
4051
+ const orderMapping = analysis?.orderMapping || {};
3880
4052
  const angle = encoding[0]?.angle?.[0];
3881
4053
  const y = encoding[0]?.y?.[0];
3882
4054
  const group = encoding[0]?.group?.[0];
@@ -4102,7 +4274,11 @@ const horizontalCrosshairRect = (spec, context)=>{
4102
4274
  const config = advancedVSeed.config?.[chartType]?.crosshairRect;
4103
4275
  if (!config) return result;
4104
4276
  if (!result.crosshair) result.crosshair = {};
4105
- const { visible = true, rectColor, labelColor, labelVisible, labelBackgroundColor } = config;
4277
+ const visible = config.visible || true;
4278
+ const rectColor = config.rectColor || void 0;
4279
+ const labelColor = config.labelColor || void 0;
4280
+ const labelVisible = config.labelVisible || false;
4281
+ const labelBackgroundColor = config.labelBackgroundColor || void 0;
4106
4282
  const crosshair = result.crosshair;
4107
4283
  crosshair.yField = {
4108
4284
  visible,
@@ -4821,6 +4997,35 @@ const series = (...args)=>{
4821
4997
  return result;
4822
4998
  };
4823
4999
  };
5000
+ const seriesDualAxis = (...args)=>{
5001
+ const result = {
5002
+ type: 'common',
5003
+ padding: 0,
5004
+ region: [
5005
+ {
5006
+ clip: true
5007
+ }
5008
+ ]
5009
+ };
5010
+ const createDualContext = (context, index)=>{
5011
+ const { advancedVSeed } = context;
5012
+ const dataset = advancedVSeed.dataset[index];
5013
+ return {
5014
+ ...context,
5015
+ advancedVSeed: {
5016
+ ...advancedVSeed,
5017
+ dataset: dataset
5018
+ }
5019
+ };
5020
+ };
5021
+ return (_, context)=>{
5022
+ result.series = args.map((pipeline, index)=>{
5023
+ const seriesContext = createDualContext(context, index);
5024
+ return execPipeline(pipeline, seriesContext, {});
5025
+ });
5026
+ return result;
5027
+ };
5028
+ };
4824
5029
  const initAreaRange = (spec, context)=>{
4825
5030
  const result = {
4826
5031
  ...spec
@@ -5250,7 +5455,11 @@ const horizontalCrosshairLine = (spec, context)=>{
5250
5455
  const config = advancedVSeed.config?.[chartType]?.crosshairLine;
5251
5456
  if (!config) return result;
5252
5457
  if (!result.crosshair) result.crosshair = {};
5253
- const { visible = true, lineColor, labelColor, labelVisible, labelBackgroundColor } = config;
5458
+ const visible = config.visible || true;
5459
+ const lineColor = config.lineColor || void 0;
5460
+ const labelColor = config.labelColor || void 0;
5461
+ const labelVisible = config.labelVisible || void 0;
5462
+ const labelBackgroundColor = config.labelBackgroundColor || void 0;
5254
5463
  const crosshair = result.crosshair;
5255
5464
  crosshair.yField = {
5256
5465
  visible,
@@ -5500,6 +5709,7 @@ const dualAxisConfig = (advancedVSeed, context)=>{
5500
5709
  'legend',
5501
5710
  'tooltip',
5502
5711
  'dualChartType',
5712
+ 'alignTicks',
5503
5713
  'primaryYAxis',
5504
5714
  'secondaryYAxis',
5505
5715
  'crosshairLine'
@@ -5652,7 +5862,8 @@ const initDualAxisSecondary = (spec, context)=>{
5652
5862
  };
5653
5863
  const dualChartTypePrimary = (spec, context)=>{
5654
5864
  const result = {
5655
- ...spec
5865
+ ...spec,
5866
+ zIndex: DUAL_AXIS_CHART_NON_COLUMN_Z_INDEX
5656
5867
  };
5657
5868
  const { advancedVSeed, vseed } = context;
5658
5869
  const { chartType } = vseed;
@@ -5663,12 +5874,16 @@ const dualChartTypePrimary = (spec, context)=>{
5663
5874
  secondary: 'line'
5664
5875
  };
5665
5876
  const primary = Array.isArray(config) ? config[index].primary || config[0].primary : config.primary;
5666
- switch(primary){
5877
+ const secondary = Array.isArray(config) ? config[index].secondary || config[0].secondary : config.secondary;
5878
+ const bothColumn = 'column' === primary && 'column' === secondary;
5879
+ const type = bothColumn ? 'columnParallel' : primary;
5880
+ switch(type){
5667
5881
  case 'line':
5668
5882
  result.type = 'line';
5669
5883
  break;
5670
5884
  case 'column':
5671
5885
  result.type = 'bar';
5886
+ result.zIndex = DUAL_AXIS_CHART_COLUMN_Z_INDEX;
5672
5887
  break;
5673
5888
  case 'columnParallel':
5674
5889
  {
@@ -5679,6 +5894,7 @@ const dualChartTypePrimary = (spec, context)=>{
5679
5894
  datasetReshapeInfo[0].unfoldInfo.groupId
5680
5895
  ];
5681
5896
  columnSpec.type = 'bar';
5897
+ result.zIndex = DUAL_AXIS_CHART_COLUMN_Z_INDEX;
5682
5898
  break;
5683
5899
  }
5684
5900
  case 'columnPercent':
@@ -5702,7 +5918,8 @@ const dualChartTypePrimary = (spec, context)=>{
5702
5918
  };
5703
5919
  const dualChartTypeSecondary = (spec, context)=>{
5704
5920
  const result = {
5705
- ...spec
5921
+ ...spec,
5922
+ zIndex: DUAL_AXIS_CHART_NON_COLUMN_Z_INDEX
5706
5923
  };
5707
5924
  const { advancedVSeed, vseed } = context;
5708
5925
  const { chartType } = vseed;
@@ -5712,13 +5929,17 @@ const dualChartTypeSecondary = (spec, context)=>{
5712
5929
  secondary: 'line'
5713
5930
  };
5714
5931
  const index = datasetReshapeInfo[0].index;
5932
+ const primary = Array.isArray(config) ? config[index].primary || config[0].primary : config.primary;
5715
5933
  const secondary = Array.isArray(config) ? config[index].secondary || config[0].secondary : config.secondary;
5716
- switch(secondary){
5934
+ const bothColumn = 'column' === primary && 'column' === secondary;
5935
+ const type = bothColumn ? 'columnParallel' : secondary;
5936
+ switch(type){
5717
5937
  case 'line':
5718
5938
  result.type = 'line';
5719
5939
  break;
5720
5940
  case 'column':
5721
5941
  result.type = 'bar';
5942
+ result.zIndex = DUAL_AXIS_CHART_COLUMN_Z_INDEX;
5722
5943
  break;
5723
5944
  case 'columnParallel':
5724
5945
  {
@@ -5729,6 +5950,7 @@ const dualChartTypeSecondary = (spec, context)=>{
5729
5950
  datasetReshapeInfo[0].unfoldInfo.groupId
5730
5951
  ];
5731
5952
  columnSpec.type = 'bar';
5953
+ result.zIndex = DUAL_AXIS_CHART_COLUMN_Z_INDEX;
5732
5954
  break;
5733
5955
  }
5734
5956
  case 'columnPercent':
@@ -5753,7 +5975,7 @@ const dualChartTypeSecondary = (spec, context)=>{
5753
5975
  const datasetPrimary = (spec, context)=>{
5754
5976
  const { advancedVSeed, vseed } = context;
5755
5977
  const { encoding, analysis, datasetReshapeInfo } = advancedVSeed;
5756
- const { orderMapping = {} } = analysis ?? {};
5978
+ const orderMapping = analysis?.orderMapping || {};
5757
5979
  const x = encoding[0]?.x?.[0];
5758
5980
  const group = encoding[0]?.group?.[0];
5759
5981
  const id = datasetReshapeInfo[0].id;
@@ -5784,7 +6006,7 @@ const datasetPrimary = (spec, context)=>{
5784
6006
  ...spec,
5785
6007
  data: {
5786
6008
  id: `${id}-primary-dataset`,
5787
- values: isPivotChart(vseed) ? void 0 : advancedVSeed.dataset[0],
6009
+ values: isPivotChart(vseed) ? void 0 : advancedVSeed.dataset,
5788
6010
  fields: fields
5789
6011
  }
5790
6012
  };
@@ -5792,7 +6014,7 @@ const datasetPrimary = (spec, context)=>{
5792
6014
  const datasetSecondary = (spec, context)=>{
5793
6015
  const { advancedVSeed, vseed } = context;
5794
6016
  const { encoding, analysis, datasetReshapeInfo } = advancedVSeed;
5795
- const { orderMapping = {} } = analysis ?? {};
6017
+ const orderMapping = analysis?.orderMapping || {};
5796
6018
  const x = encoding[0]?.x?.[0];
5797
6019
  const group = encoding[0]?.group?.[0];
5798
6020
  const id = datasetReshapeInfo[0].id;
@@ -5823,7 +6045,7 @@ const datasetSecondary = (spec, context)=>{
5823
6045
  ...spec,
5824
6046
  data: {
5825
6047
  id: `${id}-secondary-dataset`,
5826
- values: isPivotChart(vseed) ? void 0 : advancedVSeed.dataset[1],
6048
+ values: isPivotChart(vseed) ? void 0 : advancedVSeed.dataset,
5827
6049
  fields: fields
5828
6050
  }
5829
6051
  };
@@ -6067,12 +6289,18 @@ const yLinearPrimary = (spec, context)=>{
6067
6289
  const { locale, datasetReshapeInfo } = advancedVSeed;
6068
6290
  const index = datasetReshapeInfo[0].index;
6069
6291
  const primaryYAxis = advancedVSeed.config?.[chartType]?.primaryYAxis;
6070
- const config = Array.isArray(primaryYAxis) ? primaryYAxis[index] || primaryYAxis[0] : primaryYAxis;
6292
+ const yAxisConfig = Array.isArray(primaryYAxis) ? primaryYAxis[index] || primaryYAxis[0] : primaryYAxis;
6293
+ const alignTicks = advancedVSeed.config?.[chartType]?.alignTicks;
6294
+ const alignTicksConfig = Array.isArray(alignTicks) ? alignTicks[index] || alignTicks[0] : alignTicks;
6071
6295
  if (datasetReshapeInfo[0].foldInfoList?.[0] && isEmpty(datasetReshapeInfo[0].foldInfoList[0].foldMap)) return result;
6072
6296
  const id = `${datasetReshapeInfo[0].id}-primary-axis`;
6073
- const seriesId = `${datasetReshapeInfo[0].id}-primary-series`;
6297
+ const seriesIds = [
6298
+ `${datasetReshapeInfo[0].id}-primary-series`,
6299
+ `${datasetReshapeInfo[0].id}-secondary-series`
6300
+ ];
6301
+ const seriesId = alignTicksConfig ? seriesIds : seriesIds[0];
6074
6302
  if (!result.axes) result.axes = [];
6075
- if (!config) {
6303
+ if (!yAxisConfig) {
6076
6304
  result.axes = [
6077
6305
  ...result.axes,
6078
6306
  {
@@ -6080,26 +6308,16 @@ const yLinearPrimary = (spec, context)=>{
6080
6308
  id,
6081
6309
  seriesId,
6082
6310
  type: 'linear',
6083
- orient: 'left',
6084
- sync: {
6085
- axisId: `${datasetReshapeInfo[0].id}-secondary-axis`,
6086
- tickAlign: false,
6087
- zeroAlign: true
6088
- }
6311
+ orient: 'left'
6089
6312
  }
6090
6313
  ];
6091
6314
  return result;
6092
6315
  }
6093
- const { visible = true, label, tick, title, grid, line, zero, nice, inverse, max, min, log, logBase = 10 } = config;
6316
+ const { visible = true, label, tick, title, grid, line, zero, nice, inverse, max, min, log, logBase = 10 } = yAxisConfig;
6094
6317
  const linearAxis = {
6095
6318
  visible,
6096
6319
  id,
6097
6320
  seriesId,
6098
- sync: {
6099
- axisId: `${datasetReshapeInfo[0].id}-secondary-axis`,
6100
- tickAlign: false,
6101
- zeroAlign: true
6102
- },
6103
6321
  type: log ? 'log' : 'linear',
6104
6322
  base: logBase,
6105
6323
  orient: 'left',
@@ -6168,12 +6386,22 @@ const yLinearSecondary = (spec, context)=>{
6168
6386
  const { locale, datasetReshapeInfo } = advancedVSeed;
6169
6387
  const index = datasetReshapeInfo[0].index;
6170
6388
  const secondaryYAxis = advancedVSeed.config?.[chartType]?.secondaryYAxis;
6171
- const config = Array.isArray(secondaryYAxis) ? secondaryYAxis[index] || secondaryYAxis[0] : secondaryYAxis;
6389
+ const yAxisConfig = Array.isArray(secondaryYAxis) ? secondaryYAxis[index] || secondaryYAxis[0] : secondaryYAxis;
6390
+ const alignTicks = advancedVSeed.config?.[chartType]?.alignTicks;
6391
+ const alignTicksConfig = Array.isArray(alignTicks) ? alignTicks[index] || alignTicks[0] : alignTicks;
6172
6392
  if (isNullish(datasetReshapeInfo[0].foldInfoList?.[1])) return result;
6393
+ const sync = {
6394
+ axisId: `${datasetReshapeInfo[0].id}-primary-axis`,
6395
+ zeroAlign: true
6396
+ };
6173
6397
  const id = `${datasetReshapeInfo[0].id}-secondary-axis`;
6174
- const seriesId = `${datasetReshapeInfo[0].id}-secondary-series`;
6398
+ const seriesIds = [
6399
+ `${datasetReshapeInfo[0].id}-primary-series`,
6400
+ `${datasetReshapeInfo[0].id}-secondary-series`
6401
+ ];
6402
+ const seriesId = alignTicksConfig ? seriesIds : seriesIds[1];
6175
6403
  if (!result.axes) result.axes = [];
6176
- if (!config) {
6404
+ if (!yAxisConfig) {
6177
6405
  result.axes = [
6178
6406
  ...result.axes,
6179
6407
  {
@@ -6181,16 +6409,18 @@ const yLinearSecondary = (spec, context)=>{
6181
6409
  id,
6182
6410
  seriesId,
6183
6411
  type: 'linear',
6184
- orient: 'right'
6412
+ orient: 'right',
6413
+ sync
6185
6414
  }
6186
6415
  ];
6187
6416
  return result;
6188
6417
  }
6189
- const { visible = true, label, tick, title, grid, line, zero, nice, inverse, max, min, log, logBase = 10 } = config;
6418
+ const { visible = true, label, tick, title, grid, line, zero, nice, inverse, max, min, log, logBase = 10 } = yAxisConfig;
6190
6419
  const linearAxis = {
6191
6420
  visible,
6192
6421
  id,
6193
6422
  seriesId,
6423
+ sync,
6194
6424
  type: log ? 'log' : 'linear',
6195
6425
  base: logBase,
6196
6426
  orient: 'right',
@@ -6251,7 +6481,7 @@ const yLinearSecondary = (spec, context)=>{
6251
6481
  return result;
6252
6482
  };
6253
6483
  const dualAxis = [
6254
- series([
6484
+ seriesDualAxis([
6255
6485
  initDualAxisPrimary,
6256
6486
  dualChartTypePrimary,
6257
6487
  datasetPrimary,
@@ -6294,7 +6524,7 @@ const pivotDualAxis = [
6294
6524
  pivotIndicators_pivotIndicatorsAsRow,
6295
6525
  datasetPivot,
6296
6526
  pivotIndicators_pivotIndicators([
6297
- series([
6527
+ seriesDualAxis([
6298
6528
  initDualAxisPrimary,
6299
6529
  dualChartTypePrimary,
6300
6530
  datasetPrimary,
@@ -7688,7 +7918,8 @@ const lightTheme = ()=>{
7688
7918
  hoverHeaderBackgroundColor: '#D9DDE4',
7689
7919
  hoverHeaderInlineBackgroundColor: '#D9DDE455',
7690
7920
  selectedBorderColor: '#4080ff',
7691
- selectedBackgroundColor: '#bedaff33'
7921
+ selectedBackgroundColor: '#bedaff33',
7922
+ backgroundColor: 'transparent'
7692
7923
  };
7693
7924
  return {
7694
7925
  config: {
@@ -7708,8 +7939,8 @@ const lightTheme = ()=>{
7708
7939
  stackCornerRadius: [
7709
7940
  4,
7710
7941
  4,
7711
- 0,
7712
- 0
7942
+ 4,
7943
+ 4
7713
7944
  ]
7714
7945
  },
7715
7946
  columnParallel: {
@@ -7720,8 +7951,8 @@ const lightTheme = ()=>{
7720
7951
  stackCornerRadius: [
7721
7952
  4,
7722
7953
  4,
7723
- 0,
7724
- 0
7954
+ 4,
7955
+ 4
7725
7956
  ]
7726
7957
  },
7727
7958
  columnPercent: {
@@ -7732,8 +7963,8 @@ const lightTheme = ()=>{
7732
7963
  stackCornerRadius: [
7733
7964
  4,
7734
7965
  4,
7735
- 0,
7736
- 0
7966
+ 4,
7967
+ 4
7737
7968
  ]
7738
7969
  },
7739
7970
  bar: {
@@ -7742,10 +7973,10 @@ const lightTheme = ()=>{
7742
7973
  yAxis: barBandAxis,
7743
7974
  crosshairRect,
7744
7975
  stackCornerRadius: [
7745
- 0,
7746
7976
  4,
7747
7977
  4,
7748
- 0
7978
+ 4,
7979
+ 4
7749
7980
  ]
7750
7981
  },
7751
7982
  barParallel: {
@@ -7754,10 +7985,10 @@ const lightTheme = ()=>{
7754
7985
  yAxis: barBandAxis,
7755
7986
  crosshairRect,
7756
7987
  stackCornerRadius: [
7757
- 0,
7758
7988
  4,
7759
7989
  4,
7760
- 0
7990
+ 4,
7991
+ 4
7761
7992
  ]
7762
7993
  },
7763
7994
  barPercent: {
@@ -7766,10 +7997,10 @@ const lightTheme = ()=>{
7766
7997
  yAxis: barBandAxis,
7767
7998
  crosshairRect,
7768
7999
  stackCornerRadius: [
7769
- 0,
7770
8000
  4,
7771
8001
  4,
7772
- 0
8002
+ 4,
8003
+ 4
7773
8004
  ]
7774
8005
  },
7775
8006
  area: {
@@ -8046,8 +8277,8 @@ const darkTheme = ()=>{
8046
8277
  stackCornerRadius: [
8047
8278
  4,
8048
8279
  4,
8049
- 0,
8050
- 0
8280
+ 4,
8281
+ 4
8051
8282
  ]
8052
8283
  },
8053
8284
  columnParallel: {
@@ -8058,8 +8289,8 @@ const darkTheme = ()=>{
8058
8289
  stackCornerRadius: [
8059
8290
  4,
8060
8291
  4,
8061
- 0,
8062
- 0
8292
+ 4,
8293
+ 4
8063
8294
  ]
8064
8295
  },
8065
8296
  columnPercent: {
@@ -8070,8 +8301,8 @@ const darkTheme = ()=>{
8070
8301
  stackCornerRadius: [
8071
8302
  4,
8072
8303
  4,
8073
- 0,
8074
- 0
8304
+ 4,
8305
+ 4
8075
8306
  ]
8076
8307
  },
8077
8308
  bar: {
@@ -8092,10 +8323,10 @@ const darkTheme = ()=>{
8092
8323
  yAxis: barBandAxis,
8093
8324
  crosshairRect: crosshairRect,
8094
8325
  stackCornerRadius: [
8095
- 0,
8096
8326
  4,
8097
8327
  4,
8098
- 0
8328
+ 4,
8329
+ 4
8099
8330
  ]
8100
8331
  },
8101
8332
  barPercent: {
@@ -8104,10 +8335,10 @@ const darkTheme = ()=>{
8104
8335
  yAxis: barBandAxis,
8105
8336
  crosshairRect: crosshairRect,
8106
8337
  stackCornerRadius: [
8107
- 0,
8108
8338
  4,
8109
8339
  4,
8110
- 0
8340
+ 4,
8341
+ 4
8111
8342
  ]
8112
8343
  },
8113
8344
  area: {
@@ -8244,6 +8475,9 @@ const updateAdvanced = (chartType, advancedPipe)=>{
8244
8475
  const updateSpec = (chartType, specPipe)=>{
8245
8476
  Builder._customSpecPipe[chartType] = specPipe;
8246
8477
  };
8478
+ const isDimension = (dimension)=>!('children' in dimension);
8479
+ const isDimensionGroup = (dimension)=>'children' in dimension;
8480
+ const isDimensions = (dimensions)=>dimensions.every(isDimension);
8247
8481
  const zChartType = z["enum"]([
8248
8482
  'table',
8249
8483
  'pivotTable',
@@ -8370,117 +8604,117 @@ const zDatasetReshapeInfo = z.array(z.object({
8370
8604
  id: z.string(),
8371
8605
  index: z.number(),
8372
8606
  foldInfo: zFoldInfo,
8373
- foldInfoList: z.array(zFoldInfo).optional(),
8607
+ foldInfoList: z.array(zFoldInfo).nullish(),
8374
8608
  unfoldInfo: zUnfoldInfo
8375
8609
  }));
8376
8610
  const zEncoding = z.array(z.object({
8377
- x: z.array(z.string()).optional(),
8378
- y: z.array(z.string()).optional(),
8379
- color: z.array(z.string()).optional(),
8380
- group: z.array(z.string()).optional(),
8381
- angle: z.array(z.string()).optional(),
8382
- radius: z.array(z.string()).optional(),
8383
- tooltip: z.array(z.string()).optional(),
8384
- size: z.array(z.string()).optional()
8611
+ x: z.array(z.string()).nullish(),
8612
+ y: z.array(z.string()).nullish(),
8613
+ color: z.array(z.string()).nullish(),
8614
+ group: z.array(z.string()).nullish(),
8615
+ angle: z.array(z.string()).nullish(),
8616
+ radius: z.array(z.string()).nullish(),
8617
+ tooltip: z.array(z.string()).nullish(),
8618
+ size: z.array(z.string()).nullish()
8385
8619
  }));
8386
8620
  const zXBandAxis = z.object({
8387
- visible: z.boolean().default(true).optional(),
8388
- labelAutoHide: z.boolean().default(true).optional(),
8389
- labelAutoHideGap: z.number().default(0).optional(),
8390
- labelAutoRotate: z.boolean().default(true).optional(),
8621
+ visible: z.boolean().default(true).nullish(),
8622
+ labelAutoHide: z.boolean().default(true).nullish(),
8623
+ labelAutoHideGap: z.number().default(0).nullish(),
8624
+ labelAutoRotate: z.boolean().default(true).nullish(),
8391
8625
  labelAutoRotateAngleRange: z.array(z.number()).default([
8392
8626
  0,
8393
8627
  -45,
8394
8628
  -90
8395
- ]).optional(),
8396
- labelAutoLimit: z.boolean().default(true).optional(),
8397
- labelAutoLimitLength: z.number().default(100).optional(),
8629
+ ]).nullish(),
8630
+ labelAutoLimit: z.boolean().default(true).nullish(),
8631
+ labelAutoLimitLength: z.number().default(100).nullish(),
8398
8632
  label: z.object({
8399
- visible: z.boolean().default(true).optional(),
8400
- labelColor: z.string().default('#797B85').optional(),
8401
- labelFontSize: z.number().default(12).optional(),
8402
- labelFontWeight: z.number().default(400).optional(),
8403
- labelAngle: z.number().default(0).optional()
8404
- }).optional(),
8633
+ visible: z.boolean().default(true).nullish(),
8634
+ labelColor: z.string().default('#797B85').nullish(),
8635
+ labelFontSize: z.number().default(12).nullish(),
8636
+ labelFontWeight: z.number().default(400).nullish(),
8637
+ labelAngle: z.number().default(0).nullish()
8638
+ }).nullish(),
8405
8639
  line: z.object({
8406
- visible: z.boolean().default(true).optional(),
8407
- lineColor: z.string().default('rgba(54, 65, 89, 0.30)').optional(),
8408
- lineWidth: z.number().default(1).optional()
8409
- }).optional(),
8640
+ visible: z.boolean().default(true).nullish(),
8641
+ lineColor: z.string().default('rgba(54, 65, 89, 0.30)').nullish(),
8642
+ lineWidth: z.number().default(1).nullish()
8643
+ }).nullish(),
8410
8644
  tick: z.object({
8411
- visible: z.boolean().default(true).optional(),
8412
- tickInside: z.boolean().default(false).optional(),
8413
- tickColor: z.string().default('rgba(54, 65, 89, 0.30)').optional(),
8414
- tickSize: z.number().default(4).optional()
8415
- }).optional(),
8645
+ visible: z.boolean().default(true).nullish(),
8646
+ tickInside: z.boolean().default(false).nullish(),
8647
+ tickColor: z.string().default('rgba(54, 65, 89, 0.30)').nullish(),
8648
+ tickSize: z.number().default(4).nullish()
8649
+ }).nullish(),
8416
8650
  title: z.object({
8417
- visible: z.boolean().default(false).optional(),
8418
- titleText: z.string().default('').optional(),
8419
- titleColor: z.string().default('#646A73').optional(),
8420
- titleFontSize: z.number().default(12).optional(),
8421
- titleFontWeight: z.number().default(400).optional()
8422
- }).optional(),
8651
+ visible: z.boolean().default(false).nullish(),
8652
+ titleText: z.string().default('').nullish(),
8653
+ titleColor: z.string().default('#646A73').nullish(),
8654
+ titleFontSize: z.number().default(12).nullish(),
8655
+ titleFontWeight: z.number().default(400).nullish()
8656
+ }).nullish(),
8423
8657
  grid: z.object({
8424
- visible: z.boolean().default(false).optional(),
8425
- gridColor: z.string().default('rgba(54, 65, 89, 0.15)').optional(),
8426
- gridWidth: z.number().default(0.5).optional()
8427
- }).optional()
8658
+ visible: z.boolean().default(false).nullish(),
8659
+ gridColor: z.string().default('rgba(54, 65, 89, 0.15)').nullish(),
8660
+ gridWidth: z.number().default(0.5).nullish()
8661
+ }).nullish()
8428
8662
  });
8429
8663
  const zYBandAxis = zXBandAxis;
8430
8664
  const zXLinearAxis = z.object({
8431
- visible: z.boolean().default(true).optional(),
8432
- min: z.number().optional(),
8433
- max: z.number().optional(),
8434
- nice: z.boolean().default(true).optional(),
8435
- zero: z.boolean().default(true).optional(),
8436
- log: z.boolean().default(false).optional(),
8437
- logBase: z.number().default(10).optional(),
8438
- inverse: z.boolean().default(false).optional(),
8665
+ visible: z.boolean().default(true).nullish(),
8666
+ min: z.number().nullish(),
8667
+ max: z.number().nullish(),
8668
+ nice: z.boolean().default(true).nullish(),
8669
+ zero: z.boolean().default(true).nullish(),
8670
+ log: z.boolean().default(false).nullish(),
8671
+ logBase: z.number().default(10).nullish(),
8672
+ inverse: z.boolean().default(false).nullish(),
8439
8673
  label: z.object({
8440
- visible: z.boolean().default(true).optional(),
8441
- labelColor: z.string().default('#797B85').optional(),
8442
- labelFontSize: z.number().default(12).optional(),
8443
- labelFontWeight: z.number().default(400).optional(),
8444
- labelAngle: z.number().default(0).optional()
8445
- }).optional(),
8674
+ visible: z.boolean().default(true).nullish(),
8675
+ labelColor: z.string().default('#797B85').nullish(),
8676
+ labelFontSize: z.number().default(12).nullish(),
8677
+ labelFontWeight: z.number().default(400).nullish(),
8678
+ labelAngle: z.number().default(0).nullish()
8679
+ }).nullish(),
8446
8680
  line: z.object({
8447
- visible: z.boolean().default(true).optional(),
8448
- lineColor: z.string().default('rgba(54, 65, 89, 0.30)').optional(),
8449
- lineWidth: z.number().default(1).optional()
8450
- }).optional(),
8681
+ visible: z.boolean().default(true).nullish(),
8682
+ lineColor: z.string().default('rgba(54, 65, 89, 0.30)').nullish(),
8683
+ lineWidth: z.number().default(1).nullish()
8684
+ }).nullish(),
8451
8685
  tick: z.object({
8452
- visible: z.boolean().default(true).optional(),
8453
- tickInside: z.boolean().default(false).optional(),
8454
- tickColor: z.string().default('rgba(54, 65, 89, 0.30)').optional(),
8455
- tickSize: z.number().default(4).optional()
8456
- }).optional(),
8686
+ visible: z.boolean().default(true).nullish(),
8687
+ tickInside: z.boolean().default(false).nullish(),
8688
+ tickColor: z.string().default('rgba(54, 65, 89, 0.30)').nullish(),
8689
+ tickSize: z.number().default(4).nullish()
8690
+ }).nullish(),
8457
8691
  title: z.object({
8458
- visible: z.boolean().default(false).optional(),
8459
- titleText: z.string().default('').optional(),
8460
- titleColor: z.string().default('#646A73').optional(),
8461
- titleFontSize: z.number().default(12).optional(),
8462
- titleFontWeight: z.number().default(400).optional()
8463
- }).optional(),
8692
+ visible: z.boolean().default(false).nullish(),
8693
+ titleText: z.string().default('').nullish(),
8694
+ titleColor: z.string().default('#646A73').nullish(),
8695
+ titleFontSize: z.number().default(12).nullish(),
8696
+ titleFontWeight: z.number().default(400).nullish()
8697
+ }).nullish(),
8464
8698
  grid: z.object({
8465
- visible: z.boolean().default(false).optional(),
8466
- gridColor: z.string().default('rgba(54, 65, 89, 0.15)').optional(),
8467
- gridWidth: z.number().default(0.5).optional()
8468
- }).optional()
8699
+ visible: z.boolean().default(false).nullish(),
8700
+ gridColor: z.string().default('rgba(54, 65, 89, 0.15)').nullish(),
8701
+ gridWidth: z.number().default(0.5).nullish()
8702
+ }).nullish()
8469
8703
  });
8470
8704
  const zYLinearAxis = zXLinearAxis;
8471
8705
  const zCrosshairLine = z.object({
8472
- visible: z.boolean().optional(),
8473
- lineColor: z.string().optional(),
8474
- labelColor: z.string().optional(),
8475
- labelVisible: z.boolean().optional(),
8476
- labelBackgroundColor: z.string().optional()
8706
+ visible: z.boolean().nullish(),
8707
+ lineColor: z.string().nullish(),
8708
+ labelColor: z.string().nullish(),
8709
+ labelVisible: z.boolean().nullish(),
8710
+ labelBackgroundColor: z.string().nullish()
8477
8711
  });
8478
8712
  const zCrosshairRect = z.object({
8479
- visible: z.boolean().optional(),
8480
- rectColor: z.string().optional(),
8481
- labelColor: z.string().optional(),
8482
- labelVisible: z.boolean().optional(),
8483
- labelBackgroundColor: z.string().optional()
8713
+ visible: z.boolean().nullish(),
8714
+ rectColor: z.string().nullish(),
8715
+ labelColor: z.string().nullish(),
8716
+ labelVisible: z.boolean().nullish(),
8717
+ labelBackgroundColor: z.string().nullish()
8484
8718
  });
8485
8719
  const zStackCornerRadius = z.number().or(z.array(z.number())).default([
8486
8720
  3,
@@ -8488,21 +8722,21 @@ const zStackCornerRadius = z.number().or(z.array(z.number())).default([
8488
8722
  0,
8489
8723
  0
8490
8724
  ]);
8491
- const zBackgroundColor = z.string().default('transparent').optional();
8725
+ const zBackgroundColor = z.string().default('transparent').nullish();
8492
8726
  const zColor = z.object({
8493
- colorScheme: z.array(z.string()).optional(),
8494
- colorMapping: z.record(z.string(), z.string()).optional()
8727
+ colorScheme: z.array(z.string()).nullish(),
8728
+ colorMapping: z.record(z.string(), z.string()).nullish()
8495
8729
  });
8496
8730
  const zLinearColor = z.object({
8497
- colorScheme: z.array(z.string()).optional()
8731
+ colorScheme: z.array(z.string()).nullish()
8498
8732
  });
8499
8733
  const zLabel = z.object({
8500
- enable: z.boolean().default(true).optional()
8734
+ enable: z.boolean().default(true).nullish()
8501
8735
  });
8502
8736
  const zLegend = z.object({
8503
- enable: z.boolean().default(true).optional(),
8504
- border: z.boolean().default(true).optional(),
8505
- maxSize: z.number().default(1).optional(),
8737
+ enable: z.boolean().default(true).nullish(),
8738
+ border: z.boolean().default(true).nullish(),
8739
+ maxSize: z.number().default(1).nullish(),
8506
8740
  shapeType: z["enum"]([
8507
8741
  'circle',
8508
8742
  'cross',
@@ -8526,7 +8760,7 @@ const zLegend = z.object({
8526
8760
  'arrowRight',
8527
8761
  'rectRound',
8528
8762
  'roundLine'
8529
- ]).default('rectRound').optional(),
8763
+ ]).default('rectRound').nullish(),
8530
8764
  position: z["enum"]([
8531
8765
  'left',
8532
8766
  'leftTop',
@@ -8548,10 +8782,10 @@ const zLegend = z.object({
8548
8782
  'bottomRight',
8549
8783
  'bl',
8550
8784
  'br'
8551
- ]).default('bottom').optional(),
8552
- labelFontSize: z.number().default(12).optional(),
8553
- labelFontColor: z.string().default('#fff').optional(),
8554
- labelFontWeight: z.number().or(z.string()).default(400).optional()
8785
+ ]).default('bottom').nullish(),
8786
+ labelFontSize: z.number().default(12).nullish(),
8787
+ labelFontColor: z.string().default('#fff').nullish(),
8788
+ labelFontWeight: z.number().or(z.string()).default(400).nullish()
8555
8789
  });
8556
8790
  const zColorLegend = z.object({
8557
8791
  position: z["enum"]([
@@ -8575,194 +8809,196 @@ const zColorLegend = z.object({
8575
8809
  'bottomRight',
8576
8810
  'bl',
8577
8811
  'br'
8578
- ]).default('bottom').optional(),
8579
- enable: z.boolean().default(true).optional()
8812
+ ]).default('bottom').nullish(),
8813
+ enable: z.boolean().default(true).nullish()
8580
8814
  });
8581
8815
  const zTooltip = z.object({
8582
- enable: z.boolean().default(true).optional()
8816
+ enable: z.boolean().default(true).nullish()
8583
8817
  });
8584
8818
  const zTableConfig = z.object({
8585
- borderColor: z.string().optional(),
8586
- bodyFontSize: z.number().optional(),
8587
- bodyFontColor: z.string().optional(),
8588
- bodyBackgroundColor: z.string().optional(),
8589
- hoverBodyBackgroundColor: z.string().optional(),
8590
- hoverBodyInlineBackgroundColor: z.string().optional(),
8591
- headerFontSize: z.number().optional(),
8592
- headerFontColor: z.string().optional(),
8593
- headerBackgroundColor: z.string().optional(),
8594
- hoverHeaderBackgroundColor: z.string().optional(),
8595
- hoverHeaderInlineBackgroundColor: z.string().optional(),
8596
- selectedBorderColor: z.string().optional(),
8597
- selectedBackgroundColor: z.string().optional()
8819
+ backgroundColor: zBackgroundColor.nullish(),
8820
+ borderColor: z.string().nullish(),
8821
+ bodyFontSize: z.number().nullish(),
8822
+ bodyFontColor: z.string().nullish(),
8823
+ bodyBackgroundColor: z.string().nullish(),
8824
+ hoverBodyBackgroundColor: z.string().nullish(),
8825
+ hoverBodyInlineBackgroundColor: z.string().nullish(),
8826
+ headerFontSize: z.number().nullish(),
8827
+ headerFontColor: z.string().nullish(),
8828
+ headerBackgroundColor: z.string().nullish(),
8829
+ hoverHeaderBackgroundColor: z.string().nullish(),
8830
+ hoverHeaderInlineBackgroundColor: z.string().nullish(),
8831
+ selectedBorderColor: z.string().nullish(),
8832
+ selectedBackgroundColor: z.string().nullish()
8598
8833
  });
8599
8834
  const zPivotTableConfig = zTableConfig;
8600
8835
  const zLineConfig = z.object({
8601
- backgroundColor: zBackgroundColor.optional(),
8602
- label: zLabel.optional(),
8603
- color: zColor.optional(),
8604
- tooltip: zTooltip.optional(),
8605
- legend: zLegend.optional(),
8606
- xAxis: zXBandAxis.optional(),
8607
- yAxis: zYLinearAxis.optional(),
8608
- crosshairLine: zCrosshairLine.optional()
8836
+ backgroundColor: zBackgroundColor.nullish(),
8837
+ label: zLabel.nullish(),
8838
+ color: zColor.nullish(),
8839
+ tooltip: zTooltip.nullish(),
8840
+ legend: zLegend.nullish(),
8841
+ xAxis: zXBandAxis.nullish(),
8842
+ yAxis: zYLinearAxis.nullish(),
8843
+ crosshairLine: zCrosshairLine.nullish()
8609
8844
  });
8610
8845
  const zColumnConfig = z.object({
8611
- backgroundColor: zBackgroundColor.optional(),
8612
- label: zLabel.optional(),
8613
- color: zColor.optional(),
8614
- tooltip: zTooltip.optional(),
8615
- legend: zLegend.optional(),
8616
- xAxis: zXBandAxis.optional(),
8617
- yAxis: zYLinearAxis.optional(),
8618
- crosshairRect: zCrosshairRect.optional(),
8619
- stackCornerRadius: zStackCornerRadius.optional()
8846
+ backgroundColor: zBackgroundColor.nullish(),
8847
+ label: zLabel.nullish(),
8848
+ color: zColor.nullish(),
8849
+ tooltip: zTooltip.nullish(),
8850
+ legend: zLegend.nullish(),
8851
+ xAxis: zXBandAxis.nullish(),
8852
+ yAxis: zYLinearAxis.nullish(),
8853
+ crosshairRect: zCrosshairRect.nullish(),
8854
+ stackCornerRadius: zStackCornerRadius.nullish()
8620
8855
  });
8621
8856
  const zColumnParallelConfig = zColumnConfig;
8622
8857
  const zColumnPercentConfig = zColumnConfig;
8623
8858
  const zBarConfig = z.object({
8624
- backgroundColor: zBackgroundColor.optional(),
8625
- label: zLabel.optional(),
8626
- color: zColor.optional(),
8627
- tooltip: zTooltip.optional(),
8628
- legend: zLegend.optional(),
8629
- xAxis: zXLinearAxis.optional(),
8630
- yAxis: zYBandAxis.optional(),
8631
- crosshairRect: zCrosshairRect.optional(),
8632
- stackCornerRadius: zStackCornerRadius.optional()
8859
+ backgroundColor: zBackgroundColor.nullish(),
8860
+ label: zLabel.nullish(),
8861
+ color: zColor.nullish(),
8862
+ tooltip: zTooltip.nullish(),
8863
+ legend: zLegend.nullish(),
8864
+ xAxis: zXLinearAxis.nullish(),
8865
+ yAxis: zYBandAxis.nullish(),
8866
+ crosshairRect: zCrosshairRect.nullish(),
8867
+ stackCornerRadius: zStackCornerRadius.nullish()
8633
8868
  });
8634
8869
  const zBarParallelConfig = zBarConfig;
8635
8870
  const zBarPercentConfig = zBarConfig;
8636
8871
  const zAreaConfig = z.object({
8637
- backgroundColor: zBackgroundColor.optional(),
8638
- label: zLabel.optional(),
8639
- color: zColor.optional(),
8640
- tooltip: zTooltip.optional(),
8641
- legend: zLegend.optional(),
8642
- xAxis: zXBandAxis.optional(),
8643
- yAxis: zYLinearAxis.optional(),
8644
- crosshairLine: zCrosshairLine.optional()
8872
+ backgroundColor: zBackgroundColor.nullish(),
8873
+ label: zLabel.nullish(),
8874
+ color: zColor.nullish(),
8875
+ tooltip: zTooltip.nullish(),
8876
+ legend: zLegend.nullish(),
8877
+ xAxis: zXBandAxis.nullish(),
8878
+ yAxis: zYLinearAxis.nullish(),
8879
+ crosshairLine: zCrosshairLine.nullish()
8645
8880
  });
8646
8881
  const zAreaPercentConfig = zAreaConfig;
8647
8882
  const zAreaRangeConfig = zAreaConfig;
8648
8883
  const zDualAxisConfig = z.object({
8649
- backgroundColor: zBackgroundColor.optional(),
8650
- label: zLabel.optional(),
8651
- color: zColor.optional(),
8652
- tooltip: zTooltip.optional(),
8653
- legend: zLegend.optional(),
8654
- dualChartType: z.array(zDualChartType).or(zDualChartType).optional(),
8655
- primaryYAxis: z.array(zYLinearAxis).or(zYLinearAxis).optional(),
8656
- secondaryYAxis: z.array(zYLinearAxis).or(zYLinearAxis).optional(),
8657
- xAxis: zXBandAxis.optional(),
8658
- crosshairRect: zCrosshairRect.optional()
8884
+ backgroundColor: zBackgroundColor.nullish(),
8885
+ label: zLabel.nullish(),
8886
+ color: zColor.nullish(),
8887
+ tooltip: zTooltip.nullish(),
8888
+ legend: zLegend.nullish(),
8889
+ dualChartType: z.array(zDualChartType).or(zDualChartType).nullish(),
8890
+ alignTicks: z.array(z.boolean()).or(z.boolean()).nullish(),
8891
+ primaryYAxis: z.array(zYLinearAxis).or(zYLinearAxis).nullish(),
8892
+ secondaryYAxis: z.array(zYLinearAxis).or(zYLinearAxis).nullish(),
8893
+ xAxis: zXBandAxis.nullish(),
8894
+ crosshairRect: zCrosshairRect.nullish()
8659
8895
  });
8660
8896
  const zScatterConfig = z.object({
8661
- backgroundColor: zBackgroundColor.optional(),
8662
- label: zLabel.optional(),
8663
- color: zColor.optional(),
8664
- tooltip: zTooltip.optional(),
8665
- legend: zLegend.optional(),
8666
- xAxis: zXLinearAxis.optional(),
8667
- yAxis: zYLinearAxis.optional(),
8668
- crosshairLine: zCrosshairLine.optional()
8897
+ backgroundColor: zBackgroundColor.nullish(),
8898
+ label: zLabel.nullish(),
8899
+ color: zColor.nullish(),
8900
+ tooltip: zTooltip.nullish(),
8901
+ legend: zLegend.nullish(),
8902
+ xAxis: zXLinearAxis.nullish(),
8903
+ yAxis: zYLinearAxis.nullish(),
8904
+ crosshairLine: zCrosshairLine.nullish()
8669
8905
  });
8670
8906
  const zRoseConfig = z.object({
8671
- backgroundColor: zBackgroundColor.optional(),
8672
- label: zLabel.optional(),
8673
- color: zColor.optional(),
8674
- tooltip: zTooltip.optional(),
8675
- legend: zLegend.optional()
8907
+ backgroundColor: zBackgroundColor.nullish(),
8908
+ label: zLabel.nullish(),
8909
+ color: zColor.nullish(),
8910
+ tooltip: zTooltip.nullish(),
8911
+ legend: zLegend.nullish()
8676
8912
  });
8677
8913
  const zRoseParallelConfig = zRoseConfig;
8678
8914
  const zPieConfig = z.object({
8679
- backgroundColor: zBackgroundColor.optional(),
8680
- label: zLabel.optional(),
8681
- color: zColor.optional(),
8682
- tooltip: zTooltip.optional(),
8683
- legend: zLegend.optional()
8915
+ backgroundColor: zBackgroundColor.nullish(),
8916
+ label: zLabel.nullish(),
8917
+ color: zColor.nullish(),
8918
+ tooltip: zTooltip.nullish(),
8919
+ legend: zLegend.nullish()
8684
8920
  });
8685
8921
  const zDonutConfig = zPieConfig;
8686
8922
  const zRadarConfig = zPieConfig;
8687
8923
  const zFunnelConfig = zPieConfig;
8688
8924
  const zHeatmapConfig = zPieConfig;
8689
8925
  const zConfig = z.object({
8690
- table: zTableConfig.optional(),
8691
- pivotTable: zPivotTableConfig.optional(),
8692
- line: zLineConfig.optional(),
8693
- column: zColumnConfig.optional(),
8694
- columnParallel: zColumnParallelConfig.optional(),
8695
- columnPercent: zColumnPercentConfig.optional(),
8696
- bar: zBarConfig.optional(),
8697
- barParallel: zBarParallelConfig.optional(),
8698
- barPercent: zBarPercentConfig.optional(),
8699
- area: zAreaConfig.optional(),
8700
- areaPercent: zAreaPercentConfig.optional(),
8701
- areaRange: zAreaRangeConfig.optional(),
8702
- scatter: zScatterConfig.optional(),
8703
- dualAxis: zDualAxisConfig.optional(),
8704
- rose: zRoseConfig.optional(),
8705
- roseParallel: zRoseParallelConfig.optional(),
8706
- pie: zPieConfig.optional(),
8707
- donut: zDonutConfig.optional(),
8708
- radar: zRadarConfig.optional(),
8709
- funnel: zFunnelConfig.optional(),
8710
- heatmap: zHeatmapConfig.optional()
8926
+ table: zTableConfig.nullish(),
8927
+ pivotTable: zPivotTableConfig.nullish(),
8928
+ line: zLineConfig.nullish(),
8929
+ column: zColumnConfig.nullish(),
8930
+ columnParallel: zColumnParallelConfig.nullish(),
8931
+ columnPercent: zColumnPercentConfig.nullish(),
8932
+ bar: zBarConfig.nullish(),
8933
+ barParallel: zBarParallelConfig.nullish(),
8934
+ barPercent: zBarPercentConfig.nullish(),
8935
+ area: zAreaConfig.nullish(),
8936
+ areaPercent: zAreaPercentConfig.nullish(),
8937
+ areaRange: zAreaRangeConfig.nullish(),
8938
+ scatter: zScatterConfig.nullish(),
8939
+ dualAxis: zDualAxisConfig.nullish(),
8940
+ rose: zRoseConfig.nullish(),
8941
+ roseParallel: zRoseParallelConfig.nullish(),
8942
+ pie: zPieConfig.nullish(),
8943
+ donut: zDonutConfig.nullish(),
8944
+ radar: zRadarConfig.nullish(),
8945
+ funnel: zFunnelConfig.nullish(),
8946
+ heatmap: zHeatmapConfig.nullish()
8711
8947
  });
8712
8948
  const zAxis = z.object({
8713
- visible: z.boolean().default(true).optional(),
8714
- min: z.number().optional(),
8715
- max: z.number().optional(),
8716
- nice: z.boolean().default(true).optional(),
8717
- zero: z.boolean().default(true).optional(),
8718
- inverse: z.boolean().default(false).optional(),
8719
- log: z.boolean().default(false).optional(),
8720
- logBase: z.number().default(10).optional(),
8721
- labelAutoHide: z.boolean().default(true).optional(),
8722
- labelAutoHideGap: z.number().default(4).optional(),
8723
- labelAutoRotate: z.boolean().default(true).optional(),
8949
+ visible: z.boolean().default(true).nullish(),
8950
+ min: z.number().nullish(),
8951
+ max: z.number().nullish(),
8952
+ nice: z.boolean().default(true).nullish(),
8953
+ zero: z.boolean().default(true).nullish(),
8954
+ inverse: z.boolean().default(false).nullish(),
8955
+ log: z.boolean().default(false).nullish(),
8956
+ logBase: z.number().default(10).nullish(),
8957
+ labelAutoHide: z.boolean().default(true).nullish(),
8958
+ labelAutoHideGap: z.number().default(4).nullish(),
8959
+ labelAutoRotate: z.boolean().default(true).nullish(),
8724
8960
  labelAutoRotateAngleRange: z.array(z.number()).default([
8725
8961
  0,
8726
8962
  -45,
8727
8963
  -90
8728
- ]).optional(),
8729
- labelAutoLimit: z.boolean().default(true).optional(),
8730
- labelAutoLimitLength: z.number().default(100).optional(),
8964
+ ]).nullish(),
8965
+ labelAutoLimit: z.boolean().default(true).nullish(),
8966
+ labelAutoLimitLength: z.number().default(100).nullish(),
8731
8967
  label: z.object({
8732
- visible: z.boolean().default(true).optional(),
8733
- labelColor: z.string().default('#797B85').optional(),
8734
- labelFontSize: z.number().default(12).optional(),
8735
- labelFontWeight: z.number().default(400).optional(),
8736
- labelAngle: z.number().default(0).optional()
8737
- }).optional(),
8968
+ visible: z.boolean().default(true).nullish(),
8969
+ labelColor: z.string().default('#797B85').nullish(),
8970
+ labelFontSize: z.number().default(12).nullish(),
8971
+ labelFontWeight: z.number().default(400).nullish(),
8972
+ labelAngle: z.number().default(0).nullish()
8973
+ }).nullish(),
8738
8974
  line: z.object({
8739
- visible: z.boolean().default(true).optional(),
8740
- lineColor: z.string().default('rgba(54, 65, 89, 0.30)').optional(),
8741
- lineWidth: z.number().default(1).optional()
8742
- }).optional(),
8975
+ visible: z.boolean().default(true).nullish(),
8976
+ lineColor: z.string().default('rgba(54, 65, 89, 0.30)').nullish(),
8977
+ lineWidth: z.number().default(1).nullish()
8978
+ }).nullish(),
8743
8979
  tick: z.object({
8744
- visible: z.boolean().default(true).optional(),
8745
- tickInside: z.boolean().default(false).optional(),
8746
- tickColor: z.string().default('rgba(54, 65, 89, 0.30)').optional(),
8747
- tickSize: z.number().default(4).optional()
8748
- }).optional(),
8980
+ visible: z.boolean().default(true).nullish(),
8981
+ tickInside: z.boolean().default(false).nullish(),
8982
+ tickColor: z.string().default('rgba(54, 65, 89, 0.30)').nullish(),
8983
+ tickSize: z.number().default(4).nullish()
8984
+ }).nullish(),
8749
8985
  title: z.object({
8750
- visible: z.boolean().default(false).optional(),
8751
- titleText: z.string().default('').optional(),
8752
- titleColor: z.string().default('#646A73').optional(),
8753
- titleFontSize: z.number().default(12).optional(),
8754
- titleFontWeight: z.number().default(400).optional()
8755
- }).optional(),
8986
+ visible: z.boolean().default(false).nullish(),
8987
+ titleText: z.string().default('').nullish(),
8988
+ titleColor: z.string().default('#646A73').nullish(),
8989
+ titleFontSize: z.number().default(12).nullish(),
8990
+ titleFontWeight: z.number().default(400).nullish()
8991
+ }).nullish(),
8756
8992
  grid: z.object({
8757
- visible: z.boolean().default(false).optional(),
8758
- gridColor: z.string().default('rgba(54, 65, 89, 0.15)').optional(),
8759
- gridWidth: z.number().default(0.5).optional()
8760
- }).optional()
8993
+ visible: z.boolean().default(false).nullish(),
8994
+ gridColor: z.string().default('rgba(54, 65, 89, 0.15)').nullish(),
8995
+ gridWidth: z.number().default(0.5).nullish()
8996
+ }).nullish()
8761
8997
  });
8762
8998
  const zCustomThemeConfig = z.object({
8763
- config: zConfig.optional()
8999
+ config: zConfig.nullish()
8764
9000
  });
8765
- const zCustomTheme = z.record(z.string(), zCustomThemeConfig).optional();
9001
+ const zCustomTheme = z.record(z.string(), zCustomThemeConfig).nullish();
8766
9002
  const zTheme = z.string();
8767
9003
  const zSelector = z.union([
8768
9004
  z.string(),
@@ -8778,7 +9014,7 @@ const zSelector = z.union([
8778
9014
  '>=',
8779
9015
  '<=',
8780
9016
  'between'
8781
- ]).optional(),
9017
+ ]).nullish(),
8782
9018
  op: z["enum"]([
8783
9019
  '=',
8784
9020
  '==',
@@ -8788,7 +9024,7 @@ const zSelector = z.union([
8788
9024
  '>=',
8789
9025
  '<=',
8790
9026
  'between'
8791
- ]).optional(),
9027
+ ]).nullish(),
8792
9028
  value: z.union([
8793
9029
  z.string(),
8794
9030
  z.number(),
@@ -8803,11 +9039,11 @@ const zSelector = z.union([
8803
9039
  operator: z["enum"]([
8804
9040
  'in',
8805
9041
  'not in'
8806
- ]).optional(),
9042
+ ]).nullish(),
8807
9043
  op: z["enum"]([
8808
9044
  'in',
8809
9045
  'not in'
8810
- ]).optional(),
9046
+ ]).nullish(),
8811
9047
  value: z.union([
8812
9048
  z.string(),
8813
9049
  z.number(),
@@ -8823,103 +9059,103 @@ const zBarStyle = z.object({
8823
9059
  selector: z.union([
8824
9060
  zSelector,
8825
9061
  zSelectors
8826
- ]).optional(),
8827
- barColor: z.string().optional(),
8828
- barColorOpacity: z.number().optional(),
8829
- barBorderColor: z.string().optional(),
8830
- barBorderWidth: z.number().optional(),
9062
+ ]).nullish(),
9063
+ barColor: z.string().nullish(),
9064
+ barColorOpacity: z.number().nullish(),
9065
+ barBorderColor: z.string().nullish(),
9066
+ barBorderWidth: z.number().nullish(),
8831
9067
  barBorderStyle: z.union([
8832
9068
  z.literal('solid'),
8833
9069
  z.literal('dashed'),
8834
9070
  z.literal('dotted')
8835
- ]).optional(),
9071
+ ]).nullish(),
8836
9072
  barRadius: z.union([
8837
9073
  z.number(),
8838
9074
  z.array(z.number())
8839
- ]).optional()
9075
+ ]).nullish()
8840
9076
  });
8841
9077
  const zPointStyle = z.object({
8842
9078
  selector: z.union([
8843
9079
  zSelector,
8844
9080
  zSelectors
8845
- ]).optional(),
8846
- pointSize: z.number().optional(),
8847
- pointColor: z.string().optional(),
8848
- pointColorOpacity: z.number().optional(),
8849
- pointBorderColor: z.string().optional(),
8850
- pointBorderWidth: z.number().optional(),
9081
+ ]).nullish(),
9082
+ pointSize: z.number().nullish(),
9083
+ pointColor: z.string().nullish(),
9084
+ pointColorOpacity: z.number().nullish(),
9085
+ pointBorderColor: z.string().nullish(),
9086
+ pointBorderWidth: z.number().nullish(),
8851
9087
  pointBorderStyle: z.union([
8852
9088
  z["enum"]([
8853
9089
  'solid',
8854
9090
  'dashed',
8855
9091
  'dotted'
8856
9092
  ])
8857
- ]).optional()
9093
+ ]).nullish()
8858
9094
  });
8859
9095
  const zLineStyle = z.object({
8860
9096
  selector: z.union([
8861
9097
  zSelector,
8862
9098
  zSelectors
8863
- ]).optional(),
8864
- lineSmooth: z.boolean().optional(),
8865
- lineColor: z.string().optional(),
8866
- lineColorOpacity: z.number().optional(),
8867
- lineWidth: z.number().optional(),
9099
+ ]).nullish(),
9100
+ lineSmooth: z.boolean().nullish(),
9101
+ lineColor: z.string().nullish(),
9102
+ lineColorOpacity: z.number().nullish(),
9103
+ lineWidth: z.number().nullish(),
8868
9104
  lineStyle: z.union([
8869
9105
  z["enum"]([
8870
9106
  'solid',
8871
9107
  'dashed',
8872
9108
  'dotted'
8873
9109
  ])
8874
- ]).optional()
9110
+ ]).nullish()
8875
9111
  });
8876
9112
  const zAreaStyle = z.object({
8877
9113
  selector: z.union([
8878
9114
  zSelector,
8879
9115
  zSelectors
8880
- ]).optional(),
8881
- areaColor: z.string().optional(),
8882
- areaColorOpacity: z.number().optional()
9116
+ ]).nullish(),
9117
+ areaColor: z.string().nullish(),
9118
+ areaColorOpacity: z.number().nullish()
8883
9119
  });
8884
9120
  const zMarkStyle = z.object({
8885
- barStyle: zBarStyle.or(z.array(zBarStyle)).optional(),
8886
- pointStyle: zPointStyle.or(z.array(zPointStyle)).optional(),
8887
- lineStyle: zLineStyle.or(z.array(zLineStyle)).optional(),
8888
- areaStyle: zAreaStyle.or(z.array(zAreaStyle)).optional()
9121
+ barStyle: zBarStyle.or(z.array(zBarStyle)).nullish(),
9122
+ pointStyle: zPointStyle.or(z.array(zPointStyle)).nullish(),
9123
+ lineStyle: zLineStyle.or(z.array(zLineStyle)).nullish(),
9124
+ areaStyle: zAreaStyle.or(z.array(zAreaStyle)).nullish()
8889
9125
  });
8890
9126
  const zAnnotationPoint = z.object({
8891
9127
  selector: z.union([
8892
9128
  zSelector,
8893
9129
  zSelectors
8894
9130
  ]),
8895
- text: z.string().or(z.array(z.string())).optional(),
8896
- textColor: z.string().default('#ffffff').optional(),
8897
- textFontSize: z.number().default(12).optional(),
8898
- textFontWeight: z.number().default(400).optional(),
9131
+ text: z.string().or(z.array(z.string())).nullish(),
9132
+ textColor: z.string().default('#ffffff').nullish(),
9133
+ textFontSize: z.number().default(12).nullish(),
9134
+ textFontWeight: z.number().default(400).nullish(),
8899
9135
  textAlign: z["enum"]([
8900
9136
  'left',
8901
9137
  'right',
8902
9138
  'center'
8903
- ]).default('center').optional(),
9139
+ ]).default('center').nullish(),
8904
9140
  textBaseline: z["enum"]([
8905
9141
  'top',
8906
9142
  'middle',
8907
9143
  'bottom'
8908
- ]).default('middle').optional(),
8909
- backgroundVisible: z.boolean().default(true).optional(),
8910
- backgroundColor: z.string().default('#212121').optional(),
8911
- backgroundBorderColor: z.string().optional(),
8912
- backgroundBorderWidth: z.number().default(1).optional(),
8913
- backgroundBorderRadius: z.number().default(4).optional(),
8914
- backgroundPadding: z.number().optional(),
8915
- offsetY: z.number().default(0).optional(),
8916
- offsetX: z.number().default(0).optional()
9144
+ ]).default('middle').nullish(),
9145
+ textBackgroundVisible: z.boolean().default(true).nullish(),
9146
+ textBackgroundColor: z.string().default('#212121').nullish(),
9147
+ textBackgroundBorderColor: z.string().nullish(),
9148
+ textBackgroundBorderWidth: z.number().default(1).nullish(),
9149
+ textBackgroundBorderRadius: z.number().default(4).nullish(),
9150
+ textBackgroundPadding: z.number().nullish(),
9151
+ offsetY: z.number().default(0).nullish(),
9152
+ offsetX: z.number().default(0).nullish()
8917
9153
  });
8918
9154
  const zAnnotationVerticalLine = z.object({
8919
9155
  selector: z.union([
8920
9156
  zSelector,
8921
9157
  zSelectors
8922
- ]).optional(),
9158
+ ]).nullish(),
8923
9159
  xValue: z.union([
8924
9160
  z.number(),
8925
9161
  z.string(),
@@ -8927,8 +9163,8 @@ const zAnnotationVerticalLine = z.object({
8927
9163
  z.number(),
8928
9164
  z.string()
8929
9165
  ]))
8930
- ]).optional(),
8931
- text: z.string().or(z.array(z.string())).optional(),
9166
+ ]).nullish(),
9167
+ text: z.string().or(z.array(z.string())).nullish(),
8932
9168
  textPosition: z["enum"]([
8933
9169
  'outsideStart',
8934
9170
  'outsideEnd',
@@ -8936,42 +9172,40 @@ const zAnnotationVerticalLine = z.object({
8936
9172
  'insideStart',
8937
9173
  'insideMiddle',
8938
9174
  'insideEnd'
8939
- ]).default('insideEnd').optional(),
8940
- textColor: z.string().default('#ffffff').optional(),
8941
- textFontSize: z.number().default(12).optional(),
8942
- textFontWeight: z.number().default(400).optional(),
9175
+ ]).default('insideEnd').nullish(),
9176
+ textColor: z.string().default('#ffffff').nullish(),
9177
+ textFontSize: z.number().default(12).nullish(),
9178
+ textFontWeight: z.number().default(400).nullish(),
8943
9179
  textAlign: z["enum"]([
8944
9180
  'left',
8945
9181
  'right',
8946
9182
  'center'
8947
- ]).default('right').optional(),
9183
+ ]).default('right').nullish(),
8948
9184
  textBaseline: z["enum"]([
8949
9185
  'top',
8950
9186
  'middle',
8951
9187
  'bottom'
8952
- ]).default('top').optional(),
8953
- lineVisible: z.boolean().default(true).optional(),
8954
- lineColor: z.string().default('#212121').optional(),
8955
- lineWidth: z.number().default(1).optional(),
9188
+ ]).default('top').nullish(),
9189
+ textBackgroundVisible: z.boolean().default(true).nullish(),
9190
+ textBackgroundColor: z.string().default('#212121').nullish(),
9191
+ textBackgroundBorderColor: z.string().default('#212121').nullish(),
9192
+ textBackgroundBorderRadius: z.number().default(4).nullish(),
9193
+ textBackgroundBorderWidth: z.number().default(1).nullish(),
9194
+ textBackgroundPadding: z.number().default(2).nullish(),
9195
+ lineVisible: z.boolean().default(true).nullish(),
9196
+ lineColor: z.string().default('#212121').nullish(),
9197
+ lineWidth: z.number().default(1).nullish(),
8956
9198
  lineStyle: z.union([
8957
9199
  z.literal('solid'),
8958
9200
  z.literal('dashed'),
8959
9201
  z.literal('dotted')
8960
- ]).default('dashed').optional(),
8961
- backgroundVisible: z.boolean().default(true).optional(),
8962
- backgroundColor: z.string().default('#212121').optional(),
8963
- backgroundBorderColor: z.string().default('#212121').optional(),
8964
- backgroundBorderRadius: z.number().default(4).optional(),
8965
- backgroundBorderWidth: z.number().default(1).optional(),
8966
- backgroundPadding: z.number().default(2).optional(),
8967
- offsetX: z.number().default(0),
8968
- offsetY: z.number().default(0)
9202
+ ]).default('dashed').nullish()
8969
9203
  });
8970
9204
  const zAnnotationHorizontalLine = z.object({
8971
9205
  selector: z.union([
8972
9206
  zSelector,
8973
9207
  zSelectors
8974
- ]).optional(),
9208
+ ]).nullish(),
8975
9209
  yValue: z.union([
8976
9210
  z.number(),
8977
9211
  z.string(),
@@ -8979,8 +9213,8 @@ const zAnnotationHorizontalLine = z.object({
8979
9213
  z.number(),
8980
9214
  z.string()
8981
9215
  ]))
8982
- ]).optional(),
8983
- text: z.string().or(z.array(z.string())).optional(),
9216
+ ]).nullish(),
9217
+ text: z.string().or(z.array(z.string())).nullish(),
8984
9218
  textPosition: z["enum"]([
8985
9219
  'outsideStart',
8986
9220
  'outsideEnd',
@@ -8988,36 +9222,34 @@ const zAnnotationHorizontalLine = z.object({
8988
9222
  'insideStart',
8989
9223
  'insideMiddle',
8990
9224
  'insideEnd'
8991
- ]).default('insideEnd').optional(),
8992
- textColor: z.string().default('#ffffff').optional(),
8993
- textFontSize: z.number().default(12).optional(),
8994
- textFontWeight: z.number().default(400).optional(),
9225
+ ]).default('insideEnd').nullish(),
9226
+ textColor: z.string().default('#ffffff').nullish(),
9227
+ textFontSize: z.number().default(12).nullish(),
9228
+ textFontWeight: z.number().default(400).nullish(),
8995
9229
  textAlign: z["enum"]([
8996
9230
  'left',
8997
9231
  'right',
8998
9232
  'center'
8999
- ]).default('right').optional(),
9233
+ ]).default('right').nullish(),
9000
9234
  textBaseline: z["enum"]([
9001
9235
  'top',
9002
9236
  'middle',
9003
9237
  'bottom'
9004
- ]).default('top').optional(),
9005
- lineVisible: z.boolean().default(true).optional(),
9006
- lineColor: z.string().default('#212121').optional(),
9007
- lineWidth: z.number().default(1).optional(),
9238
+ ]).default('top').nullish(),
9239
+ lineVisible: z.boolean().default(true).nullish(),
9240
+ lineColor: z.string().default('#212121').nullish(),
9241
+ lineWidth: z.number().default(1).nullish(),
9008
9242
  lineStyle: z.union([
9009
9243
  z.literal('solid'),
9010
9244
  z.literal('dashed'),
9011
9245
  z.literal('dotted')
9012
- ]).default('dashed').optional(),
9013
- backgroundVisible: z.boolean().default(true).optional(),
9014
- backgroundColor: z.string().default('#212121').optional(),
9015
- backgroundBorderColor: z.string().default('#212121').optional(),
9016
- backgroundBorderRadius: z.number().default(4).optional(),
9017
- backgroundBorderWidth: z.number().default(1).optional(),
9018
- backgroundPadding: z.number().default(2).optional(),
9019
- offsetX: z.number().default(0),
9020
- offsetY: z.number().default(0)
9246
+ ]).default('dashed').nullish(),
9247
+ textBackgroundVisible: z.boolean().default(true).nullish(),
9248
+ textBackgroundColor: z.string().default('#212121').nullish(),
9249
+ textBackgroundBorderColor: z.string().default('#212121').nullish(),
9250
+ textBackgroundBorderRadius: z.number().default(4).nullish(),
9251
+ textBackgroundBorderWidth: z.number().default(1).nullish(),
9252
+ textBackgroundPadding: z.number().default(2).nullish()
9021
9253
  });
9022
9254
  const zAnnotationArea = z.object({
9023
9255
  selector: z.union([
@@ -9033,60 +9265,58 @@ const zAnnotationArea = z.object({
9033
9265
  'bottomRight',
9034
9266
  'left',
9035
9267
  'right'
9036
- ]).default('top').optional(),
9037
- text: z.string().or(z.array(z.string())).optional(),
9038
- textColor: z.string().default('#ffffff').optional(),
9039
- textFontSize: z.number().default(12).optional(),
9040
- textFontWeight: z.number().default(400).optional(),
9268
+ ]).default('top').nullish(),
9269
+ text: z.string().or(z.array(z.string())).nullish(),
9270
+ textColor: z.string().default('#ffffff').nullish(),
9271
+ textFontSize: z.number().default(12).nullish(),
9272
+ textFontWeight: z.number().default(400).nullish(),
9041
9273
  textAlign: z["enum"]([
9042
9274
  'left',
9043
9275
  'right',
9044
9276
  'center'
9045
- ]).default('center').optional(),
9277
+ ]).default('center').nullish(),
9046
9278
  textBaseline: z["enum"]([
9047
9279
  'top',
9048
9280
  'middle',
9049
9281
  'bottom'
9050
- ]).default('top').optional(),
9051
- backgroundVisible: z.boolean().default(true).optional(),
9052
- backgroundColor: z.string().default('#191d24').optional(),
9053
- backgroundBorderColor: z.string().default('#191d24').optional(),
9054
- backgroundBorderWidth: z.number().default(1).optional(),
9055
- backgroundBorderRadius: z.number().default(4).optional(),
9056
- backgroundPadding: z.number().default(4).optional(),
9057
- areaColor: z.string().default('#888888').optional(),
9058
- areaColorOpacity: z.number().default(0.15).optional(),
9059
- areaBorderColor: z.string().default('#888888').optional(),
9060
- areaBorderWidth: z.number().default(1).optional(),
9061
- areaBorderRadius: z.number().default(4).optional(),
9062
- outerPadding: z.number().default(4).optional(),
9063
- offsetX: z.number().default(0).optional(),
9064
- offsetY: z.number().default(0).optional()
9282
+ ]).default('top').nullish(),
9283
+ textBackgroundVisible: z.boolean().default(true).nullish(),
9284
+ textBackgroundColor: z.string().default('#191d24').nullish(),
9285
+ textBackgroundBorderColor: z.string().default('#191d24').nullish(),
9286
+ textBackgroundBorderWidth: z.number().default(1).nullish(),
9287
+ textBackgroundBorderRadius: z.number().default(4).nullish(),
9288
+ textBackgroundPadding: z.number().default(4).nullish(),
9289
+ areaColor: z.string().default('#888888').nullish(),
9290
+ areaColorOpacity: z.number().default(0.15).nullish(),
9291
+ areaBorderColor: z.string().default('#888888').nullish(),
9292
+ areaBorderWidth: z.number().default(1).nullish(),
9293
+ areaBorderRadius: z.number().default(4).nullish(),
9294
+ outerPadding: z.number().default(4).nullish()
9065
9295
  });
9066
9296
  const zAnnotation = z.object({
9067
- annotationPoint: zAnnotationPoint.or(z.array(zAnnotationPoint)).optional(),
9068
- annotationVerticalLine: zAnnotationVerticalLine.or(z.array(zAnnotationVerticalLine)).optional(),
9069
- annotationHorizontalLine: zAnnotationHorizontalLine.or(z.array(zAnnotationHorizontalLine)).optional(),
9070
- annotationArea: zAnnotationArea.or(z.array(zAnnotationArea)).optional()
9297
+ annotationPoint: zAnnotationPoint.or(z.array(zAnnotationPoint)).nullish(),
9298
+ annotationVerticalLine: zAnnotationVerticalLine.or(z.array(zAnnotationVerticalLine)).nullish(),
9299
+ annotationHorizontalLine: zAnnotationHorizontalLine.or(z.array(zAnnotationHorizontalLine)).nullish(),
9300
+ annotationArea: zAnnotationArea.or(z.array(zAnnotationArea)).nullish()
9071
9301
  });
9072
9302
  const zSort = z.object({
9073
9303
  order: z["enum"]([
9074
9304
  'asc',
9075
9305
  'desc'
9076
9306
  ]).default('asc'),
9077
- orderBy: z.string().optional(),
9078
- customOrder: z.array(z.any()).optional()
9307
+ orderBy: z.string().nullish(),
9308
+ customOrder: z.array(z.any()).nullish()
9079
9309
  });
9080
9310
  const zSortLegend = z.object({
9081
9311
  order: z["enum"]([
9082
9312
  'asc',
9083
9313
  'desc'
9084
9314
  ]).default('asc'),
9085
- orderBy: z.string().optional(),
9086
- customOrder: z.array(z.any()).optional()
9315
+ orderBy: z.string().nullish(),
9316
+ customOrder: z.array(z.any()).nullish()
9087
9317
  });
9088
9318
  const zAnalysis = z.object({
9089
- orderMapping: z.record(z.string(), z.array(z.string())).optional()
9319
+ orderMapping: z.record(z.string(), z.array(z.string())).nullish()
9090
9320
  });
9091
9321
  const zLocale = z["enum"]([
9092
9322
  'zh-CN',
@@ -9094,384 +9324,411 @@ const zLocale = z["enum"]([
9094
9324
  ]).default('zh-CN');
9095
9325
  const zTable = z.object({
9096
9326
  chartType: z.literal('table'),
9097
- dataset: zDataset.optional(),
9098
- dimensions: zDimensions.optional(),
9099
- measures: zMeasureTree.optional(),
9100
- backgroundColor: zBackgroundColor.optional(),
9101
- theme: zTheme.optional(),
9102
- locale: zLocale.optional()
9327
+ dataset: zDataset.nullish(),
9328
+ dimensions: zDimensions.nullish(),
9329
+ measures: zMeasureTree.nullish(),
9330
+ backgroundColor: zBackgroundColor.nullish(),
9331
+ borderColor: z.string().nullish(),
9332
+ bodyFontSize: z.number().nullish(),
9333
+ bodyFontColor: z.string().nullish(),
9334
+ bodyBackgroundColor: z.string().nullish(),
9335
+ hoverBodyBackgroundColor: z.string().nullish(),
9336
+ hoverBodyInlineBackgroundColor: z.string().nullish(),
9337
+ headerFontSize: z.number().nullish(),
9338
+ headerFontColor: z.string().nullish(),
9339
+ headerBackgroundColor: z.string().nullish(),
9340
+ hoverHeaderBackgroundColor: z.string().nullish(),
9341
+ hoverHeaderInlineBackgroundColor: z.string().nullish(),
9342
+ selectedBorderColor: z.string().nullish(),
9343
+ selectedBackgroundColor: z.string().nullish(),
9344
+ theme: zTheme.nullish(),
9345
+ locale: zLocale.nullish()
9103
9346
  });
9104
9347
  const zPivotTable = z.object({
9105
9348
  chartType: z.literal('pivotTable'),
9106
- dataset: zDataset.optional(),
9107
- dimensions: zDimensions.optional(),
9108
- measures: zMeasures.optional(),
9109
- backgroundColor: zBackgroundColor.optional(),
9110
- theme: zTheme.optional(),
9111
- locale: zLocale.optional()
9349
+ dataset: zDataset.nullish(),
9350
+ dimensions: zDimensions.nullish(),
9351
+ measures: zMeasures.nullish(),
9352
+ backgroundColor: zBackgroundColor.nullish(),
9353
+ borderColor: z.string().nullish(),
9354
+ bodyFontSize: z.number().nullish(),
9355
+ bodyFontColor: z.string().nullish(),
9356
+ bodyBackgroundColor: z.string().nullish(),
9357
+ hoverBodyBackgroundColor: z.string().nullish(),
9358
+ hoverBodyInlineBackgroundColor: z.string().nullish(),
9359
+ headerFontSize: z.number().nullish(),
9360
+ headerFontColor: z.string().nullish(),
9361
+ headerBackgroundColor: z.string().nullish(),
9362
+ hoverHeaderBackgroundColor: z.string().nullish(),
9363
+ hoverHeaderInlineBackgroundColor: z.string().nullish(),
9364
+ selectedBorderColor: z.string().nullish(),
9365
+ selectedBackgroundColor: z.string().nullish(),
9366
+ theme: zTheme.nullish(),
9367
+ locale: zLocale.nullish()
9112
9368
  });
9113
9369
  const zLine = z.object({
9114
9370
  chartType: z.literal('line'),
9115
- dataset: zDataset.optional(),
9116
- dimensions: zDimensions.optional(),
9117
- measures: zMeasureTree.optional(),
9118
- backgroundColor: zBackgroundColor.optional(),
9119
- color: zColor.optional(),
9120
- label: zLabel.optional(),
9121
- legend: zLegend.optional(),
9122
- tooltip: zTooltip.optional(),
9123
- xAxis: zXBandAxis.optional(),
9124
- yAxis: zYLinearAxis.optional(),
9125
- crosshairLine: zCrosshairLine.optional(),
9126
- sort: zSort.optional(),
9127
- sortLegend: zSortLegend.optional(),
9128
- theme: zTheme.optional(),
9129
- pointStyle: z.array(zPointStyle).or(zPointStyle).optional(),
9130
- lineStyle: z.array(zLineStyle).or(zLineStyle).optional(),
9131
- annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).optional(),
9132
- annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).optional(),
9133
- annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).optional(),
9134
- annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).optional(),
9135
- locale: zLocale.optional()
9371
+ dataset: zDataset.nullish(),
9372
+ dimensions: zDimensions.nullish(),
9373
+ measures: zMeasureTree.nullish(),
9374
+ backgroundColor: zBackgroundColor.nullish(),
9375
+ color: zColor.nullish(),
9376
+ label: zLabel.nullish(),
9377
+ legend: zLegend.nullish(),
9378
+ tooltip: zTooltip.nullish(),
9379
+ xAxis: zXBandAxis.nullish(),
9380
+ yAxis: zYLinearAxis.nullish(),
9381
+ crosshairLine: zCrosshairLine.nullish(),
9382
+ sort: zSort.nullish(),
9383
+ sortLegend: zSortLegend.nullish(),
9384
+ theme: zTheme.nullish(),
9385
+ pointStyle: z.array(zPointStyle).or(zPointStyle).nullish(),
9386
+ lineStyle: z.array(zLineStyle).or(zLineStyle).nullish(),
9387
+ annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).nullish(),
9388
+ annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
9389
+ annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
9390
+ annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).nullish(),
9391
+ locale: zLocale.nullish()
9136
9392
  });
9137
9393
  const zColumn = z.object({
9138
9394
  chartType: z.literal('column'),
9139
- dataset: zDataset.optional(),
9140
- dimensions: zDimensions.optional(),
9141
- measures: zMeasureTree.optional(),
9142
- backgroundColor: zBackgroundColor.optional(),
9143
- color: zColor.optional(),
9144
- label: zLabel.optional(),
9145
- legend: zLegend.optional(),
9146
- tooltip: zTooltip.optional(),
9147
- xAxis: zXBandAxis.optional(),
9148
- yAxis: zYLinearAxis.optional(),
9149
- crosshairRect: zCrosshairRect.optional(),
9150
- stackCornerRadius: zStackCornerRadius.optional(),
9151
- theme: zTheme.optional(),
9152
- barStyle: z.array(zBarStyle).or(zBarStyle).optional(),
9153
- annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).optional(),
9154
- annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).optional(),
9155
- annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).optional(),
9156
- annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).optional(),
9157
- locale: zLocale.optional()
9395
+ dataset: zDataset.nullish(),
9396
+ dimensions: zDimensions.nullish(),
9397
+ measures: zMeasureTree.nullish(),
9398
+ backgroundColor: zBackgroundColor.nullish(),
9399
+ color: zColor.nullish(),
9400
+ label: zLabel.nullish(),
9401
+ legend: zLegend.nullish(),
9402
+ tooltip: zTooltip.nullish(),
9403
+ xAxis: zXBandAxis.nullish(),
9404
+ yAxis: zYLinearAxis.nullish(),
9405
+ crosshairRect: zCrosshairRect.nullish(),
9406
+ stackCornerRadius: zStackCornerRadius.nullish(),
9407
+ theme: zTheme.nullish(),
9408
+ barStyle: z.array(zBarStyle).or(zBarStyle).nullish(),
9409
+ annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).nullish(),
9410
+ annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
9411
+ annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
9412
+ annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).nullish(),
9413
+ locale: zLocale.nullish()
9158
9414
  });
9159
9415
  const zColumnParallel = z.object({
9160
9416
  chartType: z.literal('columnParallel'),
9161
- dataset: zDataset.optional(),
9162
- dimensions: zDimensions.optional(),
9163
- measures: zMeasureTree.optional(),
9164
- backgroundColor: zBackgroundColor.optional(),
9165
- color: zColor.optional(),
9166
- label: zLabel.optional(),
9167
- legend: zLegend.optional(),
9168
- tooltip: zTooltip.optional(),
9169
- xAxis: zXBandAxis.optional(),
9170
- yAxis: zYLinearAxis.optional(),
9171
- crosshairRect: zCrosshairRect.optional(),
9172
- stackCornerRadius: zStackCornerRadius.optional(),
9173
- theme: zTheme.optional(),
9174
- barStyle: z.array(zBarStyle).or(zBarStyle).optional(),
9175
- annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).optional(),
9176
- annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).optional(),
9177
- annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).optional(),
9178
- annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).optional(),
9179
- locale: zLocale.optional()
9417
+ dataset: zDataset.nullish(),
9418
+ dimensions: zDimensions.nullish(),
9419
+ measures: zMeasureTree.nullish(),
9420
+ backgroundColor: zBackgroundColor.nullish(),
9421
+ color: zColor.nullish(),
9422
+ label: zLabel.nullish(),
9423
+ legend: zLegend.nullish(),
9424
+ tooltip: zTooltip.nullish(),
9425
+ xAxis: zXBandAxis.nullish(),
9426
+ yAxis: zYLinearAxis.nullish(),
9427
+ crosshairRect: zCrosshairRect.nullish(),
9428
+ stackCornerRadius: zStackCornerRadius.nullish(),
9429
+ theme: zTheme.nullish(),
9430
+ barStyle: z.array(zBarStyle).or(zBarStyle).nullish(),
9431
+ annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).nullish(),
9432
+ annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
9433
+ annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
9434
+ annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).nullish(),
9435
+ locale: zLocale.nullish()
9180
9436
  });
9181
9437
  const zColumnPercent = z.object({
9182
9438
  chartType: z.literal('columnPercent'),
9183
- dataset: zDataset.optional(),
9184
- dimensions: zDimensions.optional(),
9185
- measures: zMeasureTree.optional(),
9186
- backgroundColor: zBackgroundColor.optional(),
9187
- color: zColor.optional(),
9188
- label: zLabel.optional(),
9189
- legend: zLegend.optional(),
9190
- tooltip: zTooltip.optional(),
9191
- xAxis: zXBandAxis.optional(),
9192
- yAxis: zYLinearAxis.optional(),
9193
- crosshairRect: zCrosshairRect.optional(),
9194
- stackCornerRadius: zStackCornerRadius.optional(),
9195
- theme: zTheme.optional(),
9196
- barStyle: z.array(zBarStyle).or(zBarStyle).optional(),
9197
- annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).optional(),
9198
- annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).optional(),
9199
- annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).optional(),
9200
- annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).optional(),
9201
- locale: zLocale.optional()
9439
+ dataset: zDataset.nullish(),
9440
+ dimensions: zDimensions.nullish(),
9441
+ measures: zMeasureTree.nullish(),
9442
+ backgroundColor: zBackgroundColor.nullish(),
9443
+ color: zColor.nullish(),
9444
+ label: zLabel.nullish(),
9445
+ legend: zLegend.nullish(),
9446
+ tooltip: zTooltip.nullish(),
9447
+ xAxis: zXBandAxis.nullish(),
9448
+ yAxis: zYLinearAxis.nullish(),
9449
+ crosshairRect: zCrosshairRect.nullish(),
9450
+ stackCornerRadius: zStackCornerRadius.nullish(),
9451
+ theme: zTheme.nullish(),
9452
+ barStyle: z.array(zBarStyle).or(zBarStyle).nullish(),
9453
+ annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).nullish(),
9454
+ annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
9455
+ annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
9456
+ annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).nullish(),
9457
+ locale: zLocale.nullish()
9202
9458
  });
9203
9459
  const zBar = z.object({
9204
9460
  chartType: z.literal('bar'),
9205
- dataset: zDataset.optional(),
9206
- dimensions: zDimensions.optional(),
9207
- measures: zMeasureTree.optional(),
9208
- backgroundColor: zBackgroundColor.optional(),
9209
- color: zColor.optional(),
9210
- label: zLabel.optional(),
9211
- legend: zLegend.optional(),
9212
- tooltip: zTooltip.optional(),
9213
- xAxis: zXLinearAxis.optional(),
9214
- yAxis: zYBandAxis.optional(),
9215
- crosshairRect: zCrosshairRect.optional(),
9216
- stackCornerRadius: zStackCornerRadius.optional(),
9217
- theme: zTheme.optional(),
9218
- barStyle: z.array(zBarStyle).or(zBarStyle).optional(),
9219
- annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).optional(),
9220
- annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).optional(),
9221
- annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).optional(),
9222
- annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).optional(),
9223
- locale: zLocale.optional()
9461
+ dataset: zDataset.nullish(),
9462
+ dimensions: zDimensions.nullish(),
9463
+ measures: zMeasureTree.nullish(),
9464
+ backgroundColor: zBackgroundColor.nullish(),
9465
+ color: zColor.nullish(),
9466
+ label: zLabel.nullish(),
9467
+ legend: zLegend.nullish(),
9468
+ tooltip: zTooltip.nullish(),
9469
+ xAxis: zXLinearAxis.nullish(),
9470
+ yAxis: zYBandAxis.nullish(),
9471
+ crosshairRect: zCrosshairRect.nullish(),
9472
+ stackCornerRadius: zStackCornerRadius.nullish(),
9473
+ theme: zTheme.nullish(),
9474
+ barStyle: z.array(zBarStyle).or(zBarStyle).nullish(),
9475
+ annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).nullish(),
9476
+ annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
9477
+ annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
9478
+ annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).nullish(),
9479
+ locale: zLocale.nullish()
9224
9480
  });
9225
9481
  const zBarParallel = z.object({
9226
9482
  chartType: z.literal('barParallel'),
9227
- dataset: zDataset.optional(),
9228
- dimensions: zDimensions.optional(),
9229
- measures: zMeasureTree.optional(),
9230
- backgroundColor: zBackgroundColor.optional(),
9231
- color: zColor.optional(),
9232
- label: zLabel.optional(),
9233
- legend: zLegend.optional(),
9234
- tooltip: zTooltip.optional(),
9235
- xAxis: zXLinearAxis.optional(),
9236
- yAxis: zYBandAxis.optional(),
9237
- crosshairRect: zCrosshairRect.optional(),
9238
- stackCornerRadius: zStackCornerRadius.optional(),
9239
- theme: zTheme.optional(),
9240
- barStyle: z.array(zBarStyle).or(zBarStyle).optional(),
9241
- annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).optional(),
9242
- annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).optional(),
9243
- annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).optional(),
9244
- annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).optional(),
9245
- locale: zLocale.optional()
9483
+ dataset: zDataset.nullish(),
9484
+ dimensions: zDimensions.nullish(),
9485
+ measures: zMeasureTree.nullish(),
9486
+ backgroundColor: zBackgroundColor.nullish(),
9487
+ color: zColor.nullish(),
9488
+ label: zLabel.nullish(),
9489
+ legend: zLegend.nullish(),
9490
+ tooltip: zTooltip.nullish(),
9491
+ xAxis: zXLinearAxis.nullish(),
9492
+ yAxis: zYBandAxis.nullish(),
9493
+ crosshairRect: zCrosshairRect.nullish(),
9494
+ stackCornerRadius: zStackCornerRadius.nullish(),
9495
+ theme: zTheme.nullish(),
9496
+ barStyle: z.array(zBarStyle).or(zBarStyle).nullish(),
9497
+ annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).nullish(),
9498
+ annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
9499
+ annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
9500
+ annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).nullish(),
9501
+ locale: zLocale.nullish()
9246
9502
  });
9247
9503
  const zBarPercent = z.object({
9248
9504
  chartType: z.literal('barPercent'),
9249
- dataset: zDataset.optional(),
9250
- dimensions: zDimensions.optional(),
9251
- measures: zMeasureTree.optional(),
9252
- backgroundColor: zBackgroundColor.optional(),
9253
- color: zColor.optional(),
9254
- label: zLabel.optional(),
9255
- legend: zLegend.optional(),
9256
- tooltip: zTooltip.optional(),
9257
- xAxis: zXLinearAxis.optional(),
9258
- yAxis: zYBandAxis.optional(),
9259
- crosshairRect: zCrosshairRect.optional(),
9260
- stackCornerRadius: zStackCornerRadius.optional(),
9261
- theme: zTheme.optional(),
9262
- barStyle: z.array(zBarStyle).or(zBarStyle).optional(),
9263
- annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).optional(),
9264
- annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).optional(),
9265
- annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).optional(),
9266
- annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).optional(),
9267
- locale: zLocale.optional()
9505
+ dataset: zDataset.nullish(),
9506
+ dimensions: zDimensions.nullish(),
9507
+ measures: zMeasureTree.nullish(),
9508
+ backgroundColor: zBackgroundColor.nullish(),
9509
+ color: zColor.nullish(),
9510
+ label: zLabel.nullish(),
9511
+ legend: zLegend.nullish(),
9512
+ tooltip: zTooltip.nullish(),
9513
+ xAxis: zXLinearAxis.nullish(),
9514
+ yAxis: zYBandAxis.nullish(),
9515
+ crosshairRect: zCrosshairRect.nullish(),
9516
+ stackCornerRadius: zStackCornerRadius.nullish(),
9517
+ theme: zTheme.nullish(),
9518
+ barStyle: z.array(zBarStyle).or(zBarStyle).nullish(),
9519
+ annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).nullish(),
9520
+ annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
9521
+ annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
9522
+ annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).nullish(),
9523
+ locale: zLocale.nullish()
9268
9524
  });
9269
9525
  const zArea = z.object({
9270
9526
  chartType: z.literal('area'),
9271
- dataset: zDataset.optional(),
9272
- dimensions: zDimensions.optional(),
9273
- measures: zMeasureTree.optional(),
9274
- backgroundColor: zBackgroundColor.optional(),
9275
- color: zColor.optional(),
9276
- label: zLabel.optional(),
9277
- legend: zLegend.optional(),
9278
- tooltip: zTooltip.optional(),
9279
- xAxis: zXBandAxis.optional(),
9280
- yAxis: zYLinearAxis.optional(),
9281
- crosshairLine: zCrosshairLine.optional(),
9282
- theme: zTheme.optional(),
9283
- pointStyle: z.array(zPointStyle).or(zPointStyle).optional(),
9284
- lineStyle: z.array(zLineStyle).or(zLineStyle).optional(),
9285
- areaStyle: z.array(zAreaStyle).or(zAreaStyle).optional(),
9286
- annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).optional(),
9287
- annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).optional(),
9288
- annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).optional(),
9289
- annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).optional(),
9290
- locale: zLocale.optional()
9527
+ dataset: zDataset.nullish(),
9528
+ dimensions: zDimensions.nullish(),
9529
+ measures: zMeasureTree.nullish(),
9530
+ backgroundColor: zBackgroundColor.nullish(),
9531
+ color: zColor.nullish(),
9532
+ label: zLabel.nullish(),
9533
+ legend: zLegend.nullish(),
9534
+ tooltip: zTooltip.nullish(),
9535
+ xAxis: zXBandAxis.nullish(),
9536
+ yAxis: zYLinearAxis.nullish(),
9537
+ crosshairLine: zCrosshairLine.nullish(),
9538
+ theme: zTheme.nullish(),
9539
+ pointStyle: z.array(zPointStyle).or(zPointStyle).nullish(),
9540
+ lineStyle: z.array(zLineStyle).or(zLineStyle).nullish(),
9541
+ areaStyle: z.array(zAreaStyle).or(zAreaStyle).nullish(),
9542
+ annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).nullish(),
9543
+ annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
9544
+ annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
9545
+ annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).nullish(),
9546
+ locale: zLocale.nullish()
9291
9547
  });
9292
9548
  const zAreaPercent = z.object({
9293
9549
  chartType: z.literal('areaPercent'),
9294
- dataset: zDataset.optional(),
9295
- dimensions: zDimensions.optional(),
9296
- measures: zMeasureTree.optional(),
9297
- backgroundColor: zBackgroundColor.optional(),
9298
- color: zColor.optional(),
9299
- label: zLabel.optional(),
9300
- legend: zLegend.optional(),
9301
- tooltip: zTooltip.optional(),
9302
- xAxis: zXBandAxis.optional(),
9303
- yAxis: zYLinearAxis.optional(),
9304
- crosshairLine: zCrosshairLine.optional(),
9305
- theme: zTheme.optional(),
9306
- pointStyle: z.array(zPointStyle).or(zPointStyle).optional(),
9307
- lineStyle: z.array(zLineStyle).or(zLineStyle).optional(),
9308
- areaStyle: z.array(zAreaStyle).or(zAreaStyle).optional(),
9309
- annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).optional(),
9310
- annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).optional(),
9311
- annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).optional(),
9312
- annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).optional(),
9313
- locale: zLocale.optional()
9550
+ dataset: zDataset.nullish(),
9551
+ dimensions: zDimensions.nullish(),
9552
+ measures: zMeasureTree.nullish(),
9553
+ backgroundColor: zBackgroundColor.nullish(),
9554
+ color: zColor.nullish(),
9555
+ label: zLabel.nullish(),
9556
+ legend: zLegend.nullish(),
9557
+ tooltip: zTooltip.nullish(),
9558
+ xAxis: zXBandAxis.nullish(),
9559
+ yAxis: zYLinearAxis.nullish(),
9560
+ crosshairLine: zCrosshairLine.nullish(),
9561
+ theme: zTheme.nullish(),
9562
+ pointStyle: z.array(zPointStyle).or(zPointStyle).nullish(),
9563
+ lineStyle: z.array(zLineStyle).or(zLineStyle).nullish(),
9564
+ areaStyle: z.array(zAreaStyle).or(zAreaStyle).nullish(),
9565
+ annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).nullish(),
9566
+ annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
9567
+ annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
9568
+ annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).nullish(),
9569
+ locale: zLocale.nullish()
9314
9570
  });
9315
9571
  const zAreaRange = z.object({
9316
9572
  chartType: z.literal('areaRange'),
9317
- dataset: zDataset.optional(),
9318
- dimensions: zDimensions.optional(),
9319
- measures: zMeasureTree.optional(),
9320
- backgroundColor: zBackgroundColor.optional(),
9321
- label: zLabel.optional(),
9322
- xAxis: zXBandAxis.optional(),
9323
- yAxis: zYLinearAxis.optional(),
9324
- crosshairLine: zCrosshairLine.optional(),
9325
- theme: zTheme.optional(),
9326
- pointStyle: z.array(zPointStyle).or(zPointStyle).optional(),
9327
- lineStyle: z.array(zLineStyle).or(zLineStyle).optional(),
9328
- areaStyle: z.array(zAreaStyle).or(zAreaStyle).optional(),
9329
- annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).optional(),
9330
- annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).optional(),
9331
- annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).optional(),
9332
- annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).optional(),
9333
- locale: zLocale.optional()
9573
+ dataset: zDataset.nullish(),
9574
+ dimensions: zDimensions.nullish(),
9575
+ measures: zMeasureTree.nullish(),
9576
+ backgroundColor: zBackgroundColor.nullish(),
9577
+ label: zLabel.nullish(),
9578
+ xAxis: zXBandAxis.nullish(),
9579
+ yAxis: zYLinearAxis.nullish(),
9580
+ crosshairLine: zCrosshairLine.nullish(),
9581
+ theme: zTheme.nullish(),
9582
+ pointStyle: z.array(zPointStyle).or(zPointStyle).nullish(),
9583
+ lineStyle: z.array(zLineStyle).or(zLineStyle).nullish(),
9584
+ areaStyle: z.array(zAreaStyle).or(zAreaStyle).nullish(),
9585
+ annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).nullish(),
9586
+ annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
9587
+ annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
9588
+ annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).nullish(),
9589
+ locale: zLocale.nullish()
9334
9590
  });
9335
9591
  const zScatter = z.object({
9336
9592
  chartType: z.literal('scatter'),
9337
- dataset: zDataset.optional(),
9338
- dimensions: zDimensions.optional(),
9339
- measures: zMeasureTree.optional(),
9340
- backgroundColor: zBackgroundColor.optional(),
9341
- color: zColor.optional(),
9342
- label: zLabel.optional(),
9343
- legend: zLegend.optional(),
9344
- tooltip: zTooltip.optional(),
9345
- xAxis: zXLinearAxis.optional(),
9346
- yAxis: zYLinearAxis.optional(),
9347
- crosshairLine: zCrosshairLine.optional(),
9348
- theme: zTheme.optional(),
9349
- pointStyle: z.array(zPointStyle).or(zPointStyle).optional(),
9350
- annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).optional(),
9351
- annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).optional(),
9352
- annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).optional(),
9353
- annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).optional(),
9354
- locale: zLocale.optional()
9593
+ dataset: zDataset.nullish(),
9594
+ dimensions: zDimensions.nullish(),
9595
+ measures: zMeasureTree.nullish(),
9596
+ backgroundColor: zBackgroundColor.nullish(),
9597
+ color: zColor.nullish(),
9598
+ label: zLabel.nullish(),
9599
+ legend: zLegend.nullish(),
9600
+ tooltip: zTooltip.nullish(),
9601
+ xAxis: zXLinearAxis.nullish(),
9602
+ yAxis: zYLinearAxis.nullish(),
9603
+ crosshairLine: zCrosshairLine.nullish(),
9604
+ theme: zTheme.nullish(),
9605
+ pointStyle: z.array(zPointStyle).or(zPointStyle).nullish(),
9606
+ annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).nullish(),
9607
+ annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
9608
+ annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
9609
+ annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).nullish(),
9610
+ locale: zLocale.nullish()
9355
9611
  });
9356
9612
  const zDualAxis = z.object({
9357
9613
  chartType: z.literal('dualAxis'),
9358
- dataset: zDataset.optional(),
9359
- dimensions: zDimensions.optional(),
9360
- measures: zMeasureTree.optional(),
9361
- dualMeasures: zDualMeasures.optional(),
9362
- dualChartType: z.array(zDualChartType).or(zDualChartType).optional(),
9363
- primaryYAxis: z.array(zYLinearAxis).or(zYLinearAxis).optional(),
9364
- secondaryYAxis: z.array(zYLinearAxis).or(zYLinearAxis).optional(),
9365
- xAxis: zXBandAxis.optional(),
9366
- backgroundColor: zBackgroundColor.optional(),
9367
- color: zColor.optional(),
9368
- label: zLabel.optional(),
9369
- legend: zLegend.optional(),
9370
- tooltip: zTooltip.optional(),
9371
- crosshairRect: zCrosshairRect.optional(),
9372
- sort: zSort.optional(),
9373
- sortLegend: zSortLegend.optional(),
9374
- theme: zTheme.optional(),
9375
- barStyle: z.array(zBarStyle).or(zBarStyle).optional(),
9376
- pointStyle: z.array(zPointStyle).or(zPointStyle).optional(),
9377
- lineStyle: z.array(zLineStyle).or(zLineStyle).optional(),
9378
- areaStyle: z.array(zAreaStyle).or(zAreaStyle).optional(),
9379
- annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).optional(),
9380
- annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).optional(),
9381
- annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).optional(),
9382
- annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).optional(),
9383
- locale: zLocale.optional()
9614
+ dataset: zDataset.nullish(),
9615
+ dimensions: zDimensions.nullish(),
9616
+ measures: zMeasureTree.nullish(),
9617
+ dualMeasures: zDualMeasures.nullish(),
9618
+ dualChartType: z.array(zDualChartType).or(zDualChartType).nullish(),
9619
+ alignTicks: z.array(z.boolean()).or(z.boolean()).nullish(),
9620
+ primaryYAxis: z.array(zYLinearAxis).or(zYLinearAxis).nullish(),
9621
+ secondaryYAxis: z.array(zYLinearAxis).or(zYLinearAxis).nullish(),
9622
+ xAxis: zXBandAxis.nullish(),
9623
+ backgroundColor: zBackgroundColor.nullish(),
9624
+ color: zColor.nullish(),
9625
+ label: zLabel.nullish(),
9626
+ legend: zLegend.nullish(),
9627
+ tooltip: zTooltip.nullish(),
9628
+ crosshairRect: zCrosshairRect.nullish(),
9629
+ sort: zSort.nullish(),
9630
+ sortLegend: zSortLegend.nullish(),
9631
+ theme: zTheme.nullish(),
9632
+ barStyle: z.array(zBarStyle).or(zBarStyle).nullish(),
9633
+ pointStyle: z.array(zPointStyle).or(zPointStyle).nullish(),
9634
+ lineStyle: z.array(zLineStyle).or(zLineStyle).nullish(),
9635
+ areaStyle: z.array(zAreaStyle).or(zAreaStyle).nullish(),
9636
+ annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).nullish(),
9637
+ annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
9638
+ annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
9639
+ annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).nullish(),
9640
+ locale: zLocale.nullish()
9384
9641
  });
9385
9642
  const zRose = z.object({
9386
9643
  chartType: z.literal('rose'),
9387
- dataset: zDataset.optional(),
9388
- dimensions: zDimensions.optional(),
9389
- measures: zMeasureTree.optional(),
9390
- backgroundColor: zBackgroundColor.optional(),
9391
- color: zColor.optional(),
9392
- label: zLabel.optional(),
9393
- legend: zLegend.optional(),
9394
- tooltip: zTooltip.optional(),
9395
- theme: zTheme.optional(),
9396
- locale: zLocale.optional()
9644
+ dataset: zDataset.nullish(),
9645
+ dimensions: zDimensions.nullish(),
9646
+ measures: zMeasureTree.nullish(),
9647
+ backgroundColor: zBackgroundColor.nullish(),
9648
+ color: zColor.nullish(),
9649
+ label: zLabel.nullish(),
9650
+ legend: zLegend.nullish(),
9651
+ tooltip: zTooltip.nullish(),
9652
+ theme: zTheme.nullish(),
9653
+ locale: zLocale.nullish()
9397
9654
  });
9398
9655
  const zRoseParallel = z.object({
9399
9656
  chartType: z.literal('roseParallel'),
9400
- dataset: zDataset.optional(),
9401
- dimensions: zDimensions.optional(),
9402
- measures: zMeasureTree.optional(),
9403
- backgroundColor: zBackgroundColor.optional(),
9404
- color: zColor.optional(),
9405
- label: zLabel.optional(),
9406
- legend: zLegend.optional(),
9407
- tooltip: zTooltip.optional(),
9408
- theme: zTheme.optional(),
9409
- locale: zLocale.optional()
9657
+ dataset: zDataset.nullish(),
9658
+ dimensions: zDimensions.nullish(),
9659
+ measures: zMeasureTree.nullish(),
9660
+ backgroundColor: zBackgroundColor.nullish(),
9661
+ color: zColor.nullish(),
9662
+ label: zLabel.nullish(),
9663
+ legend: zLegend.nullish(),
9664
+ tooltip: zTooltip.nullish(),
9665
+ theme: zTheme.nullish(),
9666
+ locale: zLocale.nullish()
9410
9667
  });
9411
9668
  const zPie = z.object({
9412
9669
  chartType: z.literal('pie'),
9413
- dataset: zDataset.optional(),
9414
- dimensions: zDimensions.optional(),
9415
- measures: zMeasureTree.optional(),
9416
- backgroundColor: zBackgroundColor.optional(),
9417
- color: zColor.optional(),
9418
- label: zLabel.optional(),
9419
- legend: zLegend.optional(),
9420
- tooltip: zTooltip.optional(),
9421
- theme: zTheme.optional(),
9422
- locale: zLocale.optional()
9670
+ dataset: zDataset.nullish(),
9671
+ dimensions: zDimensions.nullish(),
9672
+ measures: zMeasureTree.nullish(),
9673
+ backgroundColor: zBackgroundColor.nullish(),
9674
+ color: zColor.nullish(),
9675
+ label: zLabel.nullish(),
9676
+ legend: zLegend.nullish(),
9677
+ tooltip: zTooltip.nullish(),
9678
+ theme: zTheme.nullish(),
9679
+ locale: zLocale.nullish()
9423
9680
  });
9424
9681
  const zDonut = z.object({
9425
9682
  chartType: z.literal('donut'),
9426
- dataset: zDataset.optional(),
9427
- dimensions: zDimensions.optional(),
9428
- measures: zMeasureTree.optional(),
9429
- backgroundColor: zBackgroundColor.optional(),
9430
- color: zColor.optional(),
9431
- label: zLabel.optional(),
9432
- legend: zLegend.optional(),
9433
- tooltip: zTooltip.optional(),
9434
- theme: zTheme.optional(),
9435
- locale: zLocale.optional()
9683
+ dataset: zDataset.nullish(),
9684
+ dimensions: zDimensions.nullish(),
9685
+ measures: zMeasureTree.nullish(),
9686
+ backgroundColor: zBackgroundColor.nullish(),
9687
+ color: zColor.nullish(),
9688
+ label: zLabel.nullish(),
9689
+ legend: zLegend.nullish(),
9690
+ tooltip: zTooltip.nullish(),
9691
+ theme: zTheme.nullish(),
9692
+ locale: zLocale.nullish()
9436
9693
  });
9437
9694
  const zRadar = z.object({
9438
9695
  chartType: z.literal('radar'),
9439
- dataset: zDataset.optional(),
9440
- dimensions: zDimensions.optional(),
9441
- measures: zMeasureTree.optional(),
9442
- backgroundColor: zBackgroundColor.optional(),
9443
- color: zColor.optional(),
9444
- label: zLabel.optional(),
9445
- legend: zLegend.optional(),
9446
- tooltip: zTooltip.optional(),
9447
- theme: zTheme.optional(),
9448
- locale: zLocale.optional()
9696
+ dataset: zDataset.nullish(),
9697
+ dimensions: zDimensions.nullish(),
9698
+ measures: zMeasureTree.nullish(),
9699
+ backgroundColor: zBackgroundColor.nullish(),
9700
+ color: zColor.nullish(),
9701
+ label: zLabel.nullish(),
9702
+ legend: zLegend.nullish(),
9703
+ tooltip: zTooltip.nullish(),
9704
+ theme: zTheme.nullish(),
9705
+ locale: zLocale.nullish()
9449
9706
  });
9450
9707
  const zFunnel = z.object({
9451
9708
  chartType: z.literal('funnel'),
9452
- dataset: zDataset.optional(),
9453
- dimensions: zDimensions.optional(),
9454
- measures: zMeasureTree.optional(),
9455
- backgroundColor: zBackgroundColor.optional(),
9456
- color: zLinearColor.optional(),
9457
- label: zLabel.optional(),
9458
- legend: zColorLegend.optional(),
9459
- tooltip: zTooltip.optional(),
9460
- theme: zTheme.optional(),
9461
- locale: zLocale.optional()
9709
+ dataset: zDataset.nullish(),
9710
+ dimensions: zDimensions.nullish(),
9711
+ measures: zMeasureTree.nullish(),
9712
+ backgroundColor: zBackgroundColor.nullish(),
9713
+ color: zLinearColor.nullish(),
9714
+ label: zLabel.nullish(),
9715
+ legend: zColorLegend.nullish(),
9716
+ tooltip: zTooltip.nullish(),
9717
+ theme: zTheme.nullish(),
9718
+ locale: zLocale.nullish()
9462
9719
  });
9463
9720
  const zHeatmap = z.object({
9464
9721
  chartType: z.literal('heatmap'),
9465
- dataset: zDataset.optional(),
9466
- dimensions: zDimensions.optional(),
9467
- measures: zMeasureTree.optional(),
9468
- backgroundColor: zBackgroundColor.optional(),
9469
- color: zLinearColor.optional(),
9470
- label: zLabel.optional(),
9471
- legend: zColorLegend.optional(),
9472
- tooltip: zTooltip.optional(),
9473
- theme: zTheme.optional(),
9474
- locale: zLocale.optional()
9722
+ dataset: zDataset.nullish(),
9723
+ dimensions: zDimensions.nullish(),
9724
+ measures: zMeasureTree.nullish(),
9725
+ backgroundColor: zBackgroundColor.nullish(),
9726
+ color: zLinearColor.nullish(),
9727
+ label: zLabel.nullish(),
9728
+ legend: zColorLegend.nullish(),
9729
+ tooltip: zTooltip.nullish(),
9730
+ theme: zTheme.nullish(),
9731
+ locale: zLocale.nullish()
9475
9732
  });
9476
9733
  const zVSeed = z.discriminatedUnion('chartType', [
9477
9734
  zTable,
@@ -9511,6 +9768,6 @@ const zAdvancedVSeed = z.object({
9511
9768
  annotation: zAnnotation,
9512
9769
  locale: zLocale
9513
9770
  });
9514
- export { Builder, FoldMeasureId, FoldMeasureName, FoldMeasureValue, FoldPrimaryMeasureValue, FoldSecondaryMeasureValue, ORIGINAL_DATA, Separator, UnfoldDimensionGroup, UnfoldDimensionGroupId, areaAdvancedPipeline, areaPercentAdvancedPipeline, areaPercentSpecPipeline, areaRangeAdvancedPipeline, areaRangeSpecPipeline, areaSpecPipeline, autoFormatter, autoNumFormatter, barAdvancedPipeline, barParallelAdvancedPipeline, barParallelSpecPipeline, barPercentAdvancedPipeline, barPercentSpecPipeline, barSpecPipeline, columnAdvancedPipeline, columnParallelAdvancedPipeline, columnParallelSpecPipeline, columnPercentAdvancedPipeline, columnPercentSpecPipeline, columnSpecPipeline, createFormatter, createNumFormatter, darkTheme, dataReshapeFor1D, dataReshapeFor1D1M, dataReshapeFor1D2M, dataReshapeFor2D1M, dataReshapeFor2D1M0Name, donutAdvancedPipeline, donutSpecPipeline, dualAxisAdvancedPipeline, dualAxisSpecPipeline, execPipeline, findAllDimensions, findAllMeasures, findDimensionById, findFirstDimension, findFirstMeasure, findMeasureById, foldMeasures, funnelAdvancedPipeline, funnelSpecPipeline, heatmapAdvancedPipeline, heatmapSpecPipeline, i18n, intl, isDimensionSelector, isMeasureSelector, isPartialDatumSelector, isPivotChart, isPivotTable, isTable, isVChart, isVTable, isValueSelector, lightTheme, lineAdvancedPipeline, lineSpecPipeline, measureDepth, pieAdvancedPipeline, pieSpecPipeline, pivotTableAdvancedPipeline, pivotTableSpecPipeline, preorderTraverse, radarAdvancedPipeline, radarSpecPipeline, registerAll, registerArea, registerAreaPercent, registerAreaRange, registerBar, registerBarParallel, registerBarPercent, registerColumn, registerColumnParallel, registerColumnPercent, registerCustomTheme, registerDarkTheme, registerDonut, registerFunnel, registerHeatmap, registerLightTheme, registerLine, registerPie, registerPivotTable, registerRadar, registerRose, registerRoseParallel, registerScatter, registerTable, roseAdvancedPipeline, roseParallelAdvancedPipeline, roseParallelSpecPipeline, roseSpecPipeline, scatterAdvancedPipeline, scatterSpecPipeline, selector_selector as selector, tableAdvancedPipeline, tableSpecPipeline, unfoldDimensions, updateAdvanced, updateSpec, zAdvancedVSeed, zAnalysis, zAnnotation, zAnnotationArea, zAnnotationHorizontalLine, zAnnotationPoint, zAnnotationVerticalLine, zArea, zAreaConfig, zAreaPercent, zAreaPercentConfig, zAreaRange, zAreaRangeConfig, zAreaStyle, zAxis, zBackgroundColor, zBar, zBarConfig, zBarParallel, zBarParallelConfig, zBarPercent, zBarPercentConfig, zBarStyle, zChartType, zColor, zColorLegend, zColumn, zColumnConfig, zColumnParallel, zColumnParallelConfig, zColumnPercent, zColumnPercentConfig, zConfig, zCrosshairLine, zCrosshairRect, zCustomTheme, zCustomThemeConfig, zDataset, zDatasetReshapeInfo, zDatum, zDimension, zDimensionGroup, zDimensionTree, zDimensions, zDonut, zDonutConfig, zDualAxis, zDualAxisConfig, zDualChartType, zDualMeasure, zDualMeasures, zEncoding, zFoldInfo, zFunnel, zFunnelConfig, zHeatmap, zHeatmapConfig, zLabel, zLegend, zLine, zLineConfig, zLineStyle, zLinearColor, zLocale, zMarkStyle, zMeasure, zMeasureGroup, zMeasureTree, zMeasures, zNumFormat, zPie, zPieConfig, zPivotTable, zPivotTableConfig, zPointStyle, zRadar, zRadarConfig, zRose, zRoseConfig, zRoseParallel, zRoseParallelConfig, zScatter, zScatterConfig, zSort, zSortLegend, zStackCornerRadius, zTable, zTableConfig, zTheme, zTooltip, zUnfoldInfo, zVSeed, zXBandAxis, zXLinearAxis, zYBandAxis, zYLinearAxis };
9771
+ export { Builder, FoldMeasureId, FoldMeasureName, FoldMeasureValue, FoldPrimaryMeasureValue, FoldSecondaryMeasureValue, ORIGINAL_DATA, Separator, UnfoldDimensionGroup, UnfoldDimensionGroupId, areaAdvancedPipeline, areaPercentAdvancedPipeline, areaPercentSpecPipeline, areaRangeAdvancedPipeline, areaRangeSpecPipeline, areaSpecPipeline, autoFormatter, autoNumFormatter, barAdvancedPipeline, barParallelAdvancedPipeline, barParallelSpecPipeline, barPercentAdvancedPipeline, barPercentSpecPipeline, barSpecPipeline, columnAdvancedPipeline, columnParallelAdvancedPipeline, columnParallelSpecPipeline, columnPercentAdvancedPipeline, columnPercentSpecPipeline, columnSpecPipeline, createFormatter, createNumFormatter, darkTheme, dataReshapeFor1D, dataReshapeFor1D1M, dataReshapeFor1D2M, dataReshapeFor2D1M, dataReshapeFor2D1M0Name, donutAdvancedPipeline, donutSpecPipeline, dualAxisAdvancedPipeline, dualAxisSpecPipeline, execPipeline, findAllDimensions, findAllMeasures, findDimensionById, findFirstDimension, findFirstMeasure, findMeasureById, foldMeasures, funnelAdvancedPipeline, funnelSpecPipeline, heatmapAdvancedPipeline, heatmapSpecPipeline, i18n, intl, isDimension, isDimensionGroup, isDimensionSelector, isDimensions, isMeasure, isMeasureGroup, isMeasureSelector, isMeasures, isPartialDatumSelector, isPivotChart, isPivotTable, isTable, isVChart, isVTable, isValueSelector, lightTheme, lineAdvancedPipeline, lineSpecPipeline, measureDepth, pieAdvancedPipeline, pieSpecPipeline, pivotTableAdvancedPipeline, pivotTableSpecPipeline, preorderTraverse, radarAdvancedPipeline, radarSpecPipeline, registerAll, registerArea, registerAreaPercent, registerAreaRange, registerBar, registerBarParallel, registerBarPercent, registerColumn, registerColumnParallel, registerColumnPercent, registerCustomTheme, registerDarkTheme, registerDonut, registerFunnel, registerHeatmap, registerLightTheme, registerLine, registerPie, registerPivotTable, registerRadar, registerRose, registerRoseParallel, registerScatter, registerTable, roseAdvancedPipeline, roseParallelAdvancedPipeline, roseParallelSpecPipeline, roseSpecPipeline, scatterAdvancedPipeline, scatterSpecPipeline, selector_selector as selector, tableAdvancedPipeline, tableSpecPipeline, unfoldDimensions, updateAdvanced, updateSpec, zAdvancedVSeed, zAnalysis, zAnnotation, zAnnotationArea, zAnnotationHorizontalLine, zAnnotationPoint, zAnnotationVerticalLine, zArea, zAreaConfig, zAreaPercent, zAreaPercentConfig, zAreaRange, zAreaRangeConfig, zAreaStyle, zAxis, zBackgroundColor, zBar, zBarConfig, zBarParallel, zBarParallelConfig, zBarPercent, zBarPercentConfig, zBarStyle, zChartType, zColor, zColorLegend, zColumn, zColumnConfig, zColumnParallel, zColumnParallelConfig, zColumnPercent, zColumnPercentConfig, zConfig, zCrosshairLine, zCrosshairRect, zCustomTheme, zCustomThemeConfig, zDataset, zDatasetReshapeInfo, zDatum, zDimension, zDimensionGroup, zDimensionTree, zDimensions, zDonut, zDonutConfig, zDualAxis, zDualAxisConfig, zDualChartType, zDualMeasure, zDualMeasures, zEncoding, zFoldInfo, zFunnel, zFunnelConfig, zHeatmap, zHeatmapConfig, zLabel, zLegend, zLine, zLineConfig, zLineStyle, zLinearColor, zLocale, zMarkStyle, zMeasure, zMeasureGroup, zMeasureTree, zMeasures, zNumFormat, zPie, zPieConfig, zPivotTable, zPivotTableConfig, zPointStyle, zRadar, zRadarConfig, zRose, zRoseConfig, zRoseParallel, zRoseParallelConfig, zScatter, zScatterConfig, zSort, zSortLegend, zStackCornerRadius, zTable, zTableConfig, zTheme, zTooltip, zUnfoldInfo, zVSeed, zXBandAxis, zXLinearAxis, zYBandAxis, zYLinearAxis };
9515
9772
 
9516
9773
  //# sourceMappingURL=index.js.map