@visactor/vseed 0.0.36 → 0.0.37

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 (112) hide show
  1. package/dist/builder/builder/builder.d.ts +8924 -8912
  2. package/dist/index.cjs +1103 -869
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.js +1071 -855
  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/dimensions/index.d.ts +1 -0
  18. package/dist/pipeline/utils/dimensions/typeGuard.d.ts +4 -0
  19. package/dist/pipeline/utils/measures/index.d.ts +1 -0
  20. package/dist/pipeline/utils/measures/typeGuard.d.ts +4 -0
  21. package/dist/types/advancedVSeed.d.ts +3843 -3839
  22. package/dist/types/chartType/area/zArea.d.ts +569 -569
  23. package/dist/types/chartType/areaPercent/zAreaPercent.d.ts +569 -569
  24. package/dist/types/chartType/areaRange/zAreaRange.d.ts +550 -550
  25. package/dist/types/chartType/bar/bar.d.ts +0 -1183
  26. package/dist/types/chartType/bar/index.d.ts +2 -1
  27. package/dist/types/chartType/bar/zBar.d.ts +1183 -0
  28. package/dist/types/chartType/barParallel/barParallel.d.ts +0 -1183
  29. package/dist/types/chartType/barParallel/index.d.ts +2 -1
  30. package/dist/types/chartType/barParallel/zBarParallel.d.ts +1183 -0
  31. package/dist/types/chartType/barPercent/barPercent.d.ts +0 -1183
  32. package/dist/types/chartType/barPercent/index.d.ts +2 -1
  33. package/dist/types/chartType/barPercent/zBarPercent.d.ts +1183 -0
  34. package/dist/types/chartType/column/column.d.ts +0 -1183
  35. package/dist/types/chartType/column/index.d.ts +2 -1
  36. package/dist/types/chartType/column/zColumn.d.ts +1183 -0
  37. package/dist/types/chartType/columnParallel/columnParallel.d.ts +0 -1183
  38. package/dist/types/chartType/columnParallel/index.d.ts +2 -1
  39. package/dist/types/chartType/columnParallel/zColumnParallel.d.ts +1183 -0
  40. package/dist/types/chartType/columnPercent/columnPercent.d.ts +0 -1183
  41. package/dist/types/chartType/columnPercent/index.d.ts +2 -1
  42. package/dist/types/chartType/columnPercent/zColumnPercent.d.ts +1183 -0
  43. package/dist/types/chartType/donut/donut.d.ts +0 -119
  44. package/dist/types/chartType/donut/index.d.ts +2 -1
  45. package/dist/types/chartType/donut/zDonut.d.ts +119 -0
  46. package/dist/types/chartType/dualAxis/zDualAxis.d.ts +747 -747
  47. package/dist/types/chartType/funnel/funnel.d.ts +0 -89
  48. package/dist/types/chartType/funnel/index.d.ts +2 -1
  49. package/dist/types/chartType/funnel/zFunnel.d.ts +89 -0
  50. package/dist/types/chartType/heatmap/heatmap.d.ts +0 -89
  51. package/dist/types/chartType/heatmap/index.d.ts +2 -1
  52. package/dist/types/chartType/heatmap/zHeatmap.d.ts +89 -0
  53. package/dist/types/chartType/line/index.d.ts +2 -1
  54. package/dist/types/chartType/line/line.d.ts +0 -1365
  55. package/dist/types/chartType/line/zLine.d.ts +1365 -0
  56. package/dist/types/chartType/pie/index.d.ts +2 -1
  57. package/dist/types/chartType/pie/pie.d.ts +0 -119
  58. package/dist/types/chartType/pie/zPie.d.ts +119 -0
  59. package/dist/types/chartType/pivotTable/index.d.ts +2 -1
  60. package/dist/types/chartType/pivotTable/pivotTable.d.ts +44 -60
  61. package/dist/types/chartType/pivotTable/zPivotTable.d.ts +68 -0
  62. package/dist/types/chartType/radar/index.d.ts +2 -1
  63. package/dist/types/chartType/radar/radar.d.ts +0 -119
  64. package/dist/types/chartType/radar/zRadar.d.ts +119 -0
  65. package/dist/types/chartType/rose/index.d.ts +2 -1
  66. package/dist/types/chartType/rose/rose.d.ts +0 -119
  67. package/dist/types/chartType/rose/zRose.d.ts +119 -0
  68. package/dist/types/chartType/roseParallel/index.d.ts +2 -1
  69. package/dist/types/chartType/roseParallel/roseParallel.d.ts +0 -119
  70. package/dist/types/chartType/roseParallel/zRoseParallel.d.ts +119 -0
  71. package/dist/types/chartType/scatter/index.d.ts +2 -1
  72. package/dist/types/chartType/scatter/scatter.d.ts +0 -1191
  73. package/dist/types/chartType/scatter/zScatter.d.ts +1191 -0
  74. package/dist/types/chartType/table/index.d.ts +2 -1
  75. package/dist/types/chartType/table/table.d.ts +45 -64
  76. package/dist/types/chartType/table/zTable.d.ts +68 -0
  77. package/dist/types/dataSelector/selector.d.ts +16 -16
  78. package/dist/types/properties/analysis/analysis.d.ts +1 -1
  79. package/dist/types/properties/analysis/sort.d.ts +2 -4
  80. package/dist/types/properties/analysis/sortLegend.d.ts +2 -3
  81. package/dist/types/properties/annotation/annotation.d.ts +308 -308
  82. package/dist/types/properties/annotation/annotationArea.d.ts +20 -130
  83. package/dist/types/properties/annotation/annotationHorizontalLine.d.ts +31 -138
  84. package/dist/types/properties/annotation/annotationPoint.d.ts +20 -114
  85. package/dist/types/properties/annotation/annotationVerticalLine.d.ts +6 -113
  86. package/dist/types/properties/annotation/index.d.ts +8 -4
  87. package/dist/types/properties/annotation/zAnnotationArea.d.ts +110 -0
  88. package/dist/types/properties/annotation/zAnnotationHorizontalLine.d.ts +107 -0
  89. package/dist/types/properties/annotation/zAnnotationPoint.d.ts +94 -0
  90. package/dist/types/properties/annotation/zAnnotationVerticalLine.d.ts +107 -0
  91. package/dist/types/properties/config/axes/axis.d.ts +44 -44
  92. package/dist/types/properties/config/axes/bandAxis.d.ts +74 -74
  93. package/dist/types/properties/config/axes/linearAxis.d.ts +76 -76
  94. package/dist/types/properties/config/backgroundColor/backgroundColor.d.ts +1 -1
  95. package/dist/types/properties/config/color/color.d.ts +3 -3
  96. package/dist/types/properties/config/config.d.ts +3286 -3282
  97. package/dist/types/properties/config/crosshair/crosshair.d.ts +10 -10
  98. package/dist/types/properties/config/label/label.d.ts +1 -1
  99. package/dist/types/properties/config/legend/legend.d.ts +13 -13
  100. package/dist/types/properties/config/tooltip/tooltip.d.ts +1 -1
  101. package/dist/types/properties/datasetReshapeInfo/datasetReshapeInfo.d.ts +2 -2
  102. package/dist/types/properties/encoding/encoding.d.ts +8 -8
  103. package/dist/types/properties/markStyle/areaStyle.d.ts +20 -20
  104. package/dist/types/properties/markStyle/barStyle.d.ts +24 -24
  105. package/dist/types/properties/markStyle/lineStyle.d.ts +24 -24
  106. package/dist/types/properties/markStyle/markStyle.d.ts +194 -194
  107. package/dist/types/properties/markStyle/pointStyle.d.ts +35 -35
  108. package/dist/types/properties/theme/customTheme.d.ts +3334 -3330
  109. package/dist/types/vseed.d.ts +6781 -6755
  110. package/dist/umd/index.js +1113 -891
  111. package/dist/umd/index.js.map +1 -1
  112. 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,
@@ -693,7 +853,7 @@ const initPivotTable = (spec, context)=>{
693
853
  direction: 'row'
694
854
  },
695
855
  theme: {
696
- underlayBackgroundColor: 'transparent'
856
+ underlayBackgroundColor: backgroundColor
697
857
  }
698
858
  };
699
859
  };
@@ -725,26 +885,39 @@ const pivotRows = (spec, context)=>{
725
885
  };
726
886
  const pivotIndicators = (spec, context)=>{
727
887
  const { advancedVSeed } = context;
888
+ const { locale } = advancedVSeed;
728
889
  const measures = advancedVSeed.measures;
729
890
  return {
730
891
  ...spec,
731
892
  indicatorsAsCol: true,
732
893
  indicatorTitle: intl.i18n`指标名称`,
733
- indicators: measures.map((item)=>({
894
+ indicators: measures.map((item)=>{
895
+ if (isMeasure(item)) return {
734
896
  cellType: 'text',
735
897
  indicatorKey: item.id,
736
898
  title: item.alias || item.id,
737
- width: 'auto'
738
- }))
899
+ width: 'auto',
900
+ format: pivotIndicators_fieldFormat(item, locale)
901
+ };
902
+ return {};
903
+ })
739
904
  };
740
905
  };
906
+ const pivotIndicators_fieldFormat = (node, locale)=>(value)=>{
907
+ const { format = {}, autoFormat = true } = node;
908
+ if (!isEmpty(format)) {
909
+ const formatter = createFormatter(format);
910
+ return formatter(value);
911
+ }
912
+ if (autoFormat) return autoFormatter(value, locale);
913
+ };
741
914
  const rowHeaderStyle = (spec, context)=>{
742
915
  const result = {
743
916
  ...spec
744
917
  };
745
918
  const { advancedVSeed } = context;
746
- const { customTheme, chartType } = advancedVSeed;
747
- const themConfig = customTheme?.config?.[chartType];
919
+ const { config, chartType } = advancedVSeed;
920
+ const themConfig = config?.[chartType];
748
921
  if (!result.theme || !themConfig) return result;
749
922
  const borderColor = themConfig.borderColor || 'rgb(224, 224, 224)';
750
923
  const backgroundColor = themConfig.headerBackgroundColor || '#EEF1F5';
@@ -791,8 +964,8 @@ const cornerHeaderStyle = (spec, context)=>{
791
964
  ...spec
792
965
  };
793
966
  const { advancedVSeed } = context;
794
- const { customTheme, chartType } = advancedVSeed;
795
- const themConfig = customTheme?.config?.[chartType];
967
+ const { config, chartType } = advancedVSeed;
968
+ const themConfig = config?.[chartType];
796
969
  if (!result.theme || !themConfig) return result;
797
970
  const borderColor = themConfig.borderColor || 'rgb(224, 224, 224)';
798
971
  const backgroundColor = themConfig.headerBackgroundColor || '#EEF1F5';
@@ -814,9 +987,9 @@ const cornerHeaderStyle = (spec, context)=>{
814
987
  ],
815
988
  textAlign: 'left',
816
989
  hover: {
817
- cellBgColor: hoverCellColor,
818
- inlineRowBgColor: hoverInlineColor,
819
- inlineColumnBgColor: hoverInlineColor
990
+ cellBgColor: hoverCellColor || void 0,
991
+ inlineRowBgColor: hoverInlineColor || void 0,
992
+ inlineColumnBgColor: hoverInlineColor || void 0
820
993
  },
821
994
  frameStyle: {
822
995
  borderColor: [
@@ -837,6 +1010,29 @@ const cornerHeaderStyle = (spec, context)=>{
837
1010
  };
838
1011
  return result;
839
1012
  };
1013
+ var new_data_set_AggregationType;
1014
+ !function(AggregationType) {
1015
+ 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";
1016
+ }(new_data_set_AggregationType || (new_data_set_AggregationType = {}));
1017
+ var new_data_set_SortType;
1018
+ !function(SortType) {
1019
+ SortType.ASC = "ASC", SortType.DESC = "DESC", SortType.NORMAL = "NORMAL", SortType.desc = "desc", SortType.asc = "asc", SortType.normal = "normal";
1020
+ }(new_data_set_SortType || (new_data_set_SortType = {}));
1021
+ const dataConfig = (spec, context)=>{
1022
+ const { advancedVSeed } = context;
1023
+ const measures = findAllMeasures(advancedVSeed.measures);
1024
+ const aggregationRules = measures.map((measure)=>({
1025
+ field: measure.id,
1026
+ aggregationType: new_data_set_AggregationType.NONE,
1027
+ indicatorKey: measure.id
1028
+ }));
1029
+ return {
1030
+ ...spec,
1031
+ dataConfig: {
1032
+ aggregationRules
1033
+ }
1034
+ };
1035
+ };
840
1036
  const pivotTableSpecPipeline = [
841
1037
  initPivotTable,
842
1038
  pivotColumns,
@@ -847,7 +1043,8 @@ const pivotTableSpecPipeline = [
847
1043
  rowHeaderStyle,
848
1044
  cornerHeaderStyle,
849
1045
  frameStyle,
850
- selectionStyle
1046
+ selectionStyle,
1047
+ dataConfig
851
1048
  ];
852
1049
  const registerPivotTable = ()=>{
853
1050
  Builder._advancedPipelineMap.pivotTable = pivotTableAdvancedPipeline;
@@ -1542,7 +1739,7 @@ const background_backgroundColor = (spec, context)=>{
1542
1739
  const datasetXY = (spec, context)=>{
1543
1740
  const { advancedVSeed, vseed } = context;
1544
1741
  const { encoding, analysis, datasetReshapeInfo } = advancedVSeed;
1545
- const { orderMapping = {} } = analysis ?? {};
1742
+ const orderMapping = analysis?.orderMapping || {};
1546
1743
  const angle = encoding[0]?.angle?.[0];
1547
1744
  const x = encoding[0]?.x?.[0];
1548
1745
  const group = encoding[0]?.group?.[0];
@@ -1587,7 +1784,7 @@ const progressive = (spec, context)=>{
1587
1784
  ...spec
1588
1785
  };
1589
1786
  const { advancedVSeed } = context;
1590
- const { dataset } = advancedVSeed;
1787
+ const { dataset = [] } = advancedVSeed;
1591
1788
  const size = dataset.length;
1592
1789
  if (size < 5000) return result;
1593
1790
  result.large = true;
@@ -1692,64 +1889,6 @@ const xBand = (spec, context)=>{
1692
1889
  };
1693
1890
  const ANNOTATION_Z_INDEX = 1000;
1694
1891
  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);
1753
1892
  const yLinear = (spec, context)=>{
1754
1893
  const result = {
1755
1894
  ...spec
@@ -1952,7 +2091,11 @@ const verticalCrosshairLine = (spec, context)=>{
1952
2091
  const config = advancedVSeed.config?.[chartType]?.crosshairLine;
1953
2092
  if (!config) return result;
1954
2093
  if (!result.crosshair) result.crosshair = {};
1955
- const { visible = true, lineColor, labelColor, labelVisible, labelBackgroundColor } = config;
2094
+ const visible = config.visible || true;
2095
+ const lineColor = config.lineColor || void 0;
2096
+ const labelColor = config.labelColor || void 0;
2097
+ const labelVisible = config.labelVisible || void 0;
2098
+ const labelBackgroundColor = config.labelBackgroundColor || void 0;
1956
2099
  const crosshair = result.crosshair;
1957
2100
  crosshair.xField = {
1958
2101
  visible,
@@ -2342,7 +2485,7 @@ const annotationPoint_annotationPoint = (spec, context)=>{
2342
2485
  annotationPoint
2343
2486
  ];
2344
2487
  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;
2488
+ 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
2489
  const dataset = advancedVSeed.dataset.flat();
2347
2490
  const selectedData = selectorPoint ? dataset.filter((datum)=>selector_selector(datum, selectorPoint)) : [];
2348
2491
  return selectedData.map((datum)=>({
@@ -2371,20 +2514,20 @@ const annotationPoint_annotationPoint = (spec, context)=>{
2371
2514
  textAlign: textAlign,
2372
2515
  textBaseline: textBaseline,
2373
2516
  fill: textColor,
2374
- stroke: backgroundColor,
2517
+ stroke: textBackgroundColor,
2375
2518
  lineWidth: 1,
2376
2519
  fontSize: textFontSize,
2377
2520
  fontWeight: textFontWeight,
2378
2521
  dy: textFontSize
2379
2522
  },
2380
2523
  labelBackground: {
2381
- visible: backgroundVisible,
2382
- padding: backgroundPadding,
2524
+ visible: textBackgroundVisible,
2525
+ padding: textBackgroundPadding,
2383
2526
  style: {
2384
- cornerRadius: backgroundBorderRadius ?? 4,
2385
- fill: backgroundColor,
2386
- stroke: backgroundBorderColor,
2387
- lineWidth: backgroundBorderWidth,
2527
+ cornerRadius: textBackgroundBorderRadius ?? 4,
2528
+ fill: textBackgroundColor,
2529
+ stroke: textBackgroundBorderColor,
2530
+ lineWidth: textBackgroundBorderWidth,
2388
2531
  dy: textFontSize
2389
2532
  }
2390
2533
  }
@@ -2414,7 +2557,7 @@ const annotationVerticalLine_annotationVerticalLine = (spec, context)=>{
2414
2557
  insideEnd: 'insideEndTop'
2415
2558
  };
2416
2559
  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;
2560
+ const { selector: selectorPoint, xValue, text = '', textPosition = 'insideEnd', textColor = '#ffffff', textFontSize = 12, textFontWeight = 400, textAlign = 'right', textBaseline = 'top', textBackgroundVisible = true, textBackgroundBorderColor = '#212121', textBackgroundColor = '#212121', textBackgroundBorderRadius = 4, textBackgroundBorderWidth = 1, textBackgroundPadding = 2, lineVisible = true, lineColor = '#212121', lineWidth = 1, lineStyle = 'dashed', offsetX = 0, offsetY = 0 } = annotationVerticalLine;
2418
2561
  const dataset = advancedVSeed.dataset.flat();
2419
2562
  const generateOneMarkLine = (x)=>({
2420
2563
  x: x,
@@ -2440,10 +2583,10 @@ const annotationVerticalLine_annotationVerticalLine = (spec, context)=>{
2440
2583
  },
2441
2584
  label: {
2442
2585
  text: text,
2443
- position: positionMap[textPosition],
2586
+ position: positionMap[textPosition || 'insideEnd'],
2444
2587
  style: {
2445
2588
  visible: true,
2446
- stroke: backgroundColor,
2589
+ stroke: textBackgroundColor,
2447
2590
  lineWidth: 1,
2448
2591
  textAlign: textAlign,
2449
2592
  textBaseline: textBaseline,
@@ -2453,20 +2596,20 @@ const annotationVerticalLine_annotationVerticalLine = (spec, context)=>{
2453
2596
  dy: textFontSize
2454
2597
  },
2455
2598
  labelBackground: {
2456
- visible: backgroundVisible,
2457
- padding: backgroundPadding,
2599
+ visible: textBackgroundVisible,
2600
+ padding: textBackgroundPadding,
2458
2601
  style: {
2459
2602
  dy: textFontSize,
2460
- cornerRadius: backgroundBorderRadius ?? 4,
2461
- fill: backgroundColor,
2462
- stroke: backgroundBorderColor,
2463
- lineWidth: backgroundBorderWidth
2603
+ cornerRadius: textBackgroundBorderRadius ?? 4,
2604
+ fill: textBackgroundColor,
2605
+ stroke: textBackgroundBorderColor,
2606
+ lineWidth: textBackgroundBorderWidth
2464
2607
  }
2465
2608
  }
2466
2609
  },
2467
2610
  endSymbol: {
2468
2611
  visible: true,
2469
- size: 10 + lineWidth,
2612
+ size: 10 + (lineWidth || 1),
2470
2613
  style: {
2471
2614
  dy: 4,
2472
2615
  fill: lineColor
@@ -2513,7 +2656,7 @@ const annotationHorizontalLine_annotationHorizontalLine = (spec, context)=>{
2513
2656
  insideEnd: 'insideEndTop'
2514
2657
  };
2515
2658
  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;
2659
+ const { selector: selectorPoint, yValue, text = '', textPosition = 'insideEnd', textColor = '#ffffff', textFontSize = 12, textFontWeight = 400, textAlign = 'right', textBaseline = 'top', lineColor = '#212121', lineStyle = 'dashed', lineVisible = true, lineWidth = 1, textBackgroundVisible = true, textBackgroundColor = '#212121', textBackgroundBorderColor = '#212121', textBackgroundBorderRadius = 4, textBackgroundBorderWidth = 1, textBackgroundPadding = 2, offsetX = 0, offsetY = 0 } = annotationVerticalLine;
2517
2660
  const dataset = advancedVSeed.dataset.flat();
2518
2661
  const generateOneMarkLine = (y)=>({
2519
2662
  y,
@@ -2539,11 +2682,11 @@ const annotationHorizontalLine_annotationHorizontalLine = (spec, context)=>{
2539
2682
  },
2540
2683
  label: {
2541
2684
  text: text,
2542
- position: positionMap[textPosition],
2685
+ position: positionMap[textPosition || 'insideEnd'],
2543
2686
  style: {
2544
2687
  visible: true,
2545
2688
  dy: textFontSize,
2546
- stroke: backgroundColor,
2689
+ stroke: textBackgroundColor,
2547
2690
  lineWidth: 1,
2548
2691
  textAlign: textAlign,
2549
2692
  textBaseline: textBaseline,
@@ -2552,20 +2695,20 @@ const annotationHorizontalLine_annotationHorizontalLine = (spec, context)=>{
2552
2695
  fontWeight: textFontWeight
2553
2696
  },
2554
2697
  labelBackground: {
2555
- visible: backgroundVisible,
2556
- padding: backgroundPadding,
2698
+ visible: textBackgroundVisible,
2699
+ padding: textBackgroundPadding,
2557
2700
  style: {
2558
2701
  dy: textFontSize,
2559
- cornerRadius: backgroundBorderRadius ?? 4,
2560
- fill: backgroundColor,
2561
- stroke: backgroundBorderColor,
2562
- lineWidth: backgroundBorderWidth
2702
+ cornerRadius: textBackgroundBorderRadius ?? 4,
2703
+ fill: textBackgroundColor,
2704
+ stroke: textBackgroundBorderColor,
2705
+ lineWidth: textBackgroundBorderWidth
2563
2706
  }
2564
2707
  }
2565
2708
  },
2566
2709
  endSymbol: {
2567
2710
  visible: true,
2568
- size: 10 + lineWidth,
2711
+ size: 10 + (lineWidth || 1),
2569
2712
  style: {
2570
2713
  dx: -4,
2571
2714
  fill: lineColor
@@ -2614,9 +2757,11 @@ const annotationArea_annotationArea = (spec, context)=>{
2614
2757
  right: 'insideRight'
2615
2758
  };
2616
2759
  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;
2760
+ const { selector: selectorPoint, text = '', textPosition = 'top', textColor = '#ffffff', textFontSize = 12, textFontWeight = 400, textAlign = 'center', textBaseline = 'top', textBackgroundVisible = true, textBackgroundColor = '#191d24', textBackgroundBorderColor = '#191d24', textBackgroundBorderWidth = 1, textBackgroundBorderRadius = 4, textBackgroundPadding = 4, areaColor = '#888888', areaColorOpacity = 0.15, areaBorderColor = '#888888', areaBorderRadius = 4, areaBorderWidth = 1, outerPadding = 4, offsetX = 0, offsetY = 0 } = annotationArea;
2618
2761
  const dataset = advancedVSeed.dataset.flat();
2619
2762
  const selectedData = selectorPoint ? dataset.filter((datum)=>selector_selector(datum, selectorPoint)) : [];
2763
+ const labelPosition = positionMap[textPosition || 'top'];
2764
+ const isBottom = labelPosition.toLocaleLowerCase().includes('bottom');
2620
2765
  return {
2621
2766
  zIndex: ANNOTATION_Z_INDEX,
2622
2767
  regionRelative: true,
@@ -2629,8 +2774,8 @@ const annotationArea_annotationArea = (spec, context)=>{
2629
2774
  const xAxisHelper = context.getXAxisHelper();
2630
2775
  if ('function' == typeof xAxisHelper?.getBandwidth) {
2631
2776
  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;
2777
+ const minX = Math.min(...xyList.map((item)=>item.x)) - (outerPadding || 4);
2778
+ const maxX = Math.max(...xyList.map((item)=>item.x)) + (outerPadding || 4);
2634
2779
  const minY = Math.min(...yScale.range());
2635
2780
  const maxY = Math.max(...yScale.range());
2636
2781
  return [
@@ -2654,8 +2799,8 @@ const annotationArea_annotationArea = (spec, context)=>{
2654
2799
  }
2655
2800
  if ('function' == typeof yAxisHelper?.getBandwidth) {
2656
2801
  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;
2802
+ const minY = Math.min(...xyList.map((item)=>item.y)) - (outerPadding || 4);
2803
+ const maxY = Math.max(...xyList.map((item)=>item.y)) + (outerPadding || 4);
2659
2804
  const minX = Math.min(...xScale.range());
2660
2805
  const maxX = Math.max(...xScale.range());
2661
2806
  return [
@@ -2680,28 +2825,28 @@ const annotationArea_annotationArea = (spec, context)=>{
2680
2825
  return [];
2681
2826
  },
2682
2827
  label: {
2683
- position: positionMap[textPosition],
2828
+ position: labelPosition,
2684
2829
  visible: true,
2685
2830
  text: text,
2686
2831
  style: {
2687
- dy: textFontSize,
2832
+ dy: isBottom ? 2 * -(textFontSize || 12) : textFontSize,
2688
2833
  textAlign: textAlign,
2689
2834
  textBaseline: textBaseline,
2690
2835
  fill: textColor,
2691
- stroke: backgroundColor,
2836
+ stroke: textBackgroundColor,
2692
2837
  lineWidth: 1,
2693
2838
  fontSize: textFontSize,
2694
2839
  fontWeight: textFontWeight
2695
2840
  },
2696
2841
  labelBackground: {
2697
- visible: backgroundVisible,
2698
- padding: backgroundPadding,
2842
+ visible: textBackgroundVisible,
2843
+ padding: textBackgroundPadding,
2699
2844
  style: {
2700
- dy: textFontSize,
2701
- cornerRadius: backgroundBorderRadius ?? 4,
2702
- fill: backgroundColor,
2703
- stroke: backgroundBorderColor,
2704
- lineWidth: backgroundBorderWidth
2845
+ dy: isBottom ? 2 * -(textFontSize || 12) : textFontSize,
2846
+ cornerRadius: textBackgroundBorderRadius ?? 4,
2847
+ fill: textBackgroundColor,
2848
+ stroke: textBackgroundBorderColor,
2849
+ lineWidth: textBackgroundBorderWidth
2705
2850
  }
2706
2851
  }
2707
2852
  },
@@ -3343,7 +3488,11 @@ const verticalCrosshairRect = (spec, context)=>{
3343
3488
  const config = advancedVSeed.config?.[chartType]?.crosshairRect;
3344
3489
  if (!config) return result;
3345
3490
  if (!result.crosshair) result.crosshair = {};
3346
- const { visible = true, rectColor, labelColor, labelVisible, labelBackgroundColor } = config;
3491
+ const visible = config.visible || true;
3492
+ const rectColor = config.rectColor || void 0;
3493
+ const labelColor = config.labelColor || void 0;
3494
+ const labelVisible = config.labelVisible || false;
3495
+ const labelBackgroundColor = config.labelBackgroundColor || void 0;
3347
3496
  const crosshair = result.crosshair;
3348
3497
  crosshair.xField = {
3349
3498
  visible,
@@ -3372,14 +3521,13 @@ const verticalCrosshairRect = (spec, context)=>{
3372
3521
  };
3373
3522
  const barStyle_barStyle = (spec, context)=>{
3374
3523
  const { advancedVSeed } = context;
3375
- const { markStyle, dataset } = advancedVSeed;
3524
+ const { markStyle, dataset = [] } = advancedVSeed;
3376
3525
  const { barStyle } = markStyle;
3377
3526
  const showStroke = dataset.length <= 100;
3378
3527
  const result = {
3379
3528
  ...spec,
3380
3529
  bar: {
3381
3530
  style: {
3382
- stroke: '#fff',
3383
3531
  lineWidth: showStroke ? 1 : 0
3384
3532
  },
3385
3533
  state: {
@@ -3455,7 +3603,7 @@ const annotationAreaBand = (spec, context)=>{
3455
3603
  right: 'insideRight'
3456
3604
  };
3457
3605
  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;
3606
+ const { selector: selectorPoint, text = '', textPosition = 'top', textColor = '#ffffff', textFontSize = 12, textFontWeight = 400, textAlign = 'center', textBaseline = 'top', textBackgroundVisible = true, textBackgroundColor = '#191d24', textBackgroundBorderColor = '#191d24', textBackgroundBorderWidth = 1, textBackgroundBorderRadius = 4, textBackgroundPadding = 4, areaColor = '#888888', areaColorOpacity = 0.15, areaBorderColor = '#888888', areaBorderRadius = 4, areaBorderWidth = 1, outerPadding = 4, offsetX = 0, offsetY = 0 } = annotationArea;
3459
3607
  const dataset = advancedVSeed.dataset.flat();
3460
3608
  const selectedData = selectorPoint ? dataset.filter((datum)=>selector_selector(datum, selectorPoint)) : [];
3461
3609
  return {
@@ -3472,8 +3620,8 @@ const annotationAreaBand = (spec, context)=>{
3472
3620
  const depth = context.fieldX.length ?? 0;
3473
3621
  const xBandWidth = xAxisHelper?.getBandwidth?.(depth - 1);
3474
3622
  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;
3623
+ const minX = Math.min(...xyList.map((item)=>item.x)) - (outerPadding || 4);
3624
+ const maxX = Math.max(...xyList.map((item)=>item.x)) + xBandWidth + (outerPadding || 4);
3477
3625
  const minY = Math.min(...yScale.range());
3478
3626
  const maxY = Math.max(...yScale.range());
3479
3627
  return [
@@ -3499,8 +3647,8 @@ const annotationAreaBand = (spec, context)=>{
3499
3647
  const depth = context.fieldY.length ?? 0;
3500
3648
  const yBandWidth = yAxisHelper?.getBandwidth?.(depth - 1);
3501
3649
  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;
3650
+ const minY = Math.min(...xyList.map((item)=>item.y)) - (outerPadding || 4);
3651
+ const maxY = Math.max(...xyList.map((item)=>item.y)) + yBandWidth + (outerPadding || 4);
3504
3652
  const minX = Math.min(...xScale.range());
3505
3653
  const maxX = Math.max(...xScale.range());
3506
3654
  return [
@@ -3525,28 +3673,28 @@ const annotationAreaBand = (spec, context)=>{
3525
3673
  return [];
3526
3674
  },
3527
3675
  label: {
3528
- position: positionMap[textPosition],
3676
+ position: positionMap[textPosition || 'top'],
3529
3677
  visible: true,
3530
3678
  text: text,
3531
3679
  style: {
3532
3680
  dy: textFontSize,
3533
3681
  textAlign: textAlign,
3534
3682
  textBaseline: textBaseline,
3535
- stroke: backgroundColor,
3683
+ stroke: textBackgroundColor,
3536
3684
  lineWidth: 1,
3537
3685
  fill: textColor,
3538
3686
  fontSize: textFontSize,
3539
3687
  fontWeight: textFontWeight
3540
3688
  },
3541
3689
  labelBackground: {
3542
- visible: backgroundVisible,
3543
- padding: backgroundPadding,
3690
+ visible: textBackgroundVisible,
3691
+ padding: textBackgroundPadding,
3544
3692
  style: {
3545
3693
  dy: textFontSize,
3546
- cornerRadius: backgroundBorderRadius ?? 4,
3547
- fill: backgroundColor,
3548
- stroke: backgroundBorderColor,
3549
- lineWidth: backgroundBorderWidth
3694
+ cornerRadius: textBackgroundBorderRadius ?? 4,
3695
+ fill: textBackgroundColor,
3696
+ stroke: textBackgroundBorderColor,
3697
+ lineWidth: textBackgroundBorderWidth
3550
3698
  }
3551
3699
  }
3552
3700
  },
@@ -3876,7 +4024,7 @@ const initBar = (spec, context)=>{
3876
4024
  const datasetYX = (spec, context)=>{
3877
4025
  const { advancedVSeed, vseed } = context;
3878
4026
  const { encoding, analysis, datasetReshapeInfo } = advancedVSeed;
3879
- const { orderMapping = {} } = analysis ?? {};
4027
+ const orderMapping = analysis?.orderMapping || {};
3880
4028
  const angle = encoding[0]?.angle?.[0];
3881
4029
  const y = encoding[0]?.y?.[0];
3882
4030
  const group = encoding[0]?.group?.[0];
@@ -4102,7 +4250,11 @@ const horizontalCrosshairRect = (spec, context)=>{
4102
4250
  const config = advancedVSeed.config?.[chartType]?.crosshairRect;
4103
4251
  if (!config) return result;
4104
4252
  if (!result.crosshair) result.crosshair = {};
4105
- const { visible = true, rectColor, labelColor, labelVisible, labelBackgroundColor } = config;
4253
+ const visible = config.visible || true;
4254
+ const rectColor = config.rectColor || void 0;
4255
+ const labelColor = config.labelColor || void 0;
4256
+ const labelVisible = config.labelVisible || false;
4257
+ const labelBackgroundColor = config.labelBackgroundColor || void 0;
4106
4258
  const crosshair = result.crosshair;
4107
4259
  crosshair.yField = {
4108
4260
  visible,
@@ -4821,6 +4973,35 @@ const series = (...args)=>{
4821
4973
  return result;
4822
4974
  };
4823
4975
  };
4976
+ const seriesDualAxis = (...args)=>{
4977
+ const result = {
4978
+ type: 'common',
4979
+ padding: 0,
4980
+ region: [
4981
+ {
4982
+ clip: true
4983
+ }
4984
+ ]
4985
+ };
4986
+ const createDualContext = (context, index)=>{
4987
+ const { advancedVSeed } = context;
4988
+ const dataset = advancedVSeed.dataset[index];
4989
+ return {
4990
+ ...context,
4991
+ advancedVSeed: {
4992
+ ...advancedVSeed,
4993
+ dataset: dataset
4994
+ }
4995
+ };
4996
+ };
4997
+ return (_, context)=>{
4998
+ result.series = args.map((pipeline, index)=>{
4999
+ const seriesContext = createDualContext(context, index);
5000
+ return execPipeline(pipeline, seriesContext, {});
5001
+ });
5002
+ return result;
5003
+ };
5004
+ };
4824
5005
  const initAreaRange = (spec, context)=>{
4825
5006
  const result = {
4826
5007
  ...spec
@@ -5250,7 +5431,11 @@ const horizontalCrosshairLine = (spec, context)=>{
5250
5431
  const config = advancedVSeed.config?.[chartType]?.crosshairLine;
5251
5432
  if (!config) return result;
5252
5433
  if (!result.crosshair) result.crosshair = {};
5253
- const { visible = true, lineColor, labelColor, labelVisible, labelBackgroundColor } = config;
5434
+ const visible = config.visible || true;
5435
+ const lineColor = config.lineColor || void 0;
5436
+ const labelColor = config.labelColor || void 0;
5437
+ const labelVisible = config.labelVisible || void 0;
5438
+ const labelBackgroundColor = config.labelBackgroundColor || void 0;
5254
5439
  const crosshair = result.crosshair;
5255
5440
  crosshair.yField = {
5256
5441
  visible,
@@ -5753,7 +5938,7 @@ const dualChartTypeSecondary = (spec, context)=>{
5753
5938
  const datasetPrimary = (spec, context)=>{
5754
5939
  const { advancedVSeed, vseed } = context;
5755
5940
  const { encoding, analysis, datasetReshapeInfo } = advancedVSeed;
5756
- const { orderMapping = {} } = analysis ?? {};
5941
+ const orderMapping = analysis?.orderMapping || {};
5757
5942
  const x = encoding[0]?.x?.[0];
5758
5943
  const group = encoding[0]?.group?.[0];
5759
5944
  const id = datasetReshapeInfo[0].id;
@@ -5784,7 +5969,7 @@ const datasetPrimary = (spec, context)=>{
5784
5969
  ...spec,
5785
5970
  data: {
5786
5971
  id: `${id}-primary-dataset`,
5787
- values: isPivotChart(vseed) ? void 0 : advancedVSeed.dataset[0],
5972
+ values: isPivotChart(vseed) ? void 0 : advancedVSeed.dataset,
5788
5973
  fields: fields
5789
5974
  }
5790
5975
  };
@@ -5792,7 +5977,7 @@ const datasetPrimary = (spec, context)=>{
5792
5977
  const datasetSecondary = (spec, context)=>{
5793
5978
  const { advancedVSeed, vseed } = context;
5794
5979
  const { encoding, analysis, datasetReshapeInfo } = advancedVSeed;
5795
- const { orderMapping = {} } = analysis ?? {};
5980
+ const orderMapping = analysis?.orderMapping || {};
5796
5981
  const x = encoding[0]?.x?.[0];
5797
5982
  const group = encoding[0]?.group?.[0];
5798
5983
  const id = datasetReshapeInfo[0].id;
@@ -5823,7 +6008,7 @@ const datasetSecondary = (spec, context)=>{
5823
6008
  ...spec,
5824
6009
  data: {
5825
6010
  id: `${id}-secondary-dataset`,
5826
- values: isPivotChart(vseed) ? void 0 : advancedVSeed.dataset[1],
6011
+ values: isPivotChart(vseed) ? void 0 : advancedVSeed.dataset,
5827
6012
  fields: fields
5828
6013
  }
5829
6014
  };
@@ -6251,7 +6436,7 @@ const yLinearSecondary = (spec, context)=>{
6251
6436
  return result;
6252
6437
  };
6253
6438
  const dualAxis = [
6254
- series([
6439
+ seriesDualAxis([
6255
6440
  initDualAxisPrimary,
6256
6441
  dualChartTypePrimary,
6257
6442
  datasetPrimary,
@@ -6294,7 +6479,7 @@ const pivotDualAxis = [
6294
6479
  pivotIndicators_pivotIndicatorsAsRow,
6295
6480
  datasetPivot,
6296
6481
  pivotIndicators_pivotIndicators([
6297
- series([
6482
+ seriesDualAxis([
6298
6483
  initDualAxisPrimary,
6299
6484
  dualChartTypePrimary,
6300
6485
  datasetPrimary,
@@ -7688,7 +7873,8 @@ const lightTheme = ()=>{
7688
7873
  hoverHeaderBackgroundColor: '#D9DDE4',
7689
7874
  hoverHeaderInlineBackgroundColor: '#D9DDE455',
7690
7875
  selectedBorderColor: '#4080ff',
7691
- selectedBackgroundColor: '#bedaff33'
7876
+ selectedBackgroundColor: '#bedaff33',
7877
+ backgroundColor: 'transparent'
7692
7878
  };
7693
7879
  return {
7694
7880
  config: {
@@ -7708,8 +7894,8 @@ const lightTheme = ()=>{
7708
7894
  stackCornerRadius: [
7709
7895
  4,
7710
7896
  4,
7711
- 0,
7712
- 0
7897
+ 4,
7898
+ 4
7713
7899
  ]
7714
7900
  },
7715
7901
  columnParallel: {
@@ -7720,8 +7906,8 @@ const lightTheme = ()=>{
7720
7906
  stackCornerRadius: [
7721
7907
  4,
7722
7908
  4,
7723
- 0,
7724
- 0
7909
+ 4,
7910
+ 4
7725
7911
  ]
7726
7912
  },
7727
7913
  columnPercent: {
@@ -7732,8 +7918,8 @@ const lightTheme = ()=>{
7732
7918
  stackCornerRadius: [
7733
7919
  4,
7734
7920
  4,
7735
- 0,
7736
- 0
7921
+ 4,
7922
+ 4
7737
7923
  ]
7738
7924
  },
7739
7925
  bar: {
@@ -7742,10 +7928,10 @@ const lightTheme = ()=>{
7742
7928
  yAxis: barBandAxis,
7743
7929
  crosshairRect,
7744
7930
  stackCornerRadius: [
7745
- 0,
7746
7931
  4,
7747
7932
  4,
7748
- 0
7933
+ 4,
7934
+ 4
7749
7935
  ]
7750
7936
  },
7751
7937
  barParallel: {
@@ -7754,10 +7940,10 @@ const lightTheme = ()=>{
7754
7940
  yAxis: barBandAxis,
7755
7941
  crosshairRect,
7756
7942
  stackCornerRadius: [
7757
- 0,
7758
7943
  4,
7759
7944
  4,
7760
- 0
7945
+ 4,
7946
+ 4
7761
7947
  ]
7762
7948
  },
7763
7949
  barPercent: {
@@ -7766,10 +7952,10 @@ const lightTheme = ()=>{
7766
7952
  yAxis: barBandAxis,
7767
7953
  crosshairRect,
7768
7954
  stackCornerRadius: [
7769
- 0,
7770
7955
  4,
7771
7956
  4,
7772
- 0
7957
+ 4,
7958
+ 4
7773
7959
  ]
7774
7960
  },
7775
7961
  area: {
@@ -8046,8 +8232,8 @@ const darkTheme = ()=>{
8046
8232
  stackCornerRadius: [
8047
8233
  4,
8048
8234
  4,
8049
- 0,
8050
- 0
8235
+ 4,
8236
+ 4
8051
8237
  ]
8052
8238
  },
8053
8239
  columnParallel: {
@@ -8058,8 +8244,8 @@ const darkTheme = ()=>{
8058
8244
  stackCornerRadius: [
8059
8245
  4,
8060
8246
  4,
8061
- 0,
8062
- 0
8247
+ 4,
8248
+ 4
8063
8249
  ]
8064
8250
  },
8065
8251
  columnPercent: {
@@ -8070,8 +8256,8 @@ const darkTheme = ()=>{
8070
8256
  stackCornerRadius: [
8071
8257
  4,
8072
8258
  4,
8073
- 0,
8074
- 0
8259
+ 4,
8260
+ 4
8075
8261
  ]
8076
8262
  },
8077
8263
  bar: {
@@ -8092,10 +8278,10 @@ const darkTheme = ()=>{
8092
8278
  yAxis: barBandAxis,
8093
8279
  crosshairRect: crosshairRect,
8094
8280
  stackCornerRadius: [
8095
- 0,
8096
8281
  4,
8097
8282
  4,
8098
- 0
8283
+ 4,
8284
+ 4
8099
8285
  ]
8100
8286
  },
8101
8287
  barPercent: {
@@ -8104,10 +8290,10 @@ const darkTheme = ()=>{
8104
8290
  yAxis: barBandAxis,
8105
8291
  crosshairRect: crosshairRect,
8106
8292
  stackCornerRadius: [
8107
- 0,
8108
8293
  4,
8109
8294
  4,
8110
- 0
8295
+ 4,
8296
+ 4
8111
8297
  ]
8112
8298
  },
8113
8299
  area: {
@@ -8244,6 +8430,9 @@ const updateAdvanced = (chartType, advancedPipe)=>{
8244
8430
  const updateSpec = (chartType, specPipe)=>{
8245
8431
  Builder._customSpecPipe[chartType] = specPipe;
8246
8432
  };
8433
+ const isDimension = (dimension)=>!('children' in dimension);
8434
+ const isDimensionGroup = (dimension)=>'children' in dimension;
8435
+ const isDimensions = (dimensions)=>dimensions.every(isDimension);
8247
8436
  const zChartType = z["enum"]([
8248
8437
  'table',
8249
8438
  'pivotTable',
@@ -8370,117 +8559,117 @@ const zDatasetReshapeInfo = z.array(z.object({
8370
8559
  id: z.string(),
8371
8560
  index: z.number(),
8372
8561
  foldInfo: zFoldInfo,
8373
- foldInfoList: z.array(zFoldInfo).optional(),
8562
+ foldInfoList: z.array(zFoldInfo).nullish(),
8374
8563
  unfoldInfo: zUnfoldInfo
8375
8564
  }));
8376
8565
  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()
8566
+ x: z.array(z.string()).nullish(),
8567
+ y: z.array(z.string()).nullish(),
8568
+ color: z.array(z.string()).nullish(),
8569
+ group: z.array(z.string()).nullish(),
8570
+ angle: z.array(z.string()).nullish(),
8571
+ radius: z.array(z.string()).nullish(),
8572
+ tooltip: z.array(z.string()).nullish(),
8573
+ size: z.array(z.string()).nullish()
8385
8574
  }));
8386
8575
  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(),
8576
+ visible: z.boolean().default(true).nullish(),
8577
+ labelAutoHide: z.boolean().default(true).nullish(),
8578
+ labelAutoHideGap: z.number().default(0).nullish(),
8579
+ labelAutoRotate: z.boolean().default(true).nullish(),
8391
8580
  labelAutoRotateAngleRange: z.array(z.number()).default([
8392
8581
  0,
8393
8582
  -45,
8394
8583
  -90
8395
- ]).optional(),
8396
- labelAutoLimit: z.boolean().default(true).optional(),
8397
- labelAutoLimitLength: z.number().default(100).optional(),
8584
+ ]).nullish(),
8585
+ labelAutoLimit: z.boolean().default(true).nullish(),
8586
+ labelAutoLimitLength: z.number().default(100).nullish(),
8398
8587
  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(),
8588
+ visible: z.boolean().default(true).nullish(),
8589
+ labelColor: z.string().default('#797B85').nullish(),
8590
+ labelFontSize: z.number().default(12).nullish(),
8591
+ labelFontWeight: z.number().default(400).nullish(),
8592
+ labelAngle: z.number().default(0).nullish()
8593
+ }).nullish(),
8405
8594
  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(),
8595
+ visible: z.boolean().default(true).nullish(),
8596
+ lineColor: z.string().default('rgba(54, 65, 89, 0.30)').nullish(),
8597
+ lineWidth: z.number().default(1).nullish()
8598
+ }).nullish(),
8410
8599
  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(),
8600
+ visible: z.boolean().default(true).nullish(),
8601
+ tickInside: z.boolean().default(false).nullish(),
8602
+ tickColor: z.string().default('rgba(54, 65, 89, 0.30)').nullish(),
8603
+ tickSize: z.number().default(4).nullish()
8604
+ }).nullish(),
8416
8605
  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(),
8606
+ visible: z.boolean().default(false).nullish(),
8607
+ titleText: z.string().default('').nullish(),
8608
+ titleColor: z.string().default('#646A73').nullish(),
8609
+ titleFontSize: z.number().default(12).nullish(),
8610
+ titleFontWeight: z.number().default(400).nullish()
8611
+ }).nullish(),
8423
8612
  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()
8613
+ visible: z.boolean().default(false).nullish(),
8614
+ gridColor: z.string().default('rgba(54, 65, 89, 0.15)').nullish(),
8615
+ gridWidth: z.number().default(0.5).nullish()
8616
+ }).nullish()
8428
8617
  });
8429
8618
  const zYBandAxis = zXBandAxis;
8430
8619
  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(),
8620
+ visible: z.boolean().default(true).nullish(),
8621
+ min: z.number().nullish(),
8622
+ max: z.number().nullish(),
8623
+ nice: z.boolean().default(true).nullish(),
8624
+ zero: z.boolean().default(true).nullish(),
8625
+ log: z.boolean().default(false).nullish(),
8626
+ logBase: z.number().default(10).nullish(),
8627
+ inverse: z.boolean().default(false).nullish(),
8439
8628
  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(),
8629
+ visible: z.boolean().default(true).nullish(),
8630
+ labelColor: z.string().default('#797B85').nullish(),
8631
+ labelFontSize: z.number().default(12).nullish(),
8632
+ labelFontWeight: z.number().default(400).nullish(),
8633
+ labelAngle: z.number().default(0).nullish()
8634
+ }).nullish(),
8446
8635
  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(),
8636
+ visible: z.boolean().default(true).nullish(),
8637
+ lineColor: z.string().default('rgba(54, 65, 89, 0.30)').nullish(),
8638
+ lineWidth: z.number().default(1).nullish()
8639
+ }).nullish(),
8451
8640
  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(),
8641
+ visible: z.boolean().default(true).nullish(),
8642
+ tickInside: z.boolean().default(false).nullish(),
8643
+ tickColor: z.string().default('rgba(54, 65, 89, 0.30)').nullish(),
8644
+ tickSize: z.number().default(4).nullish()
8645
+ }).nullish(),
8457
8646
  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(),
8647
+ visible: z.boolean().default(false).nullish(),
8648
+ titleText: z.string().default('').nullish(),
8649
+ titleColor: z.string().default('#646A73').nullish(),
8650
+ titleFontSize: z.number().default(12).nullish(),
8651
+ titleFontWeight: z.number().default(400).nullish()
8652
+ }).nullish(),
8464
8653
  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()
8654
+ visible: z.boolean().default(false).nullish(),
8655
+ gridColor: z.string().default('rgba(54, 65, 89, 0.15)').nullish(),
8656
+ gridWidth: z.number().default(0.5).nullish()
8657
+ }).nullish()
8469
8658
  });
8470
8659
  const zYLinearAxis = zXLinearAxis;
8471
8660
  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()
8661
+ visible: z.boolean().nullish(),
8662
+ lineColor: z.string().nullish(),
8663
+ labelColor: z.string().nullish(),
8664
+ labelVisible: z.boolean().nullish(),
8665
+ labelBackgroundColor: z.string().nullish()
8477
8666
  });
8478
8667
  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()
8668
+ visible: z.boolean().nullish(),
8669
+ rectColor: z.string().nullish(),
8670
+ labelColor: z.string().nullish(),
8671
+ labelVisible: z.boolean().nullish(),
8672
+ labelBackgroundColor: z.string().nullish()
8484
8673
  });
8485
8674
  const zStackCornerRadius = z.number().or(z.array(z.number())).default([
8486
8675
  3,
@@ -8488,21 +8677,21 @@ const zStackCornerRadius = z.number().or(z.array(z.number())).default([
8488
8677
  0,
8489
8678
  0
8490
8679
  ]);
8491
- const zBackgroundColor = z.string().default('transparent').optional();
8680
+ const zBackgroundColor = z.string().default('transparent').nullish();
8492
8681
  const zColor = z.object({
8493
- colorScheme: z.array(z.string()).optional(),
8494
- colorMapping: z.record(z.string(), z.string()).optional()
8682
+ colorScheme: z.array(z.string()).nullish(),
8683
+ colorMapping: z.record(z.string(), z.string()).nullish()
8495
8684
  });
8496
8685
  const zLinearColor = z.object({
8497
- colorScheme: z.array(z.string()).optional()
8686
+ colorScheme: z.array(z.string()).nullish()
8498
8687
  });
8499
8688
  const zLabel = z.object({
8500
- enable: z.boolean().default(true).optional()
8689
+ enable: z.boolean().default(true).nullish()
8501
8690
  });
8502
8691
  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(),
8692
+ enable: z.boolean().default(true).nullish(),
8693
+ border: z.boolean().default(true).nullish(),
8694
+ maxSize: z.number().default(1).nullish(),
8506
8695
  shapeType: z["enum"]([
8507
8696
  'circle',
8508
8697
  'cross',
@@ -8526,7 +8715,7 @@ const zLegend = z.object({
8526
8715
  'arrowRight',
8527
8716
  'rectRound',
8528
8717
  'roundLine'
8529
- ]).default('rectRound').optional(),
8718
+ ]).default('rectRound').nullish(),
8530
8719
  position: z["enum"]([
8531
8720
  'left',
8532
8721
  'leftTop',
@@ -8548,10 +8737,10 @@ const zLegend = z.object({
8548
8737
  'bottomRight',
8549
8738
  'bl',
8550
8739
  '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()
8740
+ ]).default('bottom').nullish(),
8741
+ labelFontSize: z.number().default(12).nullish(),
8742
+ labelFontColor: z.string().default('#fff').nullish(),
8743
+ labelFontWeight: z.number().or(z.string()).default(400).nullish()
8555
8744
  });
8556
8745
  const zColorLegend = z.object({
8557
8746
  position: z["enum"]([
@@ -8575,194 +8764,195 @@ const zColorLegend = z.object({
8575
8764
  'bottomRight',
8576
8765
  'bl',
8577
8766
  'br'
8578
- ]).default('bottom').optional(),
8579
- enable: z.boolean().default(true).optional()
8767
+ ]).default('bottom').nullish(),
8768
+ enable: z.boolean().default(true).nullish()
8580
8769
  });
8581
8770
  const zTooltip = z.object({
8582
- enable: z.boolean().default(true).optional()
8771
+ enable: z.boolean().default(true).nullish()
8583
8772
  });
8584
8773
  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()
8774
+ backgroundColor: zBackgroundColor.nullish(),
8775
+ borderColor: z.string().nullish(),
8776
+ bodyFontSize: z.number().nullish(),
8777
+ bodyFontColor: z.string().nullish(),
8778
+ bodyBackgroundColor: z.string().nullish(),
8779
+ hoverBodyBackgroundColor: z.string().nullish(),
8780
+ hoverBodyInlineBackgroundColor: z.string().nullish(),
8781
+ headerFontSize: z.number().nullish(),
8782
+ headerFontColor: z.string().nullish(),
8783
+ headerBackgroundColor: z.string().nullish(),
8784
+ hoverHeaderBackgroundColor: z.string().nullish(),
8785
+ hoverHeaderInlineBackgroundColor: z.string().nullish(),
8786
+ selectedBorderColor: z.string().nullish(),
8787
+ selectedBackgroundColor: z.string().nullish()
8598
8788
  });
8599
8789
  const zPivotTableConfig = zTableConfig;
8600
8790
  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()
8791
+ backgroundColor: zBackgroundColor.nullish(),
8792
+ label: zLabel.nullish(),
8793
+ color: zColor.nullish(),
8794
+ tooltip: zTooltip.nullish(),
8795
+ legend: zLegend.nullish(),
8796
+ xAxis: zXBandAxis.nullish(),
8797
+ yAxis: zYLinearAxis.nullish(),
8798
+ crosshairLine: zCrosshairLine.nullish()
8609
8799
  });
8610
8800
  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()
8801
+ backgroundColor: zBackgroundColor.nullish(),
8802
+ label: zLabel.nullish(),
8803
+ color: zColor.nullish(),
8804
+ tooltip: zTooltip.nullish(),
8805
+ legend: zLegend.nullish(),
8806
+ xAxis: zXBandAxis.nullish(),
8807
+ yAxis: zYLinearAxis.nullish(),
8808
+ crosshairRect: zCrosshairRect.nullish(),
8809
+ stackCornerRadius: zStackCornerRadius.nullish()
8620
8810
  });
8621
8811
  const zColumnParallelConfig = zColumnConfig;
8622
8812
  const zColumnPercentConfig = zColumnConfig;
8623
8813
  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()
8814
+ backgroundColor: zBackgroundColor.nullish(),
8815
+ label: zLabel.nullish(),
8816
+ color: zColor.nullish(),
8817
+ tooltip: zTooltip.nullish(),
8818
+ legend: zLegend.nullish(),
8819
+ xAxis: zXLinearAxis.nullish(),
8820
+ yAxis: zYBandAxis.nullish(),
8821
+ crosshairRect: zCrosshairRect.nullish(),
8822
+ stackCornerRadius: zStackCornerRadius.nullish()
8633
8823
  });
8634
8824
  const zBarParallelConfig = zBarConfig;
8635
8825
  const zBarPercentConfig = zBarConfig;
8636
8826
  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()
8827
+ backgroundColor: zBackgroundColor.nullish(),
8828
+ label: zLabel.nullish(),
8829
+ color: zColor.nullish(),
8830
+ tooltip: zTooltip.nullish(),
8831
+ legend: zLegend.nullish(),
8832
+ xAxis: zXBandAxis.nullish(),
8833
+ yAxis: zYLinearAxis.nullish(),
8834
+ crosshairLine: zCrosshairLine.nullish()
8645
8835
  });
8646
8836
  const zAreaPercentConfig = zAreaConfig;
8647
8837
  const zAreaRangeConfig = zAreaConfig;
8648
8838
  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()
8839
+ backgroundColor: zBackgroundColor.nullish(),
8840
+ label: zLabel.nullish(),
8841
+ color: zColor.nullish(),
8842
+ tooltip: zTooltip.nullish(),
8843
+ legend: zLegend.nullish(),
8844
+ dualChartType: z.array(zDualChartType).or(zDualChartType).nullish(),
8845
+ primaryYAxis: z.array(zYLinearAxis).or(zYLinearAxis).nullish(),
8846
+ secondaryYAxis: z.array(zYLinearAxis).or(zYLinearAxis).nullish(),
8847
+ xAxis: zXBandAxis.nullish(),
8848
+ crosshairRect: zCrosshairRect.nullish()
8659
8849
  });
8660
8850
  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()
8851
+ backgroundColor: zBackgroundColor.nullish(),
8852
+ label: zLabel.nullish(),
8853
+ color: zColor.nullish(),
8854
+ tooltip: zTooltip.nullish(),
8855
+ legend: zLegend.nullish(),
8856
+ xAxis: zXLinearAxis.nullish(),
8857
+ yAxis: zYLinearAxis.nullish(),
8858
+ crosshairLine: zCrosshairLine.nullish()
8669
8859
  });
8670
8860
  const zRoseConfig = z.object({
8671
- backgroundColor: zBackgroundColor.optional(),
8672
- label: zLabel.optional(),
8673
- color: zColor.optional(),
8674
- tooltip: zTooltip.optional(),
8675
- legend: zLegend.optional()
8861
+ backgroundColor: zBackgroundColor.nullish(),
8862
+ label: zLabel.nullish(),
8863
+ color: zColor.nullish(),
8864
+ tooltip: zTooltip.nullish(),
8865
+ legend: zLegend.nullish()
8676
8866
  });
8677
8867
  const zRoseParallelConfig = zRoseConfig;
8678
8868
  const zPieConfig = z.object({
8679
- backgroundColor: zBackgroundColor.optional(),
8680
- label: zLabel.optional(),
8681
- color: zColor.optional(),
8682
- tooltip: zTooltip.optional(),
8683
- legend: zLegend.optional()
8869
+ backgroundColor: zBackgroundColor.nullish(),
8870
+ label: zLabel.nullish(),
8871
+ color: zColor.nullish(),
8872
+ tooltip: zTooltip.nullish(),
8873
+ legend: zLegend.nullish()
8684
8874
  });
8685
8875
  const zDonutConfig = zPieConfig;
8686
8876
  const zRadarConfig = zPieConfig;
8687
8877
  const zFunnelConfig = zPieConfig;
8688
8878
  const zHeatmapConfig = zPieConfig;
8689
8879
  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()
8880
+ table: zTableConfig.nullish(),
8881
+ pivotTable: zPivotTableConfig.nullish(),
8882
+ line: zLineConfig.nullish(),
8883
+ column: zColumnConfig.nullish(),
8884
+ columnParallel: zColumnParallelConfig.nullish(),
8885
+ columnPercent: zColumnPercentConfig.nullish(),
8886
+ bar: zBarConfig.nullish(),
8887
+ barParallel: zBarParallelConfig.nullish(),
8888
+ barPercent: zBarPercentConfig.nullish(),
8889
+ area: zAreaConfig.nullish(),
8890
+ areaPercent: zAreaPercentConfig.nullish(),
8891
+ areaRange: zAreaRangeConfig.nullish(),
8892
+ scatter: zScatterConfig.nullish(),
8893
+ dualAxis: zDualAxisConfig.nullish(),
8894
+ rose: zRoseConfig.nullish(),
8895
+ roseParallel: zRoseParallelConfig.nullish(),
8896
+ pie: zPieConfig.nullish(),
8897
+ donut: zDonutConfig.nullish(),
8898
+ radar: zRadarConfig.nullish(),
8899
+ funnel: zFunnelConfig.nullish(),
8900
+ heatmap: zHeatmapConfig.nullish()
8711
8901
  });
8712
8902
  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(),
8903
+ visible: z.boolean().default(true).nullish(),
8904
+ min: z.number().nullish(),
8905
+ max: z.number().nullish(),
8906
+ nice: z.boolean().default(true).nullish(),
8907
+ zero: z.boolean().default(true).nullish(),
8908
+ inverse: z.boolean().default(false).nullish(),
8909
+ log: z.boolean().default(false).nullish(),
8910
+ logBase: z.number().default(10).nullish(),
8911
+ labelAutoHide: z.boolean().default(true).nullish(),
8912
+ labelAutoHideGap: z.number().default(4).nullish(),
8913
+ labelAutoRotate: z.boolean().default(true).nullish(),
8724
8914
  labelAutoRotateAngleRange: z.array(z.number()).default([
8725
8915
  0,
8726
8916
  -45,
8727
8917
  -90
8728
- ]).optional(),
8729
- labelAutoLimit: z.boolean().default(true).optional(),
8730
- labelAutoLimitLength: z.number().default(100).optional(),
8918
+ ]).nullish(),
8919
+ labelAutoLimit: z.boolean().default(true).nullish(),
8920
+ labelAutoLimitLength: z.number().default(100).nullish(),
8731
8921
  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(),
8922
+ visible: z.boolean().default(true).nullish(),
8923
+ labelColor: z.string().default('#797B85').nullish(),
8924
+ labelFontSize: z.number().default(12).nullish(),
8925
+ labelFontWeight: z.number().default(400).nullish(),
8926
+ labelAngle: z.number().default(0).nullish()
8927
+ }).nullish(),
8738
8928
  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(),
8929
+ visible: z.boolean().default(true).nullish(),
8930
+ lineColor: z.string().default('rgba(54, 65, 89, 0.30)').nullish(),
8931
+ lineWidth: z.number().default(1).nullish()
8932
+ }).nullish(),
8743
8933
  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(),
8934
+ visible: z.boolean().default(true).nullish(),
8935
+ tickInside: z.boolean().default(false).nullish(),
8936
+ tickColor: z.string().default('rgba(54, 65, 89, 0.30)').nullish(),
8937
+ tickSize: z.number().default(4).nullish()
8938
+ }).nullish(),
8749
8939
  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(),
8940
+ visible: z.boolean().default(false).nullish(),
8941
+ titleText: z.string().default('').nullish(),
8942
+ titleColor: z.string().default('#646A73').nullish(),
8943
+ titleFontSize: z.number().default(12).nullish(),
8944
+ titleFontWeight: z.number().default(400).nullish()
8945
+ }).nullish(),
8756
8946
  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()
8947
+ visible: z.boolean().default(false).nullish(),
8948
+ gridColor: z.string().default('rgba(54, 65, 89, 0.15)').nullish(),
8949
+ gridWidth: z.number().default(0.5).nullish()
8950
+ }).nullish()
8761
8951
  });
8762
8952
  const zCustomThemeConfig = z.object({
8763
- config: zConfig.optional()
8953
+ config: zConfig.nullish()
8764
8954
  });
8765
- const zCustomTheme = z.record(z.string(), zCustomThemeConfig).optional();
8955
+ const zCustomTheme = z.record(z.string(), zCustomThemeConfig).nullish();
8766
8956
  const zTheme = z.string();
8767
8957
  const zSelector = z.union([
8768
8958
  z.string(),
@@ -8778,7 +8968,7 @@ const zSelector = z.union([
8778
8968
  '>=',
8779
8969
  '<=',
8780
8970
  'between'
8781
- ]).optional(),
8971
+ ]).nullish(),
8782
8972
  op: z["enum"]([
8783
8973
  '=',
8784
8974
  '==',
@@ -8788,7 +8978,7 @@ const zSelector = z.union([
8788
8978
  '>=',
8789
8979
  '<=',
8790
8980
  'between'
8791
- ]).optional(),
8981
+ ]).nullish(),
8792
8982
  value: z.union([
8793
8983
  z.string(),
8794
8984
  z.number(),
@@ -8803,11 +8993,11 @@ const zSelector = z.union([
8803
8993
  operator: z["enum"]([
8804
8994
  'in',
8805
8995
  'not in'
8806
- ]).optional(),
8996
+ ]).nullish(),
8807
8997
  op: z["enum"]([
8808
8998
  'in',
8809
8999
  'not in'
8810
- ]).optional(),
9000
+ ]).nullish(),
8811
9001
  value: z.union([
8812
9002
  z.string(),
8813
9003
  z.number(),
@@ -8823,103 +9013,103 @@ const zBarStyle = z.object({
8823
9013
  selector: z.union([
8824
9014
  zSelector,
8825
9015
  zSelectors
8826
- ]).optional(),
8827
- barColor: z.string().optional(),
8828
- barColorOpacity: z.number().optional(),
8829
- barBorderColor: z.string().optional(),
8830
- barBorderWidth: z.number().optional(),
9016
+ ]).nullish(),
9017
+ barColor: z.string().nullish(),
9018
+ barColorOpacity: z.number().nullish(),
9019
+ barBorderColor: z.string().nullish(),
9020
+ barBorderWidth: z.number().nullish(),
8831
9021
  barBorderStyle: z.union([
8832
9022
  z.literal('solid'),
8833
9023
  z.literal('dashed'),
8834
9024
  z.literal('dotted')
8835
- ]).optional(),
9025
+ ]).nullish(),
8836
9026
  barRadius: z.union([
8837
9027
  z.number(),
8838
9028
  z.array(z.number())
8839
- ]).optional()
9029
+ ]).nullish()
8840
9030
  });
8841
9031
  const zPointStyle = z.object({
8842
9032
  selector: z.union([
8843
9033
  zSelector,
8844
9034
  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(),
9035
+ ]).nullish(),
9036
+ pointSize: z.number().nullish(),
9037
+ pointColor: z.string().nullish(),
9038
+ pointColorOpacity: z.number().nullish(),
9039
+ pointBorderColor: z.string().nullish(),
9040
+ pointBorderWidth: z.number().nullish(),
8851
9041
  pointBorderStyle: z.union([
8852
9042
  z["enum"]([
8853
9043
  'solid',
8854
9044
  'dashed',
8855
9045
  'dotted'
8856
9046
  ])
8857
- ]).optional()
9047
+ ]).nullish()
8858
9048
  });
8859
9049
  const zLineStyle = z.object({
8860
9050
  selector: z.union([
8861
9051
  zSelector,
8862
9052
  zSelectors
8863
- ]).optional(),
8864
- lineSmooth: z.boolean().optional(),
8865
- lineColor: z.string().optional(),
8866
- lineColorOpacity: z.number().optional(),
8867
- lineWidth: z.number().optional(),
9053
+ ]).nullish(),
9054
+ lineSmooth: z.boolean().nullish(),
9055
+ lineColor: z.string().nullish(),
9056
+ lineColorOpacity: z.number().nullish(),
9057
+ lineWidth: z.number().nullish(),
8868
9058
  lineStyle: z.union([
8869
9059
  z["enum"]([
8870
9060
  'solid',
8871
9061
  'dashed',
8872
9062
  'dotted'
8873
9063
  ])
8874
- ]).optional()
9064
+ ]).nullish()
8875
9065
  });
8876
9066
  const zAreaStyle = z.object({
8877
9067
  selector: z.union([
8878
9068
  zSelector,
8879
9069
  zSelectors
8880
- ]).optional(),
8881
- areaColor: z.string().optional(),
8882
- areaColorOpacity: z.number().optional()
9070
+ ]).nullish(),
9071
+ areaColor: z.string().nullish(),
9072
+ areaColorOpacity: z.number().nullish()
8883
9073
  });
8884
9074
  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()
9075
+ barStyle: zBarStyle.or(z.array(zBarStyle)).nullish(),
9076
+ pointStyle: zPointStyle.or(z.array(zPointStyle)).nullish(),
9077
+ lineStyle: zLineStyle.or(z.array(zLineStyle)).nullish(),
9078
+ areaStyle: zAreaStyle.or(z.array(zAreaStyle)).nullish()
8889
9079
  });
8890
9080
  const zAnnotationPoint = z.object({
8891
9081
  selector: z.union([
8892
9082
  zSelector,
8893
9083
  zSelectors
8894
9084
  ]),
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(),
9085
+ text: z.string().or(z.array(z.string())).nullish(),
9086
+ textColor: z.string().default('#ffffff').nullish(),
9087
+ textFontSize: z.number().default(12).nullish(),
9088
+ textFontWeight: z.number().default(400).nullish(),
8899
9089
  textAlign: z["enum"]([
8900
9090
  'left',
8901
9091
  'right',
8902
9092
  'center'
8903
- ]).default('center').optional(),
9093
+ ]).default('center').nullish(),
8904
9094
  textBaseline: z["enum"]([
8905
9095
  'top',
8906
9096
  'middle',
8907
9097
  '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()
9098
+ ]).default('middle').nullish(),
9099
+ textBackgroundVisible: z.boolean().default(true).nullish(),
9100
+ textBackgroundColor: z.string().default('#212121').nullish(),
9101
+ textBackgroundBorderColor: z.string().nullish(),
9102
+ textBackgroundBorderWidth: z.number().default(1).nullish(),
9103
+ textBackgroundBorderRadius: z.number().default(4).nullish(),
9104
+ textBackgroundPadding: z.number().nullish(),
9105
+ offsetY: z.number().default(0).nullish(),
9106
+ offsetX: z.number().default(0).nullish()
8917
9107
  });
8918
9108
  const zAnnotationVerticalLine = z.object({
8919
9109
  selector: z.union([
8920
9110
  zSelector,
8921
9111
  zSelectors
8922
- ]).optional(),
9112
+ ]).nullish(),
8923
9113
  xValue: z.union([
8924
9114
  z.number(),
8925
9115
  z.string(),
@@ -8927,8 +9117,8 @@ const zAnnotationVerticalLine = z.object({
8927
9117
  z.number(),
8928
9118
  z.string()
8929
9119
  ]))
8930
- ]).optional(),
8931
- text: z.string().or(z.array(z.string())).optional(),
9120
+ ]).nullish(),
9121
+ text: z.string().or(z.array(z.string())).nullish(),
8932
9122
  textPosition: z["enum"]([
8933
9123
  'outsideStart',
8934
9124
  'outsideEnd',
@@ -8936,34 +9126,34 @@ const zAnnotationVerticalLine = z.object({
8936
9126
  'insideStart',
8937
9127
  'insideMiddle',
8938
9128
  '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(),
9129
+ ]).default('insideEnd').nullish(),
9130
+ textColor: z.string().default('#ffffff').nullish(),
9131
+ textFontSize: z.number().default(12).nullish(),
9132
+ textFontWeight: z.number().default(400).nullish(),
8943
9133
  textAlign: z["enum"]([
8944
9134
  'left',
8945
9135
  'right',
8946
9136
  'center'
8947
- ]).default('right').optional(),
9137
+ ]).default('right').nullish(),
8948
9138
  textBaseline: z["enum"]([
8949
9139
  'top',
8950
9140
  'middle',
8951
9141
  '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(),
9142
+ ]).default('top').nullish(),
9143
+ textBackgroundVisible: z.boolean().default(true).nullish(),
9144
+ textBackgroundColor: z.string().default('#212121').nullish(),
9145
+ textBackgroundBorderColor: z.string().default('#212121').nullish(),
9146
+ textBackgroundBorderRadius: z.number().default(4).nullish(),
9147
+ textBackgroundBorderWidth: z.number().default(1).nullish(),
9148
+ textBackgroundPadding: z.number().default(2).nullish(),
9149
+ lineVisible: z.boolean().default(true).nullish(),
9150
+ lineColor: z.string().default('#212121').nullish(),
9151
+ lineWidth: z.number().default(1).nullish(),
8956
9152
  lineStyle: z.union([
8957
9153
  z.literal('solid'),
8958
9154
  z.literal('dashed'),
8959
9155
  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(),
9156
+ ]).default('dashed').nullish(),
8967
9157
  offsetX: z.number().default(0),
8968
9158
  offsetY: z.number().default(0)
8969
9159
  });
@@ -8971,7 +9161,7 @@ const zAnnotationHorizontalLine = z.object({
8971
9161
  selector: z.union([
8972
9162
  zSelector,
8973
9163
  zSelectors
8974
- ]).optional(),
9164
+ ]).nullish(),
8975
9165
  yValue: z.union([
8976
9166
  z.number(),
8977
9167
  z.string(),
@@ -8979,8 +9169,8 @@ const zAnnotationHorizontalLine = z.object({
8979
9169
  z.number(),
8980
9170
  z.string()
8981
9171
  ]))
8982
- ]).optional(),
8983
- text: z.string().or(z.array(z.string())).optional(),
9172
+ ]).nullish(),
9173
+ text: z.string().or(z.array(z.string())).nullish(),
8984
9174
  textPosition: z["enum"]([
8985
9175
  'outsideStart',
8986
9176
  'outsideEnd',
@@ -8988,34 +9178,34 @@ const zAnnotationHorizontalLine = z.object({
8988
9178
  'insideStart',
8989
9179
  'insideMiddle',
8990
9180
  '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(),
9181
+ ]).default('insideEnd').nullish(),
9182
+ textColor: z.string().default('#ffffff').nullish(),
9183
+ textFontSize: z.number().default(12).nullish(),
9184
+ textFontWeight: z.number().default(400).nullish(),
8995
9185
  textAlign: z["enum"]([
8996
9186
  'left',
8997
9187
  'right',
8998
9188
  'center'
8999
- ]).default('right').optional(),
9189
+ ]).default('right').nullish(),
9000
9190
  textBaseline: z["enum"]([
9001
9191
  'top',
9002
9192
  'middle',
9003
9193
  '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(),
9194
+ ]).default('top').nullish(),
9195
+ lineVisible: z.boolean().default(true).nullish(),
9196
+ lineColor: z.string().default('#212121').nullish(),
9197
+ lineWidth: z.number().default(1).nullish(),
9008
9198
  lineStyle: z.union([
9009
9199
  z.literal('solid'),
9010
9200
  z.literal('dashed'),
9011
9201
  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(),
9202
+ ]).default('dashed').nullish(),
9203
+ textBackgroundVisible: z.boolean().default(true).nullish(),
9204
+ textBackgroundColor: z.string().default('#212121').nullish(),
9205
+ textBackgroundBorderColor: z.string().default('#212121').nullish(),
9206
+ textBackgroundBorderRadius: z.number().default(4).nullish(),
9207
+ textBackgroundBorderWidth: z.number().default(1).nullish(),
9208
+ textBackgroundPadding: z.number().default(2).nullish(),
9019
9209
  offsetX: z.number().default(0),
9020
9210
  offsetY: z.number().default(0)
9021
9211
  });
@@ -9033,60 +9223,60 @@ const zAnnotationArea = z.object({
9033
9223
  'bottomRight',
9034
9224
  'left',
9035
9225
  '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(),
9226
+ ]).default('top').nullish(),
9227
+ text: z.string().or(z.array(z.string())).nullish(),
9228
+ textColor: z.string().default('#ffffff').nullish(),
9229
+ textFontSize: z.number().default(12).nullish(),
9230
+ textFontWeight: z.number().default(400).nullish(),
9041
9231
  textAlign: z["enum"]([
9042
9232
  'left',
9043
9233
  'right',
9044
9234
  'center'
9045
- ]).default('center').optional(),
9235
+ ]).default('center').nullish(),
9046
9236
  textBaseline: z["enum"]([
9047
9237
  'top',
9048
9238
  'middle',
9049
9239
  '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()
9240
+ ]).default('top').nullish(),
9241
+ textBackgroundVisible: z.boolean().default(true).nullish(),
9242
+ textBackgroundColor: z.string().default('#191d24').nullish(),
9243
+ textBackgroundBorderColor: z.string().default('#191d24').nullish(),
9244
+ textBackgroundBorderWidth: z.number().default(1).nullish(),
9245
+ textBackgroundBorderRadius: z.number().default(4).nullish(),
9246
+ textBackgroundPadding: z.number().default(4).nullish(),
9247
+ areaColor: z.string().default('#888888').nullish(),
9248
+ areaColorOpacity: z.number().default(0.15).nullish(),
9249
+ areaBorderColor: z.string().default('#888888').nullish(),
9250
+ areaBorderWidth: z.number().default(1).nullish(),
9251
+ areaBorderRadius: z.number().default(4).nullish(),
9252
+ outerPadding: z.number().default(4).nullish(),
9253
+ offsetX: z.number().default(0).nullish(),
9254
+ offsetY: z.number().default(0).nullish()
9065
9255
  });
9066
9256
  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()
9257
+ annotationPoint: zAnnotationPoint.or(z.array(zAnnotationPoint)).nullish(),
9258
+ annotationVerticalLine: zAnnotationVerticalLine.or(z.array(zAnnotationVerticalLine)).nullish(),
9259
+ annotationHorizontalLine: zAnnotationHorizontalLine.or(z.array(zAnnotationHorizontalLine)).nullish(),
9260
+ annotationArea: zAnnotationArea.or(z.array(zAnnotationArea)).nullish()
9071
9261
  });
9072
9262
  const zSort = z.object({
9073
9263
  order: z["enum"]([
9074
9264
  'asc',
9075
9265
  'desc'
9076
9266
  ]).default('asc'),
9077
- orderBy: z.string().optional(),
9078
- customOrder: z.array(z.any()).optional()
9267
+ orderBy: z.string().nullish(),
9268
+ customOrder: z.array(z.any()).nullish()
9079
9269
  });
9080
9270
  const zSortLegend = z.object({
9081
9271
  order: z["enum"]([
9082
9272
  'asc',
9083
9273
  'desc'
9084
9274
  ]).default('asc'),
9085
- orderBy: z.string().optional(),
9086
- customOrder: z.array(z.any()).optional()
9275
+ orderBy: z.string().nullish(),
9276
+ customOrder: z.array(z.any()).nullish()
9087
9277
  });
9088
9278
  const zAnalysis = z.object({
9089
- orderMapping: z.record(z.string(), z.array(z.string())).optional()
9279
+ orderMapping: z.record(z.string(), z.array(z.string())).nullish()
9090
9280
  });
9091
9281
  const zLocale = z["enum"]([
9092
9282
  'zh-CN',
@@ -9094,384 +9284,410 @@ const zLocale = z["enum"]([
9094
9284
  ]).default('zh-CN');
9095
9285
  const zTable = z.object({
9096
9286
  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()
9287
+ dataset: zDataset.nullish(),
9288
+ dimensions: zDimensions.nullish(),
9289
+ measures: zMeasureTree.nullish(),
9290
+ backgroundColor: zBackgroundColor.nullish(),
9291
+ borderColor: z.string().nullish(),
9292
+ bodyFontSize: z.number().nullish(),
9293
+ bodyFontColor: z.string().nullish(),
9294
+ bodyBackgroundColor: z.string().nullish(),
9295
+ hoverBodyBackgroundColor: z.string().nullish(),
9296
+ hoverBodyInlineBackgroundColor: z.string().nullish(),
9297
+ headerFontSize: z.number().nullish(),
9298
+ headerFontColor: z.string().nullish(),
9299
+ headerBackgroundColor: z.string().nullish(),
9300
+ hoverHeaderBackgroundColor: z.string().nullish(),
9301
+ hoverHeaderInlineBackgroundColor: z.string().nullish(),
9302
+ selectedBorderColor: z.string().nullish(),
9303
+ selectedBackgroundColor: z.string().nullish(),
9304
+ theme: zTheme.nullish(),
9305
+ locale: zLocale.nullish()
9103
9306
  });
9104
9307
  const zPivotTable = z.object({
9105
9308
  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()
9309
+ dataset: zDataset.nullish(),
9310
+ dimensions: zDimensions.nullish(),
9311
+ measures: zMeasures.nullish(),
9312
+ backgroundColor: zBackgroundColor.nullish(),
9313
+ borderColor: z.string().nullish(),
9314
+ bodyFontSize: z.number().nullish(),
9315
+ bodyFontColor: z.string().nullish(),
9316
+ bodyBackgroundColor: z.string().nullish(),
9317
+ hoverBodyBackgroundColor: z.string().nullish(),
9318
+ hoverBodyInlineBackgroundColor: z.string().nullish(),
9319
+ headerFontSize: z.number().nullish(),
9320
+ headerFontColor: z.string().nullish(),
9321
+ headerBackgroundColor: z.string().nullish(),
9322
+ hoverHeaderBackgroundColor: z.string().nullish(),
9323
+ hoverHeaderInlineBackgroundColor: z.string().nullish(),
9324
+ selectedBorderColor: z.string().nullish(),
9325
+ selectedBackgroundColor: z.string().nullish(),
9326
+ theme: zTheme.nullish(),
9327
+ locale: zLocale.nullish()
9112
9328
  });
9113
9329
  const zLine = z.object({
9114
9330
  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()
9331
+ dataset: zDataset.nullish(),
9332
+ dimensions: zDimensions.nullish(),
9333
+ measures: zMeasureTree.nullish(),
9334
+ backgroundColor: zBackgroundColor.nullish(),
9335
+ color: zColor.nullish(),
9336
+ label: zLabel.nullish(),
9337
+ legend: zLegend.nullish(),
9338
+ tooltip: zTooltip.nullish(),
9339
+ xAxis: zXBandAxis.nullish(),
9340
+ yAxis: zYLinearAxis.nullish(),
9341
+ crosshairLine: zCrosshairLine.nullish(),
9342
+ sort: zSort.nullish(),
9343
+ sortLegend: zSortLegend.nullish(),
9344
+ theme: zTheme.nullish(),
9345
+ pointStyle: z.array(zPointStyle).or(zPointStyle).nullish(),
9346
+ lineStyle: z.array(zLineStyle).or(zLineStyle).nullish(),
9347
+ annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).nullish(),
9348
+ annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
9349
+ annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
9350
+ annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).nullish(),
9351
+ locale: zLocale.nullish()
9136
9352
  });
9137
9353
  const zColumn = z.object({
9138
9354
  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()
9355
+ dataset: zDataset.nullish(),
9356
+ dimensions: zDimensions.nullish(),
9357
+ measures: zMeasureTree.nullish(),
9358
+ backgroundColor: zBackgroundColor.nullish(),
9359
+ color: zColor.nullish(),
9360
+ label: zLabel.nullish(),
9361
+ legend: zLegend.nullish(),
9362
+ tooltip: zTooltip.nullish(),
9363
+ xAxis: zXBandAxis.nullish(),
9364
+ yAxis: zYLinearAxis.nullish(),
9365
+ crosshairRect: zCrosshairRect.nullish(),
9366
+ stackCornerRadius: zStackCornerRadius.nullish(),
9367
+ theme: zTheme.nullish(),
9368
+ barStyle: z.array(zBarStyle).or(zBarStyle).nullish(),
9369
+ annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).nullish(),
9370
+ annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
9371
+ annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
9372
+ annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).nullish(),
9373
+ locale: zLocale.nullish()
9158
9374
  });
9159
9375
  const zColumnParallel = z.object({
9160
9376
  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()
9377
+ dataset: zDataset.nullish(),
9378
+ dimensions: zDimensions.nullish(),
9379
+ measures: zMeasureTree.nullish(),
9380
+ backgroundColor: zBackgroundColor.nullish(),
9381
+ color: zColor.nullish(),
9382
+ label: zLabel.nullish(),
9383
+ legend: zLegend.nullish(),
9384
+ tooltip: zTooltip.nullish(),
9385
+ xAxis: zXBandAxis.nullish(),
9386
+ yAxis: zYLinearAxis.nullish(),
9387
+ crosshairRect: zCrosshairRect.nullish(),
9388
+ stackCornerRadius: zStackCornerRadius.nullish(),
9389
+ theme: zTheme.nullish(),
9390
+ barStyle: z.array(zBarStyle).or(zBarStyle).nullish(),
9391
+ annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).nullish(),
9392
+ annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
9393
+ annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
9394
+ annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).nullish(),
9395
+ locale: zLocale.nullish()
9180
9396
  });
9181
9397
  const zColumnPercent = z.object({
9182
9398
  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()
9399
+ dataset: zDataset.nullish(),
9400
+ dimensions: zDimensions.nullish(),
9401
+ measures: zMeasureTree.nullish(),
9402
+ backgroundColor: zBackgroundColor.nullish(),
9403
+ color: zColor.nullish(),
9404
+ label: zLabel.nullish(),
9405
+ legend: zLegend.nullish(),
9406
+ tooltip: zTooltip.nullish(),
9407
+ xAxis: zXBandAxis.nullish(),
9408
+ yAxis: zYLinearAxis.nullish(),
9409
+ crosshairRect: zCrosshairRect.nullish(),
9410
+ stackCornerRadius: zStackCornerRadius.nullish(),
9411
+ theme: zTheme.nullish(),
9412
+ barStyle: z.array(zBarStyle).or(zBarStyle).nullish(),
9413
+ annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).nullish(),
9414
+ annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
9415
+ annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
9416
+ annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).nullish(),
9417
+ locale: zLocale.nullish()
9202
9418
  });
9203
9419
  const zBar = z.object({
9204
9420
  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()
9421
+ dataset: zDataset.nullish(),
9422
+ dimensions: zDimensions.nullish(),
9423
+ measures: zMeasureTree.nullish(),
9424
+ backgroundColor: zBackgroundColor.nullish(),
9425
+ color: zColor.nullish(),
9426
+ label: zLabel.nullish(),
9427
+ legend: zLegend.nullish(),
9428
+ tooltip: zTooltip.nullish(),
9429
+ xAxis: zXLinearAxis.nullish(),
9430
+ yAxis: zYBandAxis.nullish(),
9431
+ crosshairRect: zCrosshairRect.nullish(),
9432
+ stackCornerRadius: zStackCornerRadius.nullish(),
9433
+ theme: zTheme.nullish(),
9434
+ barStyle: z.array(zBarStyle).or(zBarStyle).nullish(),
9435
+ annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).nullish(),
9436
+ annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
9437
+ annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
9438
+ annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).nullish(),
9439
+ locale: zLocale.nullish()
9224
9440
  });
9225
9441
  const zBarParallel = z.object({
9226
9442
  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()
9443
+ dataset: zDataset.nullish(),
9444
+ dimensions: zDimensions.nullish(),
9445
+ measures: zMeasureTree.nullish(),
9446
+ backgroundColor: zBackgroundColor.nullish(),
9447
+ color: zColor.nullish(),
9448
+ label: zLabel.nullish(),
9449
+ legend: zLegend.nullish(),
9450
+ tooltip: zTooltip.nullish(),
9451
+ xAxis: zXLinearAxis.nullish(),
9452
+ yAxis: zYBandAxis.nullish(),
9453
+ crosshairRect: zCrosshairRect.nullish(),
9454
+ stackCornerRadius: zStackCornerRadius.nullish(),
9455
+ theme: zTheme.nullish(),
9456
+ barStyle: z.array(zBarStyle).or(zBarStyle).nullish(),
9457
+ annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).nullish(),
9458
+ annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
9459
+ annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
9460
+ annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).nullish(),
9461
+ locale: zLocale.nullish()
9246
9462
  });
9247
9463
  const zBarPercent = z.object({
9248
9464
  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()
9465
+ dataset: zDataset.nullish(),
9466
+ dimensions: zDimensions.nullish(),
9467
+ measures: zMeasureTree.nullish(),
9468
+ backgroundColor: zBackgroundColor.nullish(),
9469
+ color: zColor.nullish(),
9470
+ label: zLabel.nullish(),
9471
+ legend: zLegend.nullish(),
9472
+ tooltip: zTooltip.nullish(),
9473
+ xAxis: zXLinearAxis.nullish(),
9474
+ yAxis: zYBandAxis.nullish(),
9475
+ crosshairRect: zCrosshairRect.nullish(),
9476
+ stackCornerRadius: zStackCornerRadius.nullish(),
9477
+ theme: zTheme.nullish(),
9478
+ barStyle: z.array(zBarStyle).or(zBarStyle).nullish(),
9479
+ annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).nullish(),
9480
+ annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
9481
+ annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
9482
+ annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).nullish(),
9483
+ locale: zLocale.nullish()
9268
9484
  });
9269
9485
  const zArea = z.object({
9270
9486
  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()
9487
+ dataset: zDataset.nullish(),
9488
+ dimensions: zDimensions.nullish(),
9489
+ measures: zMeasureTree.nullish(),
9490
+ backgroundColor: zBackgroundColor.nullish(),
9491
+ color: zColor.nullish(),
9492
+ label: zLabel.nullish(),
9493
+ legend: zLegend.nullish(),
9494
+ tooltip: zTooltip.nullish(),
9495
+ xAxis: zXBandAxis.nullish(),
9496
+ yAxis: zYLinearAxis.nullish(),
9497
+ crosshairLine: zCrosshairLine.nullish(),
9498
+ theme: zTheme.nullish(),
9499
+ pointStyle: z.array(zPointStyle).or(zPointStyle).nullish(),
9500
+ lineStyle: z.array(zLineStyle).or(zLineStyle).nullish(),
9501
+ areaStyle: z.array(zAreaStyle).or(zAreaStyle).nullish(),
9502
+ annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).nullish(),
9503
+ annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
9504
+ annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
9505
+ annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).nullish(),
9506
+ locale: zLocale.nullish()
9291
9507
  });
9292
9508
  const zAreaPercent = z.object({
9293
9509
  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()
9510
+ dataset: zDataset.nullish(),
9511
+ dimensions: zDimensions.nullish(),
9512
+ measures: zMeasureTree.nullish(),
9513
+ backgroundColor: zBackgroundColor.nullish(),
9514
+ color: zColor.nullish(),
9515
+ label: zLabel.nullish(),
9516
+ legend: zLegend.nullish(),
9517
+ tooltip: zTooltip.nullish(),
9518
+ xAxis: zXBandAxis.nullish(),
9519
+ yAxis: zYLinearAxis.nullish(),
9520
+ crosshairLine: zCrosshairLine.nullish(),
9521
+ theme: zTheme.nullish(),
9522
+ pointStyle: z.array(zPointStyle).or(zPointStyle).nullish(),
9523
+ lineStyle: z.array(zLineStyle).or(zLineStyle).nullish(),
9524
+ areaStyle: z.array(zAreaStyle).or(zAreaStyle).nullish(),
9525
+ annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).nullish(),
9526
+ annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
9527
+ annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
9528
+ annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).nullish(),
9529
+ locale: zLocale.nullish()
9314
9530
  });
9315
9531
  const zAreaRange = z.object({
9316
9532
  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()
9533
+ dataset: zDataset.nullish(),
9534
+ dimensions: zDimensions.nullish(),
9535
+ measures: zMeasureTree.nullish(),
9536
+ backgroundColor: zBackgroundColor.nullish(),
9537
+ label: zLabel.nullish(),
9538
+ xAxis: zXBandAxis.nullish(),
9539
+ yAxis: zYLinearAxis.nullish(),
9540
+ crosshairLine: zCrosshairLine.nullish(),
9541
+ theme: zTheme.nullish(),
9542
+ pointStyle: z.array(zPointStyle).or(zPointStyle).nullish(),
9543
+ lineStyle: z.array(zLineStyle).or(zLineStyle).nullish(),
9544
+ areaStyle: z.array(zAreaStyle).or(zAreaStyle).nullish(),
9545
+ annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).nullish(),
9546
+ annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
9547
+ annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
9548
+ annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).nullish(),
9549
+ locale: zLocale.nullish()
9334
9550
  });
9335
9551
  const zScatter = z.object({
9336
9552
  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()
9553
+ dataset: zDataset.nullish(),
9554
+ dimensions: zDimensions.nullish(),
9555
+ measures: zMeasureTree.nullish(),
9556
+ backgroundColor: zBackgroundColor.nullish(),
9557
+ color: zColor.nullish(),
9558
+ label: zLabel.nullish(),
9559
+ legend: zLegend.nullish(),
9560
+ tooltip: zTooltip.nullish(),
9561
+ xAxis: zXLinearAxis.nullish(),
9562
+ yAxis: zYLinearAxis.nullish(),
9563
+ crosshairLine: zCrosshairLine.nullish(),
9564
+ theme: zTheme.nullish(),
9565
+ pointStyle: z.array(zPointStyle).or(zPointStyle).nullish(),
9566
+ annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).nullish(),
9567
+ annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
9568
+ annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
9569
+ annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).nullish(),
9570
+ locale: zLocale.nullish()
9355
9571
  });
9356
9572
  const zDualAxis = z.object({
9357
9573
  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()
9574
+ dataset: zDataset.nullish(),
9575
+ dimensions: zDimensions.nullish(),
9576
+ measures: zMeasureTree.nullish(),
9577
+ dualMeasures: zDualMeasures.nullish(),
9578
+ dualChartType: z.array(zDualChartType).or(zDualChartType).nullish(),
9579
+ primaryYAxis: z.array(zYLinearAxis).or(zYLinearAxis).nullish(),
9580
+ secondaryYAxis: z.array(zYLinearAxis).or(zYLinearAxis).nullish(),
9581
+ xAxis: zXBandAxis.nullish(),
9582
+ backgroundColor: zBackgroundColor.nullish(),
9583
+ color: zColor.nullish(),
9584
+ label: zLabel.nullish(),
9585
+ legend: zLegend.nullish(),
9586
+ tooltip: zTooltip.nullish(),
9587
+ crosshairRect: zCrosshairRect.nullish(),
9588
+ sort: zSort.nullish(),
9589
+ sortLegend: zSortLegend.nullish(),
9590
+ theme: zTheme.nullish(),
9591
+ barStyle: z.array(zBarStyle).or(zBarStyle).nullish(),
9592
+ pointStyle: z.array(zPointStyle).or(zPointStyle).nullish(),
9593
+ lineStyle: z.array(zLineStyle).or(zLineStyle).nullish(),
9594
+ areaStyle: z.array(zAreaStyle).or(zAreaStyle).nullish(),
9595
+ annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).nullish(),
9596
+ annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
9597
+ annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
9598
+ annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).nullish(),
9599
+ locale: zLocale.nullish()
9384
9600
  });
9385
9601
  const zRose = z.object({
9386
9602
  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()
9603
+ dataset: zDataset.nullish(),
9604
+ dimensions: zDimensions.nullish(),
9605
+ measures: zMeasureTree.nullish(),
9606
+ backgroundColor: zBackgroundColor.nullish(),
9607
+ color: zColor.nullish(),
9608
+ label: zLabel.nullish(),
9609
+ legend: zLegend.nullish(),
9610
+ tooltip: zTooltip.nullish(),
9611
+ theme: zTheme.nullish(),
9612
+ locale: zLocale.nullish()
9397
9613
  });
9398
9614
  const zRoseParallel = z.object({
9399
9615
  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()
9616
+ dataset: zDataset.nullish(),
9617
+ dimensions: zDimensions.nullish(),
9618
+ measures: zMeasureTree.nullish(),
9619
+ backgroundColor: zBackgroundColor.nullish(),
9620
+ color: zColor.nullish(),
9621
+ label: zLabel.nullish(),
9622
+ legend: zLegend.nullish(),
9623
+ tooltip: zTooltip.nullish(),
9624
+ theme: zTheme.nullish(),
9625
+ locale: zLocale.nullish()
9410
9626
  });
9411
9627
  const zPie = z.object({
9412
9628
  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()
9629
+ dataset: zDataset.nullish(),
9630
+ dimensions: zDimensions.nullish(),
9631
+ measures: zMeasureTree.nullish(),
9632
+ backgroundColor: zBackgroundColor.nullish(),
9633
+ color: zColor.nullish(),
9634
+ label: zLabel.nullish(),
9635
+ legend: zLegend.nullish(),
9636
+ tooltip: zTooltip.nullish(),
9637
+ theme: zTheme.nullish(),
9638
+ locale: zLocale.nullish()
9423
9639
  });
9424
9640
  const zDonut = z.object({
9425
9641
  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()
9642
+ dataset: zDataset.nullish(),
9643
+ dimensions: zDimensions.nullish(),
9644
+ measures: zMeasureTree.nullish(),
9645
+ backgroundColor: zBackgroundColor.nullish(),
9646
+ color: zColor.nullish(),
9647
+ label: zLabel.nullish(),
9648
+ legend: zLegend.nullish(),
9649
+ tooltip: zTooltip.nullish(),
9650
+ theme: zTheme.nullish(),
9651
+ locale: zLocale.nullish()
9436
9652
  });
9437
9653
  const zRadar = z.object({
9438
9654
  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()
9655
+ dataset: zDataset.nullish(),
9656
+ dimensions: zDimensions.nullish(),
9657
+ measures: zMeasureTree.nullish(),
9658
+ backgroundColor: zBackgroundColor.nullish(),
9659
+ color: zColor.nullish(),
9660
+ label: zLabel.nullish(),
9661
+ legend: zLegend.nullish(),
9662
+ tooltip: zTooltip.nullish(),
9663
+ theme: zTheme.nullish(),
9664
+ locale: zLocale.nullish()
9449
9665
  });
9450
9666
  const zFunnel = z.object({
9451
9667
  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()
9668
+ dataset: zDataset.nullish(),
9669
+ dimensions: zDimensions.nullish(),
9670
+ measures: zMeasureTree.nullish(),
9671
+ backgroundColor: zBackgroundColor.nullish(),
9672
+ color: zLinearColor.nullish(),
9673
+ label: zLabel.nullish(),
9674
+ legend: zColorLegend.nullish(),
9675
+ tooltip: zTooltip.nullish(),
9676
+ theme: zTheme.nullish(),
9677
+ locale: zLocale.nullish()
9462
9678
  });
9463
9679
  const zHeatmap = z.object({
9464
9680
  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()
9681
+ dataset: zDataset.nullish(),
9682
+ dimensions: zDimensions.nullish(),
9683
+ measures: zMeasureTree.nullish(),
9684
+ backgroundColor: zBackgroundColor.nullish(),
9685
+ color: zLinearColor.nullish(),
9686
+ label: zLabel.nullish(),
9687
+ legend: zColorLegend.nullish(),
9688
+ tooltip: zTooltip.nullish(),
9689
+ theme: zTheme.nullish(),
9690
+ locale: zLocale.nullish()
9475
9691
  });
9476
9692
  const zVSeed = z.discriminatedUnion('chartType', [
9477
9693
  zTable,
@@ -9511,6 +9727,6 @@ const zAdvancedVSeed = z.object({
9511
9727
  annotation: zAnnotation,
9512
9728
  locale: zLocale
9513
9729
  });
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 };
9730
+ 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
9731
 
9516
9732
  //# sourceMappingURL=index.js.map