@visactor/vseed 0.1.21 → 0.1.23

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 (139) hide show
  1. package/dist/cjs/index.cjs +2 -2
  2. package/dist/cjs/index.cjs.map +1 -1
  3. package/dist/esm/builder/builder/builder.d.ts +12 -0
  4. package/dist/esm/pipeline/advanced/chart/pipeline/area.js +2 -1
  5. package/dist/esm/pipeline/advanced/chart/pipeline/area.js.map +1 -1
  6. package/dist/esm/pipeline/advanced/chart/pipeline/areaPercent.js +2 -1
  7. package/dist/esm/pipeline/advanced/chart/pipeline/areaPercent.js.map +1 -1
  8. package/dist/esm/pipeline/advanced/chart/pipeline/bar.js +2 -1
  9. package/dist/esm/pipeline/advanced/chart/pipeline/bar.js.map +1 -1
  10. package/dist/esm/pipeline/advanced/chart/pipeline/barParallel.js +2 -1
  11. package/dist/esm/pipeline/advanced/chart/pipeline/barParallel.js.map +1 -1
  12. package/dist/esm/pipeline/advanced/chart/pipeline/barPercent.js +2 -1
  13. package/dist/esm/pipeline/advanced/chart/pipeline/barPercent.js.map +1 -1
  14. package/dist/esm/pipeline/advanced/chart/pipeline/column.js +2 -1
  15. package/dist/esm/pipeline/advanced/chart/pipeline/column.js.map +1 -1
  16. package/dist/esm/pipeline/advanced/chart/pipeline/columnParallel.js +2 -1
  17. package/dist/esm/pipeline/advanced/chart/pipeline/columnParallel.js.map +1 -1
  18. package/dist/esm/pipeline/advanced/chart/pipeline/columnPercent.js +2 -1
  19. package/dist/esm/pipeline/advanced/chart/pipeline/columnPercent.js.map +1 -1
  20. package/dist/esm/pipeline/advanced/chart/pipeline/donut.js +2 -1
  21. package/dist/esm/pipeline/advanced/chart/pipeline/donut.js.map +1 -1
  22. package/dist/esm/pipeline/advanced/chart/pipeline/dualAxis.js +2 -1
  23. package/dist/esm/pipeline/advanced/chart/pipeline/dualAxis.js.map +1 -1
  24. package/dist/esm/pipeline/advanced/chart/pipeline/funnel.js +2 -1
  25. package/dist/esm/pipeline/advanced/chart/pipeline/funnel.js.map +1 -1
  26. package/dist/esm/pipeline/advanced/chart/pipeline/heatmap.js +2 -1
  27. package/dist/esm/pipeline/advanced/chart/pipeline/heatmap.js.map +1 -1
  28. package/dist/esm/pipeline/advanced/chart/pipeline/line.js +2 -1
  29. package/dist/esm/pipeline/advanced/chart/pipeline/line.js.map +1 -1
  30. package/dist/esm/pipeline/advanced/chart/pipeline/pie.js +2 -1
  31. package/dist/esm/pipeline/advanced/chart/pipeline/pie.js.map +1 -1
  32. package/dist/esm/pipeline/advanced/chart/pipeline/radar.js +2 -1
  33. package/dist/esm/pipeline/advanced/chart/pipeline/radar.js.map +1 -1
  34. package/dist/esm/pipeline/advanced/chart/pipeline/rose.js +2 -1
  35. package/dist/esm/pipeline/advanced/chart/pipeline/rose.js.map +1 -1
  36. package/dist/esm/pipeline/advanced/chart/pipeline/roseParallel.js +2 -1
  37. package/dist/esm/pipeline/advanced/chart/pipeline/roseParallel.js.map +1 -1
  38. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithDualEncoding.js +2 -2
  39. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithDualEncoding.js.map +1 -1
  40. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithEncoding.js +1 -1
  41. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithEncoding.js.map +1 -1
  42. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithScatterEncoding.js +2 -2
  43. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithScatterEncoding.js.map +1 -1
  44. package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithDualEncoding.js +2 -2
  45. package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithDualEncoding.js.map +1 -1
  46. package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithEncoding.js +2 -1
  47. package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithEncoding.js.map +1 -1
  48. package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithScatterEncoding.js +2 -2
  49. package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithScatterEncoding.js.map +1 -1
  50. package/dist/esm/pipeline/spec/chart/pipeline/donut.js +2 -1
  51. package/dist/esm/pipeline/spec/chart/pipeline/donut.js.map +1 -1
  52. package/dist/esm/pipeline/spec/chart/pipeline/funnel.js +2 -1
  53. package/dist/esm/pipeline/spec/chart/pipeline/funnel.js.map +1 -1
  54. package/dist/esm/pipeline/spec/chart/pipeline/pie.js +2 -1
  55. package/dist/esm/pipeline/spec/chart/pipeline/pie.js.map +1 -1
  56. package/dist/esm/pipeline/spec/chart/pipeline/radar.js +2 -1
  57. package/dist/esm/pipeline/spec/chart/pipeline/radar.js.map +1 -1
  58. package/dist/esm/pipeline/spec/chart/pipeline/rose.js +2 -1
  59. package/dist/esm/pipeline/spec/chart/pipeline/rose.js.map +1 -1
  60. package/dist/esm/pipeline/spec/chart/pipeline/roseParallel.js +2 -1
  61. package/dist/esm/pipeline/spec/chart/pipeline/roseParallel.js.map +1 -1
  62. package/dist/esm/pipeline/spec/chart/pipes/axes/xLinear.js +9 -3
  63. package/dist/esm/pipeline/spec/chart/pipes/axes/xLinear.js.map +1 -1
  64. package/dist/esm/pipeline/spec/chart/pipes/axes/yLinear.js +9 -3
  65. package/dist/esm/pipeline/spec/chart/pipes/axes/yLinear.js.map +1 -1
  66. package/dist/esm/pipeline/spec/chart/pipes/color/colorAdapter.d.ts +3 -3
  67. package/dist/esm/pipeline/spec/chart/pipes/color/colorAdapter.js +8 -6
  68. package/dist/esm/pipeline/spec/chart/pipes/color/colorAdapter.js.map +1 -1
  69. package/dist/esm/pipeline/spec/chart/pipes/color/colorAreaStyleFill.js +2 -2
  70. package/dist/esm/pipeline/spec/chart/pipes/color/colorAreaStyleFill.js.map +1 -1
  71. package/dist/esm/pipeline/spec/chart/pipes/color/colorBarStyleFill.js +2 -2
  72. package/dist/esm/pipeline/spec/chart/pipes/color/colorBarStyleFill.js.map +1 -1
  73. package/dist/esm/pipeline/spec/chart/pipes/color/colorCellStyleFill.js +2 -2
  74. package/dist/esm/pipeline/spec/chart/pipes/color/colorCellStyleFill.js.map +1 -1
  75. package/dist/esm/pipeline/spec/chart/pipes/color/colorFunnelStyleFill.js +2 -2
  76. package/dist/esm/pipeline/spec/chart/pipes/color/colorFunnelStyleFill.js.map +1 -1
  77. package/dist/esm/pipeline/spec/chart/pipes/color/colorLineStyleFill.js +2 -2
  78. package/dist/esm/pipeline/spec/chart/pipes/color/colorLineStyleFill.js.map +1 -1
  79. package/dist/esm/pipeline/spec/chart/pipes/color/colorPieStyleFill.js +2 -2
  80. package/dist/esm/pipeline/spec/chart/pipes/color/colorPieStyleFill.js.map +1 -1
  81. package/dist/esm/pipeline/spec/chart/pipes/color/colorPointStyleFill.js +2 -2
  82. package/dist/esm/pipeline/spec/chart/pipes/color/colorPointStyleFill.js.map +1 -1
  83. package/dist/esm/pipeline/spec/chart/pipes/color/colorRoseStyleFill.js +2 -2
  84. package/dist/esm/pipeline/spec/chart/pipes/color/colorRoseStyleFill.js.map +1 -1
  85. package/dist/esm/pipeline/spec/chart/pipes/init/area.js +2 -2
  86. package/dist/esm/pipeline/spec/chart/pipes/init/area.js.map +1 -1
  87. package/dist/esm/pipeline/spec/chart/pipes/init/dualAxis.js +2 -2
  88. package/dist/esm/pipeline/spec/chart/pipes/init/dualAxis.js.map +1 -1
  89. package/dist/esm/pipeline/spec/chart/pipes/init/line.js +2 -2
  90. package/dist/esm/pipeline/spec/chart/pipes/init/line.js.map +1 -1
  91. package/dist/esm/pipeline/spec/chart/pipes/init/radar.js +2 -2
  92. package/dist/esm/pipeline/spec/chart/pipes/init/radar.js.map +1 -1
  93. package/dist/esm/pipeline/spec/chart/pipes/markStyle/areaStyle.js +9 -1
  94. package/dist/esm/pipeline/spec/chart/pipes/markStyle/areaStyle.js.map +1 -1
  95. package/dist/esm/pipeline/spec/chart/pipes/markStyle/curve/curve.d.ts +3 -0
  96. package/dist/esm/pipeline/spec/chart/pipes/markStyle/curve/curve.js +12 -0
  97. package/dist/esm/pipeline/spec/chart/pipes/markStyle/curve/curve.js.map +1 -0
  98. package/dist/esm/pipeline/spec/chart/pipes/markStyle/curve/index.d.ts +1 -0
  99. package/dist/esm/pipeline/spec/chart/pipes/markStyle/curve/index.js +2 -0
  100. package/dist/esm/pipeline/spec/chart/pipes/markStyle/lineStyle.js +4 -1
  101. package/dist/esm/pipeline/spec/chart/pipes/markStyle/lineStyle.js.map +1 -1
  102. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/index.d.ts +1 -0
  103. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/index.js +2 -1
  104. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.js +7 -4
  105. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.js.map +1 -1
  106. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotHideIndicatorName.d.ts +2 -0
  107. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotHideIndicatorName.js +7 -0
  108. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotHideIndicatorName.js.map +1 -0
  109. package/dist/esm/pipeline/spec/chart/pipes/size/scatterSize.js +2 -1
  110. package/dist/esm/pipeline/spec/chart/pipes/size/scatterSize.js.map +1 -1
  111. package/dist/esm/pipeline/utils/chatType.d.ts +20 -1
  112. package/dist/esm/pipeline/utils/chatType.js +18 -10
  113. package/dist/esm/pipeline/utils/chatType.js.map +1 -1
  114. package/dist/esm/pipeline/utils/constant.d.ts +22 -0
  115. package/dist/esm/pipeline/utils/constant.js +23 -1
  116. package/dist/esm/pipeline/utils/constant.js.map +1 -1
  117. package/dist/esm/pipeline/utils/format/createNumFormatter.js +2 -1
  118. package/dist/esm/pipeline/utils/format/createNumFormatter.js.map +1 -1
  119. package/dist/esm/pipeline/utils/index.d.ts +1 -0
  120. package/dist/esm/pipeline/utils/index.js +1 -0
  121. package/dist/esm/theme/dark.js +5 -1
  122. package/dist/esm/theme/dark.js.map +1 -1
  123. package/dist/esm/theme/light.js +8 -13
  124. package/dist/esm/theme/light.js.map +1 -1
  125. package/dist/esm/types/advancedVSeed.d.ts +4 -0
  126. package/dist/esm/types/chartType/funnel/funnel.d.ts +2 -2
  127. package/dist/esm/types/chartType/heatmap/heatmap.d.ts +2 -2
  128. package/dist/esm/types/properties/chartType/chartType.d.ts +0 -22
  129. package/dist/esm/types/properties/chartType/chartType.js +1 -23
  130. package/dist/esm/types/properties/chartType/chartType.js.map +1 -1
  131. package/dist/esm/types/properties/config/color/color.d.ts +0 -8
  132. package/dist/esm/types/properties/config/color/color.js.map +1 -1
  133. package/dist/esm/types/properties/config/config.d.ts +4 -0
  134. package/dist/esm/types/properties/config/config.js +3 -1
  135. package/dist/esm/types/properties/config/config.js.map +1 -1
  136. package/dist/esm/types/properties/theme/customTheme.d.ts +4 -0
  137. package/dist/umd/index.js +321 -214
  138. package/dist/umd/index.js.map +1 -1
  139. package/package.json +3 -3
@@ -1,9 +1,13 @@
1
1
  import { measureDepth } from "./measures/index.js";
2
2
  import { isMeasureTreeWithChildren, isMeasureTreeWithParentId } from "../advanced/chart/pipes/measures/utils.js";
3
3
  import { unique } from "remeda";
4
- import { DEFAULT_PARENT_ID } from "./constant.js";
5
- const isTable = (vseed)=>'table' === vseed.chartType;
6
- const isPivotTable = (vseed)=>'pivotTable' === vseed.chartType;
4
+ import { ChartTypeEnum, DEFAULT_PARENT_ID } from "./constant.js";
5
+ const isTable = (vseed)=>vseed.chartType === ChartTypeEnum.Table;
6
+ const isPivotTable = (vseed)=>vseed.chartType === ChartTypeEnum.PivotTable;
7
+ const isRadar = (vseed)=>vseed.chartType === ChartTypeEnum.Radar;
8
+ const isAreaPercent = (vseed)=>vseed.chartType === ChartTypeEnum.AreaPercent;
9
+ const isColumnPercent = (vseed)=>vseed.chartType === ChartTypeEnum.ColumnPercent;
10
+ const isBarPercent = (vseed)=>vseed.chartType === ChartTypeEnum.BarPercent;
7
11
  const isVTable = (vseed)=>[
8
12
  'table',
9
13
  'pivotTable'
@@ -11,14 +15,19 @@ const isVTable = (vseed)=>[
11
15
  const isVChart = (vseed)=>!isVTable(vseed);
12
16
  const isPivotChart = (vseed)=>{
13
17
  if (isVTable(vseed)) return false;
18
+ if (isPivot(vseed)) return true;
19
+ return isCombination(vseed);
20
+ };
21
+ const isPivot = (vseed)=>{
22
+ const { dimensions = [] } = vseed;
23
+ return dimensions && dimensions.some((dimension)=>'row' === dimension.encoding || 'column' === dimension.encoding);
24
+ };
25
+ const isCombination = (vseed)=>{
14
26
  if (isMeasureTreeWithParentId(vseed.measures)) {
15
27
  const parentIds = vseed.measures?.map((measure)=>measure.parentId || DEFAULT_PARENT_ID);
16
28
  return parentIds && unique(parentIds).length > 1;
17
29
  }
18
30
  if ('dualAxis' === vseed.chartType || 'scatter' === vseed.chartType) {
19
- const { dimensions = [] } = vseed;
20
- const hasRowOrColumnDimension = dimensions && dimensions.some((dimension)=>'row' === dimension.encoding || 'column' === dimension.encoding);
21
- if (hasRowOrColumnDimension) return true;
22
31
  if ('scatter' === vseed.chartType) {
23
32
  if (isMeasureTreeWithChildren(vseed.measures)) {
24
33
  const depth = measureDepth(vseed.measures);
@@ -36,11 +45,10 @@ const isPivotChart = (vseed)=>{
36
45
  }
37
46
  return false;
38
47
  }
39
- const { measures = [], dimensions = [] } = vseed;
40
- const hasRowOrColumnDimension = dimensions && dimensions.some((dimension)=>'row' === dimension.encoding || 'column' === dimension.encoding);
48
+ const { measures = [] } = vseed;
41
49
  const hasMeasureGroup = measures && measures.some((measure)=>measure && measure.children);
42
- return hasRowOrColumnDimension || hasMeasureGroup;
50
+ return hasMeasureGroup;
43
51
  };
44
- export { isPivotChart, isPivotTable, isTable, isVChart, isVTable };
52
+ export { isAreaPercent, isBarPercent, isColumnPercent, isCombination, isPivot, isPivotChart, isPivotTable, isRadar, isTable, isVChart, isVTable };
45
53
 
46
54
  //# sourceMappingURL=chatType.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/utils/chatType.js","sources":["webpack://@visactor/vseed/./src/pipeline/utils/chatType.ts"],"sourcesContent":["import type { Dimensions, DimensionGroup, DimensionTree, VSeed, Measure } from 'src/types'\nimport { measureDepth } from './measures'\nimport { isMeasureTreeWithChildren, isMeasureTreeWithParentId } from '../advanced/chart/pipes/measures/utils'\nimport { unique } from 'remeda'\nimport { DEFAULT_PARENT_ID } from './constant'\n\nexport const isTable = (vseed: VSeed) => {\n return vseed.chartType === 'table'\n}\nexport const isPivotTable = (vseed: VSeed) => {\n return vseed.chartType === 'pivotTable'\n}\nexport const isVTable = (vseed: VSeed) => {\n return ['table', 'pivotTable'].includes(vseed.chartType)\n}\nexport const isVChart = (vseed: VSeed): boolean => {\n return !isVTable(vseed)\n}\nexport const isPivotChart = (vseed: VSeed) => {\n if (isVTable(vseed)) {\n return false\n }\n\n if (isMeasureTreeWithParentId(vseed.measures)) {\n const parentIds = vseed.measures?.map((measure: Measure) => measure.parentId || DEFAULT_PARENT_ID)\n return parentIds && unique(parentIds).length > 1\n }\n\n if (vseed.chartType === 'dualAxis' || vseed.chartType === 'scatter') {\n const { dimensions = [] } = vseed as {\n dimensions: Dimensions\n }\n const hasRowOrColumnDimension =\n dimensions && dimensions.some((dimension) => dimension.encoding === 'row' || dimension.encoding === 'column')\n\n if (hasRowOrColumnDimension) {\n return true\n }\n\n if (vseed.chartType === 'scatter') {\n if (isMeasureTreeWithChildren(vseed.measures)) {\n const depth = measureDepth(vseed.measures)\n return depth === 3\n }\n\n if (vseed.scatterMeasures && vseed.scatterMeasures.length > 1) {\n return true\n }\n return false\n }\n if (vseed.chartType === 'dualAxis') {\n if (isMeasureTreeWithChildren(vseed.measures)) {\n const depth = measureDepth(vseed.measures)\n return depth === 3\n }\n\n if (vseed.dualMeasures && vseed.dualMeasures.length > 1) {\n return true\n }\n }\n\n return false\n }\n\n const { measures = [], dimensions = [] } = vseed as {\n measures: DimensionTree\n dimensions: Dimensions\n }\n\n const hasRowOrColumnDimension =\n dimensions && dimensions.some((dimension) => dimension.encoding === 'row' || dimension.encoding === 'column')\n\n const hasMeasureGroup = measures && measures.some((measure: DimensionGroup) => measure && measure.children)\n\n return hasRowOrColumnDimension || hasMeasureGroup\n}\n"],"names":["isTable","vseed","isPivotTable","isVTable","isVChart","isPivotChart","isMeasureTreeWithParentId","parentIds","measure","DEFAULT_PARENT_ID","unique","dimensions","hasRowOrColumnDimension","dimension","isMeasureTreeWithChildren","depth","measureDepth","measures","hasMeasureGroup"],"mappings":";;;;AAMO,MAAMA,UAAU,CAACC,QACfA,AAAoB,YAApBA,MAAM,SAAS;AAEjB,MAAMC,eAAe,CAACD,QACpBA,AAAoB,iBAApBA,MAAM,SAAS;AAEjB,MAAME,WAAW,CAACF,QAChB;QAAC;QAAS;KAAa,CAAC,QAAQ,CAACA,MAAM,SAAS;AAElD,MAAMG,WAAW,CAACH,QAChB,CAACE,SAASF;AAEZ,MAAMI,eAAe,CAACJ;IAC3B,IAAIE,SAASF,QACX,OAAO;IAGT,IAAIK,0BAA0BL,MAAM,QAAQ,GAAG;QAC7C,MAAMM,YAAYN,MAAM,QAAQ,EAAE,IAAI,CAACO,UAAqBA,QAAQ,QAAQ,IAAIC;QAChF,OAAOF,aAAaG,OAAOH,WAAW,MAAM,GAAG;IACjD;IAEA,IAAIN,AAAoB,eAApBA,MAAM,SAAS,IAAmBA,AAAoB,cAApBA,MAAM,SAAS,EAAgB;QACnE,MAAM,EAAEU,aAAa,EAAE,EAAE,GAAGV;QAG5B,MAAMW,0BACJD,cAAcA,WAAW,IAAI,CAAC,CAACE,YAAcA,AAAuB,UAAvBA,UAAU,QAAQ,IAAcA,AAAuB,aAAvBA,UAAU,QAAQ;QAEjG,IAAID,yBACF,OAAO;QAGT,IAAIX,AAAoB,cAApBA,MAAM,SAAS,EAAgB;YACjC,IAAIa,0BAA0Bb,MAAM,QAAQ,GAAG;gBAC7C,MAAMc,QAAQC,aAAaf,MAAM,QAAQ;gBACzC,OAAOc,AAAU,MAAVA;YACT;YAEA,IAAId,MAAM,eAAe,IAAIA,MAAM,eAAe,CAAC,MAAM,GAAG,GAC1D,OAAO;YAET,OAAO;QACT;QACA,IAAIA,AAAoB,eAApBA,MAAM,SAAS,EAAiB;YAClC,IAAIa,0BAA0Bb,MAAM,QAAQ,GAAG;gBAC7C,MAAMc,QAAQC,aAAaf,MAAM,QAAQ;gBACzC,OAAOc,AAAU,MAAVA;YACT;YAEA,IAAId,MAAM,YAAY,IAAIA,MAAM,YAAY,CAAC,MAAM,GAAG,GACpD,OAAO;QAEX;QAEA,OAAO;IACT;IAEA,MAAM,EAAEgB,WAAW,EAAE,EAAEN,aAAa,EAAE,EAAE,GAAGV;IAK3C,MAAMW,0BACJD,cAAcA,WAAW,IAAI,CAAC,CAACE,YAAcA,AAAuB,UAAvBA,UAAU,QAAQ,IAAcA,AAAuB,aAAvBA,UAAU,QAAQ;IAEjG,MAAMK,kBAAkBD,YAAYA,SAAS,IAAI,CAAC,CAACT,UAA4BA,WAAWA,QAAQ,QAAQ;IAE1G,OAAOI,2BAA2BM;AACpC"}
1
+ {"version":3,"file":"pipeline/utils/chatType.js","sources":["webpack://@visactor/vseed/./src/pipeline/utils/chatType.ts"],"sourcesContent":["import { type Dimensions, type DimensionGroup, type DimensionTree, type VSeed, type Measure } from 'src/types'\nimport { measureDepth } from './measures'\nimport { isMeasureTreeWithChildren, isMeasureTreeWithParentId } from '../advanced/chart/pipes/measures/utils'\nimport { unique } from 'remeda'\nimport { ChartTypeEnum, DEFAULT_PARENT_ID } from './constant'\n\nexport const isTable = (vseed: VSeed) => {\n return vseed.chartType === ChartTypeEnum.Table\n}\nexport const isPivotTable = (vseed: VSeed) => {\n return vseed.chartType === ChartTypeEnum.PivotTable\n}\nexport const isRadar = (vseed: VSeed) => {\n return vseed.chartType === ChartTypeEnum.Radar\n}\nexport const isAreaPercent = (vseed: VSeed) => {\n return vseed.chartType === ChartTypeEnum.AreaPercent\n}\nexport const isColumnPercent = (vseed: VSeed) => {\n return vseed.chartType === ChartTypeEnum.ColumnPercent\n}\nexport const isBarPercent = (vseed: VSeed) => {\n return vseed.chartType === ChartTypeEnum.BarPercent\n}\n\nexport const isVTable = (vseed: VSeed) => {\n return ['table', 'pivotTable'].includes(vseed.chartType)\n}\nexport const isVChart = (vseed: VSeed): boolean => {\n return !isVTable(vseed)\n}\n\n/**\n * @description 透视图表或组合图\n * - 透视图表定义: 存在 column 或 row的 encoding\n * - 组合图表定义: 存在多组指标的情况\n * - 透视组合图表: 存在 column 或 row的 encoding 且 存在多组指标的情况\n * 上述三者都只能使用 VTable.PivotChart 绘制\n */\nexport const isPivotChart = (vseed: VSeed) => {\n if (isVTable(vseed)) {\n return false\n }\n\n if (isPivot(vseed)) {\n return true\n }\n\n return isCombination(vseed)\n}\n\n/**\n * @description 存在column row的encoding\n */\nexport const isPivot = (vseed: VSeed) => {\n const { dimensions = [] } = vseed as {\n dimensions: Dimensions\n }\n\n return dimensions && dimensions.some((dimension) => dimension.encoding === 'row' || dimension.encoding === 'column')\n}\n/**\n * @description 不存在column 或 row的encoding, 但是有多组指标的情况\n */\nexport const isCombination = (vseed: VSeed) => {\n if (isMeasureTreeWithParentId(vseed.measures)) {\n const parentIds = vseed.measures?.map((measure: Measure) => measure.parentId || DEFAULT_PARENT_ID)\n return parentIds && unique(parentIds).length > 1\n }\n\n if (vseed.chartType === 'dualAxis' || vseed.chartType === 'scatter') {\n if (vseed.chartType === 'scatter') {\n if (isMeasureTreeWithChildren(vseed.measures)) {\n const depth = measureDepth(vseed.measures)\n return depth === 3\n }\n\n if (vseed.scatterMeasures && vseed.scatterMeasures.length > 1) {\n return true\n }\n return false\n }\n if (vseed.chartType === 'dualAxis') {\n if (isMeasureTreeWithChildren(vseed.measures)) {\n const depth = measureDepth(vseed.measures)\n return depth === 3\n }\n\n if (vseed.dualMeasures && vseed.dualMeasures.length > 1) {\n return true\n }\n }\n\n return false\n }\n\n const { measures = [] } = vseed as {\n measures: DimensionTree\n dimensions: Dimensions\n }\n\n const hasMeasureGroup = measures && measures.some((measure: DimensionGroup) => measure && measure.children)\n\n return hasMeasureGroup\n}\n"],"names":["isTable","vseed","ChartTypeEnum","isPivotTable","isRadar","isAreaPercent","isColumnPercent","isBarPercent","isVTable","isVChart","isPivotChart","isPivot","isCombination","dimensions","dimension","isMeasureTreeWithParentId","parentIds","measure","DEFAULT_PARENT_ID","unique","isMeasureTreeWithChildren","depth","measureDepth","measures","hasMeasureGroup"],"mappings":";;;;AAMO,MAAMA,UAAU,CAACC,QACfA,MAAM,SAAS,KAAKC,cAAc,KAAK;AAEzC,MAAMC,eAAe,CAACF,QACpBA,MAAM,SAAS,KAAKC,cAAc,UAAU;AAE9C,MAAME,UAAU,CAACH,QACfA,MAAM,SAAS,KAAKC,cAAc,KAAK;AAEzC,MAAMG,gBAAgB,CAACJ,QACrBA,MAAM,SAAS,KAAKC,cAAc,WAAW;AAE/C,MAAMI,kBAAkB,CAACL,QACvBA,MAAM,SAAS,KAAKC,cAAc,aAAa;AAEjD,MAAMK,eAAe,CAACN,QACpBA,MAAM,SAAS,KAAKC,cAAc,UAAU;AAG9C,MAAMM,WAAW,CAACP,QAChB;QAAC;QAAS;KAAa,CAAC,QAAQ,CAACA,MAAM,SAAS;AAElD,MAAMQ,WAAW,CAACR,QAChB,CAACO,SAASP;AAUZ,MAAMS,eAAe,CAACT;IAC3B,IAAIO,SAASP,QACX,OAAO;IAGT,IAAIU,QAAQV,QACV,OAAO;IAGT,OAAOW,cAAcX;AACvB;AAKO,MAAMU,UAAU,CAACV;IACtB,MAAM,EAAEY,aAAa,EAAE,EAAE,GAAGZ;IAI5B,OAAOY,cAAcA,WAAW,IAAI,CAAC,CAACC,YAAcA,AAAuB,UAAvBA,UAAU,QAAQ,IAAcA,AAAuB,aAAvBA,UAAU,QAAQ;AACxG;AAIO,MAAMF,gBAAgB,CAACX;IAC5B,IAAIc,0BAA0Bd,MAAM,QAAQ,GAAG;QAC7C,MAAMe,YAAYf,MAAM,QAAQ,EAAE,IAAI,CAACgB,UAAqBA,QAAQ,QAAQ,IAAIC;QAChF,OAAOF,aAAaG,OAAOH,WAAW,MAAM,GAAG;IACjD;IAEA,IAAIf,AAAoB,eAApBA,MAAM,SAAS,IAAmBA,AAAoB,cAApBA,MAAM,SAAS,EAAgB;QACnE,IAAIA,AAAoB,cAApBA,MAAM,SAAS,EAAgB;YACjC,IAAImB,0BAA0BnB,MAAM,QAAQ,GAAG;gBAC7C,MAAMoB,QAAQC,aAAarB,MAAM,QAAQ;gBACzC,OAAOoB,AAAU,MAAVA;YACT;YAEA,IAAIpB,MAAM,eAAe,IAAIA,MAAM,eAAe,CAAC,MAAM,GAAG,GAC1D,OAAO;YAET,OAAO;QACT;QACA,IAAIA,AAAoB,eAApBA,MAAM,SAAS,EAAiB;YAClC,IAAImB,0BAA0BnB,MAAM,QAAQ,GAAG;gBAC7C,MAAMoB,QAAQC,aAAarB,MAAM,QAAQ;gBACzC,OAAOoB,AAAU,MAAVA;YACT;YAEA,IAAIpB,MAAM,YAAY,IAAIA,MAAM,YAAY,CAAC,MAAM,GAAG,GACpD,OAAO;QAEX;QAEA,OAAO;IACT;IAEA,MAAM,EAAEsB,WAAW,EAAE,EAAE,GAAGtB;IAK1B,MAAMuB,kBAAkBD,YAAYA,SAAS,IAAI,CAAC,CAACN,UAA4BA,WAAWA,QAAQ,QAAQ;IAE1G,OAAOO;AACT"}
@@ -4,3 +4,25 @@ export declare const DUAL_AXIS_CHART_COLUMN_Z_INDEX = 1000;
4
4
  export declare const DUAL_AXIS_CHART_NON_COLUMN_Z_INDEX = 1001;
5
5
  export declare const DUAL_AXIS_LABEL_Z_INDEX = 1002;
6
6
  export declare const DEFAULT_PARENT_ID = "__DefaultParentId__";
7
+ export declare const ChartTypeEnum: {
8
+ readonly Table: "table";
9
+ readonly PivotTable: "pivotTable";
10
+ readonly Line: "line";
11
+ readonly Column: "column";
12
+ readonly ColumnPercent: "columnPercent";
13
+ readonly ColumnParallel: "columnParallel";
14
+ readonly Bar: "bar";
15
+ readonly BarPercent: "barPercent";
16
+ readonly BarParallel: "barParallel";
17
+ readonly Area: "area";
18
+ readonly AreaPercent: "areaPercent";
19
+ readonly DualAxis: "dualAxis";
20
+ readonly Scatter: "scatter";
21
+ readonly Rose: "rose";
22
+ readonly RoseParallel: "roseParallel";
23
+ readonly Pie: "pie";
24
+ readonly Donut: "donut";
25
+ readonly Radar: "radar";
26
+ readonly Funnel: "funnel";
27
+ readonly Heatmap: "heatmap";
28
+ };
@@ -4,6 +4,28 @@ const DUAL_AXIS_CHART_COLUMN_Z_INDEX = 1000;
4
4
  const DUAL_AXIS_CHART_NON_COLUMN_Z_INDEX = 1001;
5
5
  const DUAL_AXIS_LABEL_Z_INDEX = 1002;
6
6
  const DEFAULT_PARENT_ID = '__DefaultParentId__';
7
- export { ANNOTATION_Z_INDEX, DEFAULT_PARENT_ID, DUAL_AXIS_CHART_COLUMN_Z_INDEX, DUAL_AXIS_CHART_NON_COLUMN_Z_INDEX, DUAL_AXIS_LABEL_Z_INDEX, LINEAR_AXIS_INNER_OFFSET_TOP };
7
+ const ChartTypeEnum = {
8
+ Table: 'table',
9
+ PivotTable: 'pivotTable',
10
+ Line: 'line',
11
+ Column: 'column',
12
+ ColumnPercent: 'columnPercent',
13
+ ColumnParallel: 'columnParallel',
14
+ Bar: 'bar',
15
+ BarPercent: 'barPercent',
16
+ BarParallel: 'barParallel',
17
+ Area: 'area',
18
+ AreaPercent: 'areaPercent',
19
+ DualAxis: 'dualAxis',
20
+ Scatter: 'scatter',
21
+ Rose: 'rose',
22
+ RoseParallel: 'roseParallel',
23
+ Pie: 'pie',
24
+ Donut: 'donut',
25
+ Radar: 'radar',
26
+ Funnel: 'funnel',
27
+ Heatmap: 'heatmap'
28
+ };
29
+ export { ANNOTATION_Z_INDEX, ChartTypeEnum, DEFAULT_PARENT_ID, DUAL_AXIS_CHART_COLUMN_Z_INDEX, DUAL_AXIS_CHART_NON_COLUMN_Z_INDEX, DUAL_AXIS_LABEL_Z_INDEX, LINEAR_AXIS_INNER_OFFSET_TOP };
8
30
 
9
31
  //# sourceMappingURL=constant.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/utils/constant.js","sources":["webpack://@visactor/vseed/./src/pipeline/utils/constant.ts"],"sourcesContent":["// 标注层 z-index\nexport const ANNOTATION_Z_INDEX = 1000\n// 线性轴 顶部空隙 预留5px\nexport const LINEAR_AXIS_INNER_OFFSET_TOP = 7\n// 双轴图 柱图 ZIndex\nexport const DUAL_AXIS_CHART_COLUMN_Z_INDEX = 1000\n// 双轴图 非柱图 ZIndex\nexport const DUAL_AXIS_CHART_NON_COLUMN_Z_INDEX = 1001\n// 双轴图 标注层 ZIndex\nexport const DUAL_AXIS_LABEL_Z_INDEX = 1002\n// 默认父级id\nexport const DEFAULT_PARENT_ID = '__DefaultParentId__'\n"],"names":["ANNOTATION_Z_INDEX","LINEAR_AXIS_INNER_OFFSET_TOP","DUAL_AXIS_CHART_COLUMN_Z_INDEX","DUAL_AXIS_CHART_NON_COLUMN_Z_INDEX","DUAL_AXIS_LABEL_Z_INDEX","DEFAULT_PARENT_ID"],"mappings":"AACO,MAAMA,qBAAqB;AAE3B,MAAMC,+BAA+B;AAErC,MAAMC,iCAAiC;AAEvC,MAAMC,qCAAqC;AAE3C,MAAMC,0BAA0B;AAEhC,MAAMC,oBAAoB"}
1
+ {"version":3,"file":"pipeline/utils/constant.js","sources":["webpack://@visactor/vseed/./src/pipeline/utils/constant.ts"],"sourcesContent":["// 标注层 z-index\nexport const ANNOTATION_Z_INDEX = 1000\n// 线性轴 顶部空隙 预留5px\nexport const LINEAR_AXIS_INNER_OFFSET_TOP = 7\n// 双轴图 柱图 ZIndex\nexport const DUAL_AXIS_CHART_COLUMN_Z_INDEX = 1000\n// 双轴图 非柱图 ZIndex\nexport const DUAL_AXIS_CHART_NON_COLUMN_Z_INDEX = 1001\n// 双轴图 标注层 ZIndex\nexport const DUAL_AXIS_LABEL_Z_INDEX = 1002\n// 默认父级id\nexport const DEFAULT_PARENT_ID = '__DefaultParentId__'\n\n// 图表类型枚举\nexport const ChartTypeEnum = {\n Table: 'table',\n PivotTable: 'pivotTable',\n // cartesian\n Line: 'line',\n Column: 'column',\n ColumnPercent: 'columnPercent',\n ColumnParallel: 'columnParallel',\n Bar: 'bar',\n BarPercent: 'barPercent',\n BarParallel: 'barParallel',\n Area: 'area',\n AreaPercent: 'areaPercent',\n DualAxis: 'dualAxis',\n Scatter: 'scatter',\n // polar\n Rose: 'rose',\n RoseParallel: 'roseParallel',\n Pie: 'pie',\n Donut: 'donut',\n Radar: 'radar',\n // other\n Funnel: 'funnel',\n Heatmap: 'heatmap',\n} as const\n"],"names":["ANNOTATION_Z_INDEX","LINEAR_AXIS_INNER_OFFSET_TOP","DUAL_AXIS_CHART_COLUMN_Z_INDEX","DUAL_AXIS_CHART_NON_COLUMN_Z_INDEX","DUAL_AXIS_LABEL_Z_INDEX","DEFAULT_PARENT_ID","ChartTypeEnum"],"mappings":"AACO,MAAMA,qBAAqB;AAE3B,MAAMC,+BAA+B;AAErC,MAAMC,iCAAiC;AAEvC,MAAMC,qCAAqC;AAE3C,MAAMC,0BAA0B;AAEhC,MAAMC,oBAAoB;AAG1B,MAAMC,gBAAgB;IAC3B,OAAO;IACP,YAAY;IAEZ,MAAM;IACN,QAAQ;IACR,eAAe;IACf,gBAAgB;IAChB,KAAK;IACL,YAAY;IACZ,aAAa;IACb,MAAM;IACN,aAAa;IACb,UAAU;IACV,SAAS;IAET,MAAM;IACN,cAAc;IACd,KAAK;IACL,OAAO;IACP,OAAO;IAEP,QAAQ;IACR,SAAS;AACX"}
@@ -50,7 +50,8 @@ const autoNumFormatter = (value, locale = intl.getLocale())=>{
50
50
  if (Number.isNaN(num)) return String(value);
51
51
  const numFormatterOptions = {
52
52
  style: 'decimal',
53
- notation: 'compact'
53
+ notation: 'compact',
54
+ useGrouping: true
54
55
  };
55
56
  numFormatterOptions.minimumFractionDigits = 0;
56
57
  numFormatterOptions.maximumFractionDigits = 2;
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/utils/format/createNumFormatter.js","sources":["webpack://@visactor/vseed/./src/pipeline/utils/format/createNumFormatter.ts"],"sourcesContent":["import { isNumber } from 'remeda'\nimport { intl } from '../../../i18n'\nimport type { Formatter, Locale, NumFormat } from 'src/types'\n\nexport const createNumFormatter = (format?: Partial<NumFormat>, locale: Locale = intl.getLocale()): Formatter => {\n const {\n type = 'number',\n ratio = 1,\n symbol = '',\n thousandSeparator = true,\n prefix = '',\n suffix = '',\n\n fractionDigits = 2,\n significantDigits,\n roundingMode = 'halfExpand',\n roundingPriority = 'auto',\n } = format || {}\n\n const numFormatterOptions: Intl.NumberFormatOptions = {\n style: 'decimal',\n notation: type === 'scientific' ? 'scientific' : 'standard',\n // @ts-expect-error roundingMode is not in NumberFormatOptions\n roundingMode,\n roundingPriority,\n }\n\n if (isNumber(fractionDigits)) {\n if (fractionDigits >= 0) {\n numFormatterOptions.minimumFractionDigits = fractionDigits\n numFormatterOptions.maximumFractionDigits = fractionDigits\n }\n }\n if (isNumber(significantDigits) && significantDigits > 0) {\n if (significantDigits > 0) {\n numFormatterOptions.minimumSignificantDigits = significantDigits\n numFormatterOptions.maximumSignificantDigits = significantDigits\n }\n }\n\n const numFormatter = new Intl.NumberFormat(locale, { ...numFormatterOptions, useGrouping: thousandSeparator })\n\n return (value?: number | string) => {\n let num = Number(value)\n let typeSymbol = ''\n if (Number.isNaN(num)) {\n return String(value)\n }\n\n // apply ratio for percent/permille\n if (type === 'percent') {\n num *= 100\n typeSymbol = '%'\n } else if (type === 'permille') {\n num *= 1000\n typeSymbol = '‰'\n } else if (type === 'number') {\n num = num / (ratio || 1)\n }\n\n // format value\n let numStr = numFormatter.format(num)\n\n // add thousand separator\n if (thousandSeparator) {\n const parts = numStr.split('.')\n parts[0] = parts[0].replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',')\n numStr = parts.join('.')\n }\n\n // add symbol, typeSymbol, prefix and suffix\n return `${prefix}${numStr}${typeSymbol}${symbol}${suffix}`\n }\n}\n\nexport const autoNumFormatter = (value?: number | string, locale: Locale = intl.getLocale()): string => {\n if (value === undefined || value === null) return String(value)\n const num = Number(value)\n if (Number.isNaN(num)) return String(value)\n\n const numFormatterOptions: Intl.NumberFormatOptions = {\n style: 'decimal',\n notation: 'compact',\n }\n numFormatterOptions.minimumFractionDigits = 0\n numFormatterOptions.maximumFractionDigits = 2\n\n const numFormatter = new Intl.NumberFormat(locale, { ...numFormatterOptions })\n\n return numFormatter.format(Number(value))\n}\n"],"names":["createNumFormatter","format","locale","intl","type","ratio","symbol","thousandSeparator","prefix","suffix","fractionDigits","significantDigits","roundingMode","roundingPriority","numFormatterOptions","isNumber","numFormatter","Intl","value","num","Number","typeSymbol","String","numStr","parts","autoNumFormatter"],"mappings":";;AAIO,MAAMA,qBAAqB,CAACC,QAA6BC,SAAiBC,KAAK,SAAS,EAAE;IAC/F,MAAM,EACJC,OAAO,QAAQ,EACfC,QAAQ,CAAC,EACTC,SAAS,EAAE,EACXC,oBAAoB,IAAI,EACxBC,SAAS,EAAE,EACXC,SAAS,EAAE,EAEXC,iBAAiB,CAAC,EAClBC,iBAAiB,EACjBC,eAAe,YAAY,EAC3BC,mBAAmB,MAAM,EAC1B,GAAGZ,UAAU,CAAC;IAEf,MAAMa,sBAAgD;QACpD,OAAO;QACP,UAAUV,AAAS,iBAATA,OAAwB,eAAe;QAEjDQ;QACAC;IACF;IAEA,IAAIE,SAASL,iBACX;QAAA,IAAIA,kBAAkB,GAAG;YACvBI,oBAAoB,qBAAqB,GAAGJ;YAC5CI,oBAAoB,qBAAqB,GAAGJ;QAC9C;IAAA;IAEF,IAAIK,SAASJ,sBAAsBA,oBAAoB,GACrD;QAAA,IAAIA,oBAAoB,GAAG;YACzBG,oBAAoB,wBAAwB,GAAGH;YAC/CG,oBAAoB,wBAAwB,GAAGH;QACjD;IAAA;IAGF,MAAMK,eAAe,IAAIC,KAAK,YAAY,CAACf,QAAQ;QAAE,GAAGY,mBAAmB;QAAE,aAAaP;IAAkB;IAE5G,OAAO,CAACW;QACN,IAAIC,MAAMC,OAAOF;QACjB,IAAIG,aAAa;QACjB,IAAID,OAAO,KAAK,CAACD,MACf,OAAOG,OAAOJ;QAIhB,IAAId,AAAS,cAATA,MAAoB;YACtBe,OAAO;YACPE,aAAa;QACf,OAAO,IAAIjB,AAAS,eAATA,MAAqB;YAC9Be,OAAO;YACPE,aAAa;QACf,OAAO,IAAIjB,AAAS,aAATA,MACTe,OAAad,SAAS;QAIxB,IAAIkB,SAASP,aAAa,MAAM,CAACG;QAGjC,IAAIZ,mBAAmB;YACrB,MAAMiB,QAAQD,OAAO,KAAK,CAAC;YAC3BC,KAAK,CAAC,EAAE,GAAGA,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,yBAAyB;YACrDD,SAASC,MAAM,IAAI,CAAC;QACtB;QAGA,OAAO,GAAGhB,SAASe,SAASF,aAAaf,SAASG,QAAQ;IAC5D;AACF;AAEO,MAAMgB,mBAAmB,CAACP,OAAyBhB,SAAiBC,KAAK,SAAS,EAAE;IACzF,IAAIe,QAAAA,OAAuC,OAAOI,OAAOJ;IACzD,MAAMC,MAAMC,OAAOF;IACnB,IAAIE,OAAO,KAAK,CAACD,MAAM,OAAOG,OAAOJ;IAErC,MAAMJ,sBAAgD;QACpD,OAAO;QACP,UAAU;IACZ;IACAA,oBAAoB,qBAAqB,GAAG;IAC5CA,oBAAoB,qBAAqB,GAAG;IAE5C,MAAME,eAAe,IAAIC,KAAK,YAAY,CAACf,QAAQ;QAAE,GAAGY,mBAAmB;IAAC;IAE5E,OAAOE,aAAa,MAAM,CAACI,OAAOF;AACpC"}
1
+ {"version":3,"file":"pipeline/utils/format/createNumFormatter.js","sources":["webpack://@visactor/vseed/./src/pipeline/utils/format/createNumFormatter.ts"],"sourcesContent":["import { isNumber } from 'remeda'\nimport { intl } from '../../../i18n'\nimport type { Formatter, Locale, NumFormat } from 'src/types'\n\nexport const createNumFormatter = (format?: Partial<NumFormat>, locale: Locale = intl.getLocale()): Formatter => {\n const {\n type = 'number',\n ratio = 1,\n symbol = '',\n thousandSeparator = true,\n prefix = '',\n suffix = '',\n\n fractionDigits = 2,\n significantDigits,\n roundingMode = 'halfExpand',\n roundingPriority = 'auto',\n } = format || {}\n\n const numFormatterOptions: Intl.NumberFormatOptions = {\n style: 'decimal',\n notation: type === 'scientific' ? 'scientific' : 'standard',\n // @ts-expect-error roundingMode is not in NumberFormatOptions\n roundingMode,\n roundingPriority,\n }\n\n if (isNumber(fractionDigits)) {\n if (fractionDigits >= 0) {\n numFormatterOptions.minimumFractionDigits = fractionDigits\n numFormatterOptions.maximumFractionDigits = fractionDigits\n }\n }\n if (isNumber(significantDigits) && significantDigits > 0) {\n if (significantDigits > 0) {\n numFormatterOptions.minimumSignificantDigits = significantDigits\n numFormatterOptions.maximumSignificantDigits = significantDigits\n }\n }\n\n const numFormatter = new Intl.NumberFormat(locale, { ...numFormatterOptions, useGrouping: thousandSeparator })\n\n return (value?: number | string) => {\n let num = Number(value)\n let typeSymbol = ''\n if (Number.isNaN(num)) {\n return String(value)\n }\n\n // apply ratio for percent/permille\n if (type === 'percent') {\n num *= 100\n typeSymbol = '%'\n } else if (type === 'permille') {\n num *= 1000\n typeSymbol = '‰'\n } else if (type === 'number') {\n num = num / (ratio || 1)\n }\n\n // format value\n let numStr = numFormatter.format(num)\n\n // add thousand separator\n if (thousandSeparator) {\n const parts = numStr.split('.')\n parts[0] = parts[0].replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',')\n numStr = parts.join('.')\n }\n\n // add symbol, typeSymbol, prefix and suffix\n return `${prefix}${numStr}${typeSymbol}${symbol}${suffix}`\n }\n}\n\nexport const autoNumFormatter = (value?: number | string, locale: Locale = intl.getLocale()): string => {\n if (value === undefined || value === null) return String(value)\n const num = Number(value)\n if (Number.isNaN(num)) return String(value)\n\n const numFormatterOptions: Intl.NumberFormatOptions = {\n style: 'decimal',\n notation: 'compact',\n useGrouping: true,\n }\n numFormatterOptions.minimumFractionDigits = 0\n numFormatterOptions.maximumFractionDigits = 2\n\n const numFormatter = new Intl.NumberFormat(locale, { ...numFormatterOptions })\n\n return numFormatter.format(Number(value))\n}\n"],"names":["createNumFormatter","format","locale","intl","type","ratio","symbol","thousandSeparator","prefix","suffix","fractionDigits","significantDigits","roundingMode","roundingPriority","numFormatterOptions","isNumber","numFormatter","Intl","value","num","Number","typeSymbol","String","numStr","parts","autoNumFormatter"],"mappings":";;AAIO,MAAMA,qBAAqB,CAACC,QAA6BC,SAAiBC,KAAK,SAAS,EAAE;IAC/F,MAAM,EACJC,OAAO,QAAQ,EACfC,QAAQ,CAAC,EACTC,SAAS,EAAE,EACXC,oBAAoB,IAAI,EACxBC,SAAS,EAAE,EACXC,SAAS,EAAE,EAEXC,iBAAiB,CAAC,EAClBC,iBAAiB,EACjBC,eAAe,YAAY,EAC3BC,mBAAmB,MAAM,EAC1B,GAAGZ,UAAU,CAAC;IAEf,MAAMa,sBAAgD;QACpD,OAAO;QACP,UAAUV,AAAS,iBAATA,OAAwB,eAAe;QAEjDQ;QACAC;IACF;IAEA,IAAIE,SAASL,iBACX;QAAA,IAAIA,kBAAkB,GAAG;YACvBI,oBAAoB,qBAAqB,GAAGJ;YAC5CI,oBAAoB,qBAAqB,GAAGJ;QAC9C;IAAA;IAEF,IAAIK,SAASJ,sBAAsBA,oBAAoB,GACrD;QAAA,IAAIA,oBAAoB,GAAG;YACzBG,oBAAoB,wBAAwB,GAAGH;YAC/CG,oBAAoB,wBAAwB,GAAGH;QACjD;IAAA;IAGF,MAAMK,eAAe,IAAIC,KAAK,YAAY,CAACf,QAAQ;QAAE,GAAGY,mBAAmB;QAAE,aAAaP;IAAkB;IAE5G,OAAO,CAACW;QACN,IAAIC,MAAMC,OAAOF;QACjB,IAAIG,aAAa;QACjB,IAAID,OAAO,KAAK,CAACD,MACf,OAAOG,OAAOJ;QAIhB,IAAId,AAAS,cAATA,MAAoB;YACtBe,OAAO;YACPE,aAAa;QACf,OAAO,IAAIjB,AAAS,eAATA,MAAqB;YAC9Be,OAAO;YACPE,aAAa;QACf,OAAO,IAAIjB,AAAS,aAATA,MACTe,OAAad,SAAS;QAIxB,IAAIkB,SAASP,aAAa,MAAM,CAACG;QAGjC,IAAIZ,mBAAmB;YACrB,MAAMiB,QAAQD,OAAO,KAAK,CAAC;YAC3BC,KAAK,CAAC,EAAE,GAAGA,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,yBAAyB;YACrDD,SAASC,MAAM,IAAI,CAAC;QACtB;QAGA,OAAO,GAAGhB,SAASe,SAASF,aAAaf,SAASG,QAAQ;IAC5D;AACF;AAEO,MAAMgB,mBAAmB,CAACP,OAAyBhB,SAAiBC,KAAK,SAAS,EAAE;IACzF,IAAIe,QAAAA,OAAuC,OAAOI,OAAOJ;IACzD,MAAMC,MAAMC,OAAOF;IACnB,IAAIE,OAAO,KAAK,CAACD,MAAM,OAAOG,OAAOJ;IAErC,MAAMJ,sBAAgD;QACpD,OAAO;QACP,UAAU;QACV,aAAa;IACf;IACAA,oBAAoB,qBAAqB,GAAG;IAC5CA,oBAAoB,qBAAqB,GAAG;IAE5C,MAAME,eAAe,IAAIC,KAAK,YAAY,CAACf,QAAQ;QAAE,GAAGY,mBAAmB;IAAC;IAE5E,OAAOE,aAAa,MAAM,CAACI,OAAOF;AACpC"}
@@ -6,3 +6,4 @@ export * from './dimensions';
6
6
  export * from './tree';
7
7
  export * from './replaceNullToUndefined';
8
8
  export * from './valid';
9
+ export * from './constant';
@@ -6,3 +6,4 @@ export * from "./dimensions/index.js";
6
6
  export * from "./tree/index.js";
7
7
  export * from "./replaceNullToUndefined.js";
8
8
  export * from "./valid/index.js";
9
+ export * from "./constant.js";
@@ -269,7 +269,11 @@ const darkTheme = ()=>{
269
269
  visible: true
270
270
  }
271
271
  },
272
- crosshairLine
272
+ crosshairLine,
273
+ sizeRange: [
274
+ 8,
275
+ 24
276
+ ]
273
277
  },
274
278
  dualAxis: {
275
279
  ...baseConfig,
@@ -1 +1 @@
1
- {"version":3,"file":"theme/dark.js","sources":["webpack://@visactor/vseed/./src/theme/dark.ts"],"sourcesContent":["import type {\n BackgroundColor,\n Color,\n CustomThemeConfig,\n Label,\n Legend,\n TableConfig,\n Tooltip,\n YBandAxis,\n YLinearAxis,\n} from 'src/types'\n\nexport const darkTheme = (): CustomThemeConfig => {\n const linearAxis: YLinearAxis = {\n nice: true,\n zero: true,\n label: {\n visible: true,\n labelAngle: 0,\n labelColor: '#E2E3E6',\n labelFontSize: 12,\n labelFontWeight: 400,\n },\n title: {\n visible: false,\n titleText: '',\n titleColor: '#FDFDFD',\n titleFontSize: 12,\n titleFontWeight: 400,\n },\n grid: {\n visible: true,\n gridColor: '#404349',\n gridWidth: 0.5,\n },\n tick: {\n visible: false,\n tickInside: false,\n tickSize: 4,\n tickColor: '#4B4F54',\n },\n line: {\n visible: false,\n lineColor: '#4B4F54',\n lineWidth: 1,\n },\n }\n const bandAxis: YBandAxis = {\n labelAutoHide: true,\n labelAutoHideGap: 4,\n labelAutoLimit: true,\n labelAutoLimitLength: 80,\n labelAutoRotate: false,\n labelAutoRotateAngleRange: [0, -45, -90],\n label: {\n visible: true,\n labelAngle: 0,\n labelColor: '#E2E3E6',\n labelFontSize: 12,\n labelFontWeight: 400,\n },\n title: {\n visible: false,\n titleText: '',\n titleColor: '#FDFDFD',\n titleFontSize: 12,\n titleFontWeight: 400,\n },\n grid: {\n visible: false,\n gridColor: '#404349',\n gridWidth: 0.5,\n },\n tick: {\n visible: false,\n tickInside: false,\n tickSize: 4,\n tickColor: '#4B4F54',\n },\n line: {\n visible: true,\n lineColor: '#4B4F54',\n lineWidth: 1,\n },\n }\n const barBandAxis: YBandAxis = {\n ...bandAxis,\n labelAutoHide: false,\n labelAutoHideGap: 1,\n labelAutoLimit: false,\n labelAutoLimitLength: undefined,\n labelAutoRotate: false,\n labelAutoRotateAngleRange: [0, -45, -90],\n }\n const crosshairLine = {\n visible: true,\n labelVisible: true,\n lineColor: '#E2E3E6',\n labelColor: '#4B4F54',\n labelBackgroundColor: '#ffffff',\n }\n const crosshairRect = {\n visible: true,\n labelVisible: true,\n lineColor: '#E2E3E6',\n labelColor: '#4B4F54',\n labelBackgroundColor: '#ffffff',\n }\n\n const baseConfig: {\n backgroundColor?: BackgroundColor\n color?: Color\n label?: Label\n tooltip?: Tooltip\n legend?: Legend\n } = {\n backgroundColor: 'transparent',\n color: {\n linearColorScheme: ['#A0CEFF', '#2E62F1'],\n colorScheme: [\n '#2E62F1',\n '#4DC36A',\n '#FF8406',\n '#FFCC00',\n '#4F44CF',\n '#5AC8FA',\n '#003A8C',\n '#B08AE2',\n '#FF6341',\n '#98DD62',\n ],\n },\n label: {\n enable: true,\n wrap: true,\n showValue: true,\n showValuePercent: false,\n labelColorSmartInvert: false,\n labelOverlap: true,\n },\n tooltip: {\n enable: true,\n },\n legend: {\n enable: true,\n border: true,\n maxSize: 1,\n position: 'rt',\n shapeType: 'rectRound',\n labelColor: '#FDFDFD',\n labelFontSize: 12,\n labelFontWeight: 400,\n },\n }\n\n const tableConfig: TableConfig = {\n borderColor: '#4b4e53',\n\n bodyFontSize: 12,\n bodyFontColor: '#fdfdfd',\n bodyBackgroundColor: 'transparent',\n\n headerFontSize: 12,\n headerFontColor: '#fdfdfd',\n headerBackgroundColor: '#36393e',\n\n hoverBodyBackgroundColor: '#4284ff66',\n hoverBodyInlineBackgroundColor: '#4284ff10',\n hoverHeaderBackgroundColor: '#6f7984cc',\n hoverHeaderInlineBackgroundColor: '#4b4f54',\n\n selectedBorderColor: '#3073f2',\n selectedBackgroundColor: '#4284ff33',\n }\n\n return {\n config: {\n table: tableConfig,\n pivotTable: tableConfig,\n\n // cartesian\n line: {\n ...baseConfig,\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairLine: crosshairLine,\n },\n column: {\n ...baseConfig,\n\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairRect: crosshairRect,\n stackCornerRadius: [4, 4, 0, 0],\n },\n columnParallel: {\n ...baseConfig,\n\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairRect: crosshairRect,\n stackCornerRadius: [4, 4, 0, 0],\n },\n columnPercent: {\n ...baseConfig,\n\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairRect: crosshairRect,\n stackCornerRadius: [4, 4, 0, 0],\n },\n bar: {\n ...baseConfig,\n\n xAxis: linearAxis,\n yAxis: barBandAxis,\n crosshairRect: crosshairRect,\n stackCornerRadius: [0, 4, 4, 0],\n },\n barParallel: {\n ...baseConfig,\n\n xAxis: linearAxis,\n yAxis: barBandAxis,\n crosshairRect: crosshairRect,\n stackCornerRadius: [0, 4, 4, 0],\n },\n barPercent: {\n ...baseConfig,\n\n xAxis: linearAxis,\n yAxis: barBandAxis,\n crosshairRect: crosshairRect,\n stackCornerRadius: [0, 4, 4, 0],\n },\n area: {\n ...baseConfig,\n\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairLine: crosshairLine,\n },\n areaPercent: {\n ...baseConfig,\n\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairLine: crosshairLine,\n },\n scatter: {\n ...baseConfig,\n\n xAxis: {\n ...linearAxis,\n line: {\n ...linearAxis.line,\n visible: true,\n },\n },\n yAxis: {\n ...linearAxis,\n line: {\n ...linearAxis.line,\n visible: true,\n },\n },\n crosshairLine,\n },\n dualAxis: {\n ...baseConfig,\n xAxis: bandAxis,\n primaryYAxis: linearAxis,\n secondaryYAxis: { ...linearAxis, grid: { visible: false } },\n dualChartType: {\n primary: 'column',\n secondary: 'line',\n },\n crosshairRect,\n },\n // polar\n pie: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n labelLayout: 'labelLine',\n },\n },\n donut: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n labelLayout: 'labelLine',\n },\n },\n radar: {\n ...baseConfig,\n },\n rose: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n },\n },\n roseParallel: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n },\n },\n // other\n funnel: {\n ...baseConfig,\n },\n heatmap: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n labelColorSmartInvert: true,\n },\n },\n },\n }\n}\n"],"names":["darkTheme","linearAxis","bandAxis","barBandAxis","undefined","crosshairLine","crosshairRect","baseConfig","tableConfig"],"mappings":"AAYO,MAAMA,YAAY;IACvB,MAAMC,aAA0B;QAC9B,MAAM;QACN,MAAM;QACN,OAAO;YACL,SAAS;YACT,YAAY;YACZ,YAAY;YACZ,eAAe;YACf,iBAAiB;QACnB;QACA,OAAO;YACL,SAAS;YACT,WAAW;YACX,YAAY;YACZ,eAAe;YACf,iBAAiB;QACnB;QACA,MAAM;YACJ,SAAS;YACT,WAAW;YACX,WAAW;QACb;QACA,MAAM;YACJ,SAAS;YACT,YAAY;YACZ,UAAU;YACV,WAAW;QACb;QACA,MAAM;YACJ,SAAS;YACT,WAAW;YACX,WAAW;QACb;IACF;IACA,MAAMC,WAAsB;QAC1B,eAAe;QACf,kBAAkB;QAClB,gBAAgB;QAChB,sBAAsB;QACtB,iBAAiB;QACjB,2BAA2B;YAAC;YAAG;YAAK;SAAI;QACxC,OAAO;YACL,SAAS;YACT,YAAY;YACZ,YAAY;YACZ,eAAe;YACf,iBAAiB;QACnB;QACA,OAAO;YACL,SAAS;YACT,WAAW;YACX,YAAY;YACZ,eAAe;YACf,iBAAiB;QACnB;QACA,MAAM;YACJ,SAAS;YACT,WAAW;YACX,WAAW;QACb;QACA,MAAM;YACJ,SAAS;YACT,YAAY;YACZ,UAAU;YACV,WAAW;QACb;QACA,MAAM;YACJ,SAAS;YACT,WAAW;YACX,WAAW;QACb;IACF;IACA,MAAMC,cAAyB;QAC7B,GAAGD,QAAQ;QACX,eAAe;QACf,kBAAkB;QAClB,gBAA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BACb,OAAO;oBACL,GAAGA,WAAW,KAAK;oBACnB,kBAAkB;oBAClB,aAAa;gBACf;YACF;YACA,OAAO;gBACL,GAAGA,UAAU;YACf;YACA,MAAM;gBACJ,GAAGA,UAAU;gBACb,OAAO;oBACL,GAAGA,WAAW,KAAK;oBACnB,kBAAkB;gBACpB;YACF;YACA,cAAc;gBACZ,GAAGA,UAAU;gBACb,OAAO;oBACL,GAAGA,WAAW,KAAK;oBACnB,kBAAkB;gBACpB;YACF;YAEA,QAAQ;gBACN,GAAGA,UAAU;YACf;YACA,SAAS;gBACP,GAAGA,UAAU;gBACb,OAAO;oBACL,GAAGA,WAAW,KAAK;oBACnB,uBAAuB;gBACzB;YACF;QACF;IACF;AACF"}
1
+ {"version":3,"file":"theme/dark.js","sources":["webpack://@visactor/vseed/./src/theme/dark.ts"],"sourcesContent":["import type {\n BackgroundColor,\n Color,\n CustomThemeConfig,\n Label,\n Legend,\n TableConfig,\n Tooltip,\n YBandAxis,\n YLinearAxis,\n} from 'src/types'\n\nexport const darkTheme = (): CustomThemeConfig => {\n const linearAxis: YLinearAxis = {\n nice: true,\n zero: true,\n label: {\n visible: true,\n labelAngle: 0,\n labelColor: '#E2E3E6',\n labelFontSize: 12,\n labelFontWeight: 400,\n },\n title: {\n visible: false,\n titleText: '',\n titleColor: '#FDFDFD',\n titleFontSize: 12,\n titleFontWeight: 400,\n },\n grid: {\n visible: true,\n gridColor: '#404349',\n gridWidth: 0.5,\n },\n tick: {\n visible: false,\n tickInside: false,\n tickSize: 4,\n tickColor: '#4B4F54',\n },\n line: {\n visible: false,\n lineColor: '#4B4F54',\n lineWidth: 1,\n },\n }\n const bandAxis: YBandAxis = {\n labelAutoHide: true,\n labelAutoHideGap: 4,\n labelAutoLimit: true,\n labelAutoLimitLength: 80,\n labelAutoRotate: false,\n labelAutoRotateAngleRange: [0, -45, -90],\n label: {\n visible: true,\n labelAngle: 0,\n labelColor: '#E2E3E6',\n labelFontSize: 12,\n labelFontWeight: 400,\n },\n title: {\n visible: false,\n titleText: '',\n titleColor: '#FDFDFD',\n titleFontSize: 12,\n titleFontWeight: 400,\n },\n grid: {\n visible: false,\n gridColor: '#404349',\n gridWidth: 0.5,\n },\n tick: {\n visible: false,\n tickInside: false,\n tickSize: 4,\n tickColor: '#4B4F54',\n },\n line: {\n visible: true,\n lineColor: '#4B4F54',\n lineWidth: 1,\n },\n }\n const barBandAxis: YBandAxis = {\n ...bandAxis,\n labelAutoHide: false,\n labelAutoHideGap: 1,\n labelAutoLimit: false,\n labelAutoLimitLength: undefined,\n labelAutoRotate: false,\n labelAutoRotateAngleRange: [0, -45, -90],\n }\n const crosshairLine = {\n visible: true,\n labelVisible: true,\n lineColor: '#E2E3E6',\n labelColor: '#4B4F54',\n labelBackgroundColor: '#ffffff',\n }\n const crosshairRect = {\n visible: true,\n labelVisible: true,\n lineColor: '#E2E3E6',\n labelColor: '#4B4F54',\n labelBackgroundColor: '#ffffff',\n }\n\n const baseConfig: {\n backgroundColor?: BackgroundColor\n color?: Color\n label?: Label\n tooltip?: Tooltip\n legend?: Legend\n } = {\n backgroundColor: 'transparent',\n color: {\n linearColorScheme: ['#A0CEFF', '#2E62F1'],\n colorScheme: [\n '#2E62F1',\n '#4DC36A',\n '#FF8406',\n '#FFCC00',\n '#4F44CF',\n '#5AC8FA',\n '#003A8C',\n '#B08AE2',\n '#FF6341',\n '#98DD62',\n ],\n },\n label: {\n enable: true,\n wrap: true,\n showValue: true,\n showValuePercent: false,\n labelColorSmartInvert: false,\n labelOverlap: true,\n },\n tooltip: {\n enable: true,\n },\n legend: {\n enable: true,\n border: true,\n maxSize: 1,\n position: 'rt',\n shapeType: 'rectRound',\n labelColor: '#FDFDFD',\n labelFontSize: 12,\n labelFontWeight: 400,\n },\n }\n\n const tableConfig: TableConfig = {\n borderColor: '#4b4e53',\n\n bodyFontSize: 12,\n bodyFontColor: '#fdfdfd',\n bodyBackgroundColor: 'transparent',\n\n headerFontSize: 12,\n headerFontColor: '#fdfdfd',\n headerBackgroundColor: '#36393e',\n\n hoverBodyBackgroundColor: '#4284ff66',\n hoverBodyInlineBackgroundColor: '#4284ff10',\n hoverHeaderBackgroundColor: '#6f7984cc',\n hoverHeaderInlineBackgroundColor: '#4b4f54',\n\n selectedBorderColor: '#3073f2',\n selectedBackgroundColor: '#4284ff33',\n }\n\n return {\n config: {\n table: tableConfig,\n pivotTable: tableConfig,\n\n // cartesian\n line: {\n ...baseConfig,\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairLine: crosshairLine,\n },\n column: {\n ...baseConfig,\n\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairRect: crosshairRect,\n stackCornerRadius: [4, 4, 0, 0],\n },\n columnParallel: {\n ...baseConfig,\n\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairRect: crosshairRect,\n stackCornerRadius: [4, 4, 0, 0],\n },\n columnPercent: {\n ...baseConfig,\n\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairRect: crosshairRect,\n stackCornerRadius: [4, 4, 0, 0],\n },\n bar: {\n ...baseConfig,\n\n xAxis: linearAxis,\n yAxis: barBandAxis,\n crosshairRect: crosshairRect,\n stackCornerRadius: [0, 4, 4, 0],\n },\n barParallel: {\n ...baseConfig,\n\n xAxis: linearAxis,\n yAxis: barBandAxis,\n crosshairRect: crosshairRect,\n stackCornerRadius: [0, 4, 4, 0],\n },\n barPercent: {\n ...baseConfig,\n\n xAxis: linearAxis,\n yAxis: barBandAxis,\n crosshairRect: crosshairRect,\n stackCornerRadius: [0, 4, 4, 0],\n },\n area: {\n ...baseConfig,\n\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairLine: crosshairLine,\n },\n areaPercent: {\n ...baseConfig,\n\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairLine: crosshairLine,\n },\n scatter: {\n ...baseConfig,\n\n xAxis: {\n ...linearAxis,\n line: {\n ...linearAxis.line,\n visible: true,\n },\n },\n yAxis: {\n ...linearAxis,\n line: {\n ...linearAxis.line,\n visible: true,\n },\n },\n crosshairLine,\n sizeRange: [8, 24],\n },\n dualAxis: {\n ...baseConfig,\n xAxis: bandAxis,\n primaryYAxis: linearAxis,\n secondaryYAxis: { ...linearAxis, grid: { visible: false } },\n dualChartType: {\n primary: 'column',\n secondary: 'line',\n },\n crosshairRect,\n },\n // polar\n pie: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n labelLayout: 'labelLine',\n },\n },\n donut: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n labelLayout: 'labelLine',\n },\n },\n radar: {\n ...baseConfig,\n },\n rose: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n },\n },\n roseParallel: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n },\n },\n // other\n funnel: {\n ...baseConfig,\n },\n heatmap: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n labelColorSmartInvert: true,\n },\n },\n },\n }\n}\n"],"names":["darkTheme","linearAxis","bandAxis","barBandAxis","undefined","crosshairLine","crosshairRect","baseConfig","tableConfig"],"mappings":"AAYO,MAAMA,YAAY;IACvB,MAAMC,aAA0B;QAC9B,MAAM;QACN,MAAM;QACN,OAAO;YACL,SAAS;YACT,YAAY;YACZ,YAAY;YACZ,eAAe;YACf,iBAAiB;QACnB;QACA,OAAO;YACL,SAAS;YACT,WAAW;YACX,YAAY;YACZ,eAAe;YACf,iBAAiB;QACnB;QACA,MAAM;YACJ,SAAS;YACT,WAAW;YACX,WAAW;QACb;QACA,MAAM;YACJ,SAAS;YACT,YAAY;YACZ,UAAU;YACV,WAAW;QACb;QACA,MAAM;YACJ,SAAS;YACT,WAAW;YACX,WAAW;QACb;IACF;IACA,MAAMC,WAAsB;QAC1B,eAAe;QACf,kBAAkB;QAClB,gBAAgB;QAChB,sBAAsB;QACtB,iBAAiB;QACjB,2BAA2B;YAAC;YAAG;YAAK;SAAI;QACxC,OAAO;YACL,SAAS;YAC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;wBAClB,SAAS;oBACX;gBACF;gBACAI;gBACA,WAAW;oBAAC;oBAAG;iBAAG;YACpB;YACA,UAAU;gBACR,GAAGE,UAAU;gBACb,OAAOL;gBACP,cAAcD;gBACd,gBAAgB;oBAAE,GAAGA,UAAU;oBAAE,MAAM;wBAAE,SAAS;oBAAM;gBAAE;gBAC1D,eAAe;oBACb,SAAS;oBACT,WAAW;gBACb;gBACAK;YACF;YAEA,KAAK;gBACH,GAAGC,UAAU;gBACb,OAAO;oBACL,GAAGA,WAAW,KAAK;oBACnB,kBAAkB;oBAClB,aAAa;gBACf;YACF;YACA,OAAO;gBACL,GAAGA,UAAU;gBACb,OAAO;oBACL,GAAGA,WAAW,KAAK;oBACnB,kBAAkB;oBAClB,aAAa;gBACf;YACF;YACA,OAAO;gBACL,GAAGA,UAAU;YACf;YACA,MAAM;gBACJ,GAAGA,UAAU;gBACb,OAAO;oBACL,GAAGA,WAAW,KAAK;oBACnB,kBAAkB;gBACpB;YACF;YACA,cAAc;gBACZ,GAAGA,UAAU;gBACb,OAAO;oBACL,GAAGA,WAAW,KAAK;oBACnB,kBAAkB;gBACpB;YACF;YAEA,QAAQ;gBACN,GAAGA,UAAU;YACf;YACA,SAAS;gBACP,GAAGA,UAAU;gBACb,OAAO;oBACL,GAAGA,WAAW,KAAK;oBACnB,uBAAuB;gBACzB;YACF;QACF;IACF;AACF"}
@@ -199,10 +199,7 @@ const lightTheme = ()=>{
199
199
  ...baseConfig,
200
200
  xAxis: bandAxis,
201
201
  yAxis: {
202
- ...linearAxis,
203
- numFormat: {
204
- type: 'percent'
205
- }
202
+ ...linearAxis
206
203
  },
207
204
  crosshairRect,
208
205
  stackCornerRadius: [
@@ -239,10 +236,7 @@ const lightTheme = ()=>{
239
236
  barPercent: {
240
237
  ...baseConfig,
241
238
  xAxis: {
242
- ...linearAxis,
243
- numFormat: {
244
- type: 'percent'
245
- }
239
+ ...linearAxis
246
240
  },
247
241
  yAxis: barBandAxis,
248
242
  crosshairRect,
@@ -263,10 +257,7 @@ const lightTheme = ()=>{
263
257
  ...baseConfig,
264
258
  xAxis: bandAxis,
265
259
  yAxis: {
266
- ...linearAxis,
267
- numFormat: {
268
- type: 'percent'
269
- }
260
+ ...linearAxis
270
261
  },
271
262
  crosshairLine
272
263
  },
@@ -286,7 +277,11 @@ const lightTheme = ()=>{
286
277
  visible: true
287
278
  }
288
279
  },
289
- crosshairLine
280
+ crosshairLine,
281
+ sizeRange: [
282
+ 8,
283
+ 24
284
+ ]
290
285
  },
291
286
  dualAxis: {
292
287
  ...baseConfig,
@@ -1 +1 @@
1
- {"version":3,"file":"theme/light.js","sources":["webpack://@visactor/vseed/./src/theme/light.ts"],"sourcesContent":["import type {\n BackgroundColor,\n Color,\n CustomThemeConfig,\n Label,\n Legend,\n TableConfig,\n Tooltip,\n YBandAxis,\n YLinearAxis,\n} from 'src/types'\n\nexport const lightTheme = (): CustomThemeConfig => {\n const linearAxis: YLinearAxis = {\n nice: true,\n zero: true,\n inverse: false,\n label: {\n visible: true,\n labelAngle: 0,\n labelColor: '#797B85',\n labelFontSize: 12,\n labelFontWeight: 400,\n },\n title: {\n visible: false,\n titleText: '',\n titleColor: '#646A73',\n titleFontSize: 12,\n titleFontWeight: 400,\n },\n grid: {\n visible: true,\n gridColor: '#36415926',\n gridWidth: 0.5,\n },\n tick: {\n visible: false,\n tickInside: false,\n tickSize: 4,\n tickColor: '#3641594d',\n },\n line: {\n visible: false,\n lineColor: '#3641594d',\n lineWidth: 1,\n },\n }\n const bandAxis: YBandAxis = {\n labelAutoHide: true,\n labelAutoHideGap: 4,\n labelAutoLimit: true,\n labelAutoLimitLength: 80,\n labelAutoRotate: false,\n labelAutoRotateAngleRange: [0, -45, -90],\n label: {\n visible: true,\n labelAngle: 0,\n labelColor: '#797B85',\n labelFontSize: 12,\n labelFontWeight: 400,\n },\n title: {\n visible: false,\n titleText: '',\n titleColor: '#646A73',\n titleFontSize: 12,\n titleFontWeight: 400,\n },\n grid: {\n visible: false,\n gridColor: '#36415926',\n gridWidth: 0.5,\n },\n tick: {\n visible: false,\n tickInside: false,\n tickSize: 4,\n tickColor: '#3641594d',\n },\n line: {\n visible: true,\n lineColor: '#3641594d',\n lineWidth: 1,\n },\n }\n const barBandAxis: YBandAxis = {\n ...bandAxis,\n labelAutoHide: false,\n labelAutoHideGap: 1,\n labelAutoLimit: false,\n labelAutoLimitLength: undefined,\n labelAutoRotate: false,\n labelAutoRotateAngleRange: [0, -45, -90],\n }\n\n const crosshairLine = {\n visible: true,\n labelVisible: true,\n lineColor: '#3641594d',\n labelColor: '#ffffff',\n labelBackgroundColor: '#364159',\n }\n const crosshairRect = {\n visible: true,\n labelVisible: true,\n rectColor: '#3641594d',\n labelColor: '#ffffff',\n labelBackgroundColor: '#364159',\n }\n\n const baseConfig: {\n backgroundColor?: BackgroundColor\n color?: Color\n label?: Label\n tooltip?: Tooltip\n legend?: Legend\n } = {\n backgroundColor: 'transparent',\n color: {\n linearColorScheme: ['#C2CEFF', '#5766EC'],\n colorScheme: [\n '#8D72F6',\n '#5766EC',\n '#66A3FE',\n '#51D5E6',\n '#4EC0B3',\n '#F9DF90',\n '#F9AD71',\n '#ED8888',\n '#E9A0C3',\n '#D77DD3',\n ],\n },\n label: {\n enable: true,\n wrap: true,\n showValue: true,\n showValuePercent: false,\n labelColorSmartInvert: false,\n labelOverlap: true,\n },\n tooltip: {\n enable: true,\n },\n legend: {\n enable: true,\n border: true,\n maxSize: 1,\n shapeType: 'rectRound',\n position: 'rt',\n labelColor: '#646A73',\n labelFontSize: 12,\n labelFontWeight: 400,\n },\n }\n const tableConfig: TableConfig = {\n borderColor: '#e3e5eb',\n\n bodyFontSize: 12,\n bodyFontColor: '#141414',\n bodyBackgroundColor: 'transparent',\n\n headerFontSize: 12,\n headerFontColor: '#21252c',\n headerBackgroundColor: '#f6f7f9',\n\n hoverBodyBackgroundColor: '#bedaff',\n hoverBodyInlineBackgroundColor: '#bedaff33',\n hoverHeaderBackgroundColor: '#D9DDE4',\n hoverHeaderInlineBackgroundColor: '#D9DDE455',\n\n selectedBorderColor: '#4080ff',\n selectedBackgroundColor: '#bedaff33',\n\n backgroundColor: 'transparent',\n }\n\n return {\n config: {\n // table\n table: tableConfig,\n pivotTable: tableConfig,\n // cartesian\n line: {\n ...baseConfig,\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairLine,\n },\n column: {\n ...baseConfig,\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairRect,\n stackCornerRadius: [4, 4, 0, 0],\n },\n columnParallel: {\n ...baseConfig,\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairRect,\n stackCornerRadius: [4, 4, 0, 0],\n },\n columnPercent: {\n ...baseConfig,\n xAxis: bandAxis,\n yAxis: {\n ...linearAxis,\n numFormat: {\n type: 'percent',\n },\n },\n crosshairRect,\n stackCornerRadius: [4, 4, 0, 0],\n },\n bar: {\n ...baseConfig,\n xAxis: linearAxis,\n yAxis: barBandAxis,\n crosshairRect,\n stackCornerRadius: [0, 4, 4, 0],\n },\n barParallel: {\n ...baseConfig,\n xAxis: linearAxis,\n yAxis: barBandAxis,\n crosshairRect,\n stackCornerRadius: [0, 4, 4, 0],\n },\n barPercent: {\n ...baseConfig,\n xAxis: {\n ...linearAxis,\n numFormat: {\n type: 'percent',\n },\n },\n yAxis: barBandAxis,\n crosshairRect,\n stackCornerRadius: [0, 4, 4, 0],\n },\n area: {\n ...baseConfig,\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairLine,\n },\n areaPercent: {\n ...baseConfig,\n xAxis: bandAxis,\n yAxis: {\n ...linearAxis,\n numFormat: {\n type: 'percent',\n },\n },\n crosshairLine,\n },\n scatter: {\n ...baseConfig,\n xAxis: {\n ...linearAxis,\n line: {\n ...linearAxis.line,\n visible: true,\n },\n },\n yAxis: {\n ...linearAxis,\n line: {\n ...linearAxis.line,\n visible: true,\n },\n },\n crosshairLine,\n },\n dualAxis: {\n ...baseConfig,\n xAxis: bandAxis,\n primaryYAxis: linearAxis,\n secondaryYAxis: { ...linearAxis, grid: { visible: false } },\n dualChartType: {\n primary: 'column',\n secondary: 'line',\n },\n crosshairRect,\n },\n // polar\n pie: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n labelLayout: 'labelLine',\n },\n },\n donut: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n labelLayout: 'labelLine',\n },\n },\n radar: {\n ...baseConfig,\n },\n rose: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n },\n },\n roseParallel: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n },\n },\n // other\n funnel: {\n ...baseConfig,\n },\n heatmap: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n labelColorSmartInvert: true,\n },\n },\n },\n }\n}\n"],"names":["lightTheme","linearAxis","bandAxis","barBandAxis","undefined","crosshairLine","crosshairRect","baseConfig","tableConfig"],"mappings":"AAYO,MAAMA,aAAa;IACxB,MAAMC,aAA0B;QAC9B,MAAM;QACN,MAAM;QACN,SAAS;QACT,OAAO;YACL,SAAS;YACT,YAAY;YACZ,YAAY;YACZ,eAAe;YACf,iBAAiB;QACnB;QACA,OAAO;YACL,SAAS;YACT,WAAW;YACX,YAAY;YACZ,eAAe;YACf,iBAAiB;QACnB;QACA,MAAM;YACJ,SAAS;YACT,WAAW;YACX,WAAW;QACb;QACA,MAAM;YACJ,SAAS;YACT,YAAY;YACZ,UAAU;YACV,WAAW;QACb;QACA,MAAM;YACJ,SAAS;YACT,WAAW;YACX,WAAW;QACb;IACF;IACA,MAAMC,WAAsB;QAC1B,eAAe;QACf,kBAAkB;QAClB,gBAAgB;QAChB,sBAAsB;QACtB,iBAAiB;QACjB,2BAA2B;YAAC;YAAG;YAAK;SAAI;QACxC,OAAO;YACL,SAAS;YACT,YAAY;YACZ,YAAY;YACZ,eAAe;YACf,iBAAiB;QACnB;QACA,OAAO;YACL,SAAS;YACT,WAAW;YACX,YAAY;Y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GA,WAAW,IAAI;wBAClB,SAAS;oBACX;gBACF;gBACAI;YACF;YACA,UAAU;gBACR,GAAGE,UAAU;gBACb,OAAOL;gBACP,cAAcD;gBACd,gBAAgB;oBAAE,GAAGA,UAAU;oBAAE,MAAM;wBAAE,SAAS;oBAAM;gBAAE;gBAC1D,eAAe;oBACb,SAAS;oBACT,WAAW;gBACb;gBACAK;YACF;YAEA,KAAK;gBACH,GAAGC,UAAU;gBACb,OAAO;oBACL,GAAGA,WAAW,KAAK;oBACnB,kBAAkB;oBAClB,aAAa;gBACf;YACF;YACA,OAAO;gBACL,GAAGA,UAAU;gBACb,OAAO;oBACL,GAAGA,WAAW,KAAK;oBACnB,kBAAkB;oBAClB,aAAa;gBACf;YACF;YACA,OAAO;gBACL,GAAGA,UAAU;YACf;YACA,MAAM;gBACJ,GAAGA,UAAU;gBACb,OAAO;oBACL,GAAGA,WAAW,KAAK;oBACnB,kBAAkB;gBACpB;YACF;YACA,cAAc;gBACZ,GAAGA,UAAU;gBACb,OAAO;oBACL,GAAGA,WAAW,KAAK;oBACnB,kBAAkB;gBACpB;YACF;YAEA,QAAQ;gBACN,GAAGA,UAAU;YACf;YACA,SAAS;gBACP,GAAGA,UAAU;gBACb,OAAO;oBACL,GAAGA,WAAW,KAAK;oBACnB,uBAAuB;gBACzB;YACF;QACF;IACF;AACF"}
1
+ {"version":3,"file":"theme/light.js","sources":["webpack://@visactor/vseed/./src/theme/light.ts"],"sourcesContent":["import type {\n BackgroundColor,\n Color,\n CustomThemeConfig,\n Label,\n Legend,\n TableConfig,\n Tooltip,\n YBandAxis,\n YLinearAxis,\n} from 'src/types'\n\nexport const lightTheme = (): CustomThemeConfig => {\n const linearAxis: YLinearAxis = {\n nice: true,\n zero: true,\n inverse: false,\n label: {\n visible: true,\n labelAngle: 0,\n labelColor: '#797B85',\n labelFontSize: 12,\n labelFontWeight: 400,\n },\n title: {\n visible: false,\n titleText: '',\n titleColor: '#646A73',\n titleFontSize: 12,\n titleFontWeight: 400,\n },\n grid: {\n visible: true,\n gridColor: '#36415926',\n gridWidth: 0.5,\n },\n tick: {\n visible: false,\n tickInside: false,\n tickSize: 4,\n tickColor: '#3641594d',\n },\n line: {\n visible: false,\n lineColor: '#3641594d',\n lineWidth: 1,\n },\n }\n const bandAxis: YBandAxis = {\n labelAutoHide: true,\n labelAutoHideGap: 4,\n labelAutoLimit: true,\n labelAutoLimitLength: 80,\n labelAutoRotate: false,\n labelAutoRotateAngleRange: [0, -45, -90],\n label: {\n visible: true,\n labelAngle: 0,\n labelColor: '#797B85',\n labelFontSize: 12,\n labelFontWeight: 400,\n },\n title: {\n visible: false,\n titleText: '',\n titleColor: '#646A73',\n titleFontSize: 12,\n titleFontWeight: 400,\n },\n grid: {\n visible: false,\n gridColor: '#36415926',\n gridWidth: 0.5,\n },\n tick: {\n visible: false,\n tickInside: false,\n tickSize: 4,\n tickColor: '#3641594d',\n },\n line: {\n visible: true,\n lineColor: '#3641594d',\n lineWidth: 1,\n },\n }\n const barBandAxis: YBandAxis = {\n ...bandAxis,\n labelAutoHide: false,\n labelAutoHideGap: 1,\n labelAutoLimit: false,\n labelAutoLimitLength: undefined,\n labelAutoRotate: false,\n labelAutoRotateAngleRange: [0, -45, -90],\n }\n\n const crosshairLine = {\n visible: true,\n labelVisible: true,\n lineColor: '#3641594d',\n labelColor: '#ffffff',\n labelBackgroundColor: '#364159',\n }\n const crosshairRect = {\n visible: true,\n labelVisible: true,\n rectColor: '#3641594d',\n labelColor: '#ffffff',\n labelBackgroundColor: '#364159',\n }\n\n const baseConfig: {\n backgroundColor?: BackgroundColor\n color?: Color\n label?: Label\n tooltip?: Tooltip\n legend?: Legend\n } = {\n backgroundColor: 'transparent',\n color: {\n linearColorScheme: ['#C2CEFF', '#5766EC'],\n colorScheme: [\n '#8D72F6',\n '#5766EC',\n '#66A3FE',\n '#51D5E6',\n '#4EC0B3',\n '#F9DF90',\n '#F9AD71',\n '#ED8888',\n '#E9A0C3',\n '#D77DD3',\n ],\n },\n label: {\n enable: true,\n wrap: true,\n showValue: true,\n showValuePercent: false,\n labelColorSmartInvert: false,\n labelOverlap: true,\n },\n tooltip: {\n enable: true,\n },\n legend: {\n enable: true,\n border: true,\n maxSize: 1,\n shapeType: 'rectRound',\n position: 'rt',\n labelColor: '#646A73',\n labelFontSize: 12,\n labelFontWeight: 400,\n },\n }\n const tableConfig: TableConfig = {\n borderColor: '#e3e5eb',\n\n bodyFontSize: 12,\n bodyFontColor: '#141414',\n bodyBackgroundColor: 'transparent',\n\n headerFontSize: 12,\n headerFontColor: '#21252c',\n headerBackgroundColor: '#f6f7f9',\n\n hoverBodyBackgroundColor: '#bedaff',\n hoverBodyInlineBackgroundColor: '#bedaff33',\n hoverHeaderBackgroundColor: '#D9DDE4',\n hoverHeaderInlineBackgroundColor: '#D9DDE455',\n\n selectedBorderColor: '#4080ff',\n selectedBackgroundColor: '#bedaff33',\n\n backgroundColor: 'transparent',\n }\n\n return {\n config: {\n // table\n table: tableConfig,\n pivotTable: tableConfig,\n // cartesian\n line: {\n ...baseConfig,\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairLine,\n },\n column: {\n ...baseConfig,\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairRect,\n stackCornerRadius: [4, 4, 0, 0],\n },\n columnParallel: {\n ...baseConfig,\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairRect,\n stackCornerRadius: [4, 4, 0, 0],\n },\n columnPercent: {\n ...baseConfig,\n xAxis: bandAxis,\n yAxis: {\n ...linearAxis,\n },\n crosshairRect,\n stackCornerRadius: [4, 4, 0, 0],\n },\n bar: {\n ...baseConfig,\n xAxis: linearAxis,\n yAxis: barBandAxis,\n crosshairRect,\n stackCornerRadius: [0, 4, 4, 0],\n },\n barParallel: {\n ...baseConfig,\n xAxis: linearAxis,\n yAxis: barBandAxis,\n crosshairRect,\n stackCornerRadius: [0, 4, 4, 0],\n },\n barPercent: {\n ...baseConfig,\n xAxis: {\n ...linearAxis,\n },\n yAxis: barBandAxis,\n crosshairRect,\n stackCornerRadius: [0, 4, 4, 0],\n },\n area: {\n ...baseConfig,\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairLine,\n },\n areaPercent: {\n ...baseConfig,\n xAxis: bandAxis,\n yAxis: {\n ...linearAxis,\n },\n crosshairLine,\n },\n scatter: {\n ...baseConfig,\n xAxis: {\n ...linearAxis,\n line: {\n ...linearAxis.line,\n visible: true,\n },\n },\n yAxis: {\n ...linearAxis,\n line: {\n ...linearAxis.line,\n visible: true,\n },\n },\n crosshairLine,\n sizeRange: [8, 24],\n },\n dualAxis: {\n ...baseConfig,\n xAxis: bandAxis,\n primaryYAxis: linearAxis,\n secondaryYAxis: { ...linearAxis, grid: { visible: false } },\n dualChartType: {\n primary: 'column',\n secondary: 'line',\n },\n crosshairRect,\n },\n // polar\n pie: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n labelLayout: 'labelLine',\n },\n },\n donut: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n labelLayout: 'labelLine',\n },\n },\n radar: {\n ...baseConfig,\n },\n rose: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n },\n },\n roseParallel: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n },\n },\n // other\n funnel: {\n ...baseConfig,\n },\n heatmap: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n labelColorSmartInvert: true,\n },\n },\n },\n }\n}\n"],"names":["lightTheme","linearAxis","bandAxis","barBandAxis","undefined","crosshairLine","crosshairRect","baseConfig","tableConfig"],"mappings":"AAYO,MAAMA,aAAa;IACxB,MAAMC,aAA0B;QAC9B,MAAM;QACN,MAAM;QACN,SAAS;QACT,OAAO;YACL,SAAS;YACT,YAAY;YACZ,YAAY;YACZ,eAAe;YACf,iBAAiB;QACnB;QACA,OAAO;YACL,SAAS;YACT,WAAW;YACX,YAAY;YACZ,eAAe;YACf,iBAAiB;QACn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,GAAGC,UAAU;gBACb,OAAOL;gBACP,OAAOD;gBACPI;YACF;YACA,aAAa;gBACX,GAAGE,UAAU;gBACb,OAAOL;gBACP,OAAO;oBACL,GAAGD,UAAU;gBACf;gBACAI;YACF;YACA,SAAS;gBACP,GAAGE,UAAU;gBACb,OAAO;oBACL,GAAGN,UAAU;oBACb,MAAM;wBACJ,GAAGA,WAAW,IAAI;wBAClB,SAAS;oBACX;gBACF;gBACA,OAAO;oBACL,GAAGA,UAAU;oBACb,MAAM;wBACJ,GAAGA,WAAW,IAAI;wBAClB,SAAS;oBACX;gBACF;gBACAI;gBACA,WAAW;oBAAC;oBAAG;iBAAG;YACpB;YACA,UAAU;gBACR,GAAGE,UAAU;gBACb,OAAOL;gBACP,cAAcD;gBACd,gBAAgB;oBAAE,GAAGA,UAAU;oBAAE,MAAM;wBAAE,SAAS;oBAAM;gBAAE;gBAC1D,eAAe;oBACb,SAAS;oBACT,WAAW;gBACb;gBACAK;YACF;YAEA,KAAK;gBACH,GAAGC,UAAU;gBACb,OAAO;oBACL,GAAGA,WAAW,KAAK;oBACnB,kBAAkB;oBAClB,aAAa;gBACf;YACF;YACA,OAAO;gBACL,GAAGA,UAAU;gBACb,OAAO;oBACL,GAAGA,WAAW,KAAK;oBACnB,kBAAkB;oBAClB,aAAa;gBACf;YACF;YACA,OAAO;gBACL,GAAGA,UAAU;YACf;YACA,MAAM;gBACJ,GAAGA,UAAU;gBACb,OAAO;oBACL,GAAGA,WAAW,KAAK;oBACnB,kBAAkB;gBACpB;YACF;YACA,cAAc;gBACZ,GAAGA,UAAU;gBACb,OAAO;oBACL,GAAGA,WAAW,KAAK;oBACnB,kBAAkB;gBACpB;YACF;YAEA,QAAQ;gBACN,GAAGA,UAAU;YACf;YACA,SAAS;gBACP,GAAGA,UAAU;gBACb,OAAO;oBACL,GAAGA,WAAW,KAAK;oBACnB,uBAAuB;gBACzB;YACF;QACF;IACF;AACF"}
@@ -2493,6 +2493,8 @@ export declare const zAdvancedVSeed: z.ZodObject<{
2493
2493
  labelVisible: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
2494
2494
  labelBackgroundColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2495
2495
  }, z.core.$strip>>>;
2496
+ size: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
2497
+ sizeRange: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
2496
2498
  }, z.core.$strip>>>;
2497
2499
  dualAxis: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2498
2500
  backgroundColor: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodString>>>>>;
@@ -6912,6 +6914,8 @@ export declare const zAdvancedVSeed: z.ZodObject<{
6912
6914
  labelVisible: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
6913
6915
  labelBackgroundColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6914
6916
  }, z.core.$strip>>>;
6917
+ size: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
6918
+ sizeRange: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
6915
6919
  }, z.core.$strip>>>;
6916
6920
  dualAxis: z.ZodOptional<z.ZodNullable<z.ZodObject<{
6917
6921
  backgroundColor: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodString>>>>>;
@@ -1,5 +1,5 @@
1
1
  import type { Locale } from '../../i18n';
2
- import type { BackgroundColor, ColorLegend, Dataset, Dimensions, Label, LinearColor, MeasureTree, Theme, Tooltip } from '../../properties';
2
+ import type { BackgroundColor, Color, ColorLegend, Dataset, Dimensions, Label, MeasureTree, Theme, Tooltip } from '../../properties';
3
3
  /**
4
4
  * @description 漏斗图,用于展示单一维度数据的占比关系
5
5
  * 适用场景:
@@ -61,7 +61,7 @@ export interface Funnel {
61
61
  /**
62
62
  * @description 线性渐变颜色配置, 用于定义图表的颜色方案
63
63
  */
64
- color?: LinearColor;
64
+ color?: Color;
65
65
  /**
66
66
  * @description 标签配置, 用于定义图表的数据标签, 包括数据标签的位置, 格式, 样式等.
67
67
  */
@@ -1,5 +1,5 @@
1
1
  import { type Locale } from '../../i18n';
2
- import type { ColorLegend, LinearColor, MeasureTree } from '../../properties';
2
+ import type { Color, ColorLegend, MeasureTree } from '../../properties';
3
3
  import { type BackgroundColor, type Dataset, type Dimensions, type Label, type Theme, type Tooltip } from '../../properties';
4
4
  /**
5
5
  * @description 热力图,通过二维矩阵的颜色深浅展示数据的分布和强弱关系
@@ -65,7 +65,7 @@ export interface Heatmap {
65
65
  * 颜色
66
66
  * @description 颜色配置, 用于定义图表的颜色方案, 包括颜色列表, 颜色映射, 颜色渐变等.
67
67
  */
68
- color?: LinearColor;
68
+ color?: Color;
69
69
  /**
70
70
  * @description 热力图标签配置, 用于定义图表的数据标签, 自动开启标签反色, 确保标签可读性.
71
71
  */
@@ -1,27 +1,5 @@
1
1
  import { z } from 'zod';
2
2
  export type ChartType = 'table' | 'pivotTable' | 'line' | 'column' | 'columnPercent' | 'columnParallel' | 'bar' | 'barPercent' | 'barParallel' | 'area' | 'areaPercent' | 'scatter' | 'dualAxis' | 'rose' | 'roseParallel' | 'pie' | 'donut' | 'radar' | 'heatmap' | 'funnel';
3
- export declare const ChartTypeEnum: {
4
- readonly Table: "table";
5
- readonly PivotTable: "pivotTable";
6
- readonly Line: "line";
7
- readonly Column: "column";
8
- readonly ColumnPercent: "columnPercent";
9
- readonly ColumnParallel: "columnParallel";
10
- readonly Bar: "bar";
11
- readonly BarPercent: "barPercent";
12
- readonly BarParallel: "barParallel";
13
- readonly Area: "area";
14
- readonly AreaPercent: "areaPercent";
15
- readonly DualAxis: "dualAxis";
16
- readonly Scatter: "scatter";
17
- readonly Rose: "rose";
18
- readonly RoseParallel: "roseParallel";
19
- readonly Pie: "pie";
20
- readonly Donut: "donut";
21
- readonly Radar: "radar";
22
- readonly Funnel: "funnel";
23
- readonly Heatmap: "heatmap";
24
- };
25
3
  export declare const zChartType: z.ZodEnum<{
26
4
  table: "table";
27
5
  pivotTable: "pivotTable";
@@ -1,26 +1,4 @@
1
1
  import { z } from "zod";
2
- const ChartTypeEnum = {
3
- Table: 'table',
4
- PivotTable: 'pivotTable',
5
- Line: 'line',
6
- Column: 'column',
7
- ColumnPercent: 'columnPercent',
8
- ColumnParallel: 'columnParallel',
9
- Bar: 'bar',
10
- BarPercent: 'barPercent',
11
- BarParallel: 'barParallel',
12
- Area: 'area',
13
- AreaPercent: 'areaPercent',
14
- DualAxis: 'dualAxis',
15
- Scatter: 'scatter',
16
- Rose: 'rose',
17
- RoseParallel: 'roseParallel',
18
- Pie: 'pie',
19
- Donut: 'donut',
20
- Radar: 'radar',
21
- Funnel: 'funnel',
22
- Heatmap: 'heatmap'
23
- };
24
2
  const zChartType = z["enum"]([
25
3
  'table',
26
4
  'pivotTable',
@@ -43,6 +21,6 @@ const zChartType = z["enum"]([
43
21
  'funnel',
44
22
  'heatmap'
45
23
  ]);
46
- export { ChartTypeEnum, zChartType };
24
+ export { zChartType };
47
25
 
48
26
  //# sourceMappingURL=chartType.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types/properties/chartType/chartType.js","sources":["webpack://@visactor/vseed/./src/types/properties/chartType/chartType.ts"],"sourcesContent":["import { z } from 'zod'\n\nexport type ChartType =\n | 'table'\n | 'pivotTable'\n // cartesian\n | 'line'\n | 'column'\n | 'columnPercent'\n | 'columnParallel'\n | 'bar'\n | 'barPercent'\n | 'barParallel'\n | 'area'\n | 'areaPercent'\n | 'scatter'\n | 'dualAxis'\n // polar\n | 'rose'\n | 'roseParallel'\n | 'pie'\n | 'donut'\n | 'radar'\n // other\n | 'heatmap'\n | 'funnel'\n\nexport const ChartTypeEnum = {\n Table: 'table',\n PivotTable: 'pivotTable',\n // cartesian\n Line: 'line',\n Column: 'column',\n ColumnPercent: 'columnPercent',\n ColumnParallel: 'columnParallel',\n Bar: 'bar',\n BarPercent: 'barPercent',\n BarParallel: 'barParallel',\n Area: 'area',\n AreaPercent: 'areaPercent',\n DualAxis: 'dualAxis',\n Scatter: 'scatter',\n // polar\n Rose: 'rose',\n RoseParallel: 'roseParallel',\n Pie: 'pie',\n Donut: 'donut',\n Radar: 'radar',\n // other\n Funnel: 'funnel',\n Heatmap: 'heatmap',\n} as const\n\nexport const zChartType = z.enum([\n 'table',\n 'pivotTable',\n // cartesian\n 'line',\n 'column',\n 'columnPercent',\n 'columnParallel',\n 'bar',\n 'barPercent',\n 'barParallel',\n 'area',\n 'areaPercent',\n 'scatter',\n 'dualAxis',\n // polar\n 'rose',\n 'roseParallel',\n 'pie',\n 'donut',\n 'radar',\n // other\n 'funnel',\n 'heatmap',\n])\n"],"names":["ChartTypeEnum","zChartType","z"],"mappings":";AA2BO,MAAMA,gBAAgB;IAC3B,OAAO;IACP,YAAY;IAEZ,MAAM;IACN,QAAQ;IACR,eAAe;IACf,gBAAgB;IAChB,KAAK;IACL,YAAY;IACZ,aAAa;IACb,MAAM;IACN,aAAa;IACb,UAAU;IACV,SAAS;IAET,MAAM;IACN,cAAc;IACd,KAAK;IACL,OAAO;IACP,OAAO;IAEP,QAAQ;IACR,SAAS;AACX;AAEO,MAAMC,aAAaC,CAAC,CAADA,OAAM,CAAC;IAC/B;IACA;IAEA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IAEA;IACA;IACA;IACA;IACA;IAEA;IACA;CACD"}
1
+ {"version":3,"file":"types/properties/chartType/chartType.js","sources":["webpack://@visactor/vseed/./src/types/properties/chartType/chartType.ts"],"sourcesContent":["import { z } from 'zod'\n\nexport type ChartType =\n | 'table'\n | 'pivotTable'\n // cartesian\n | 'line'\n | 'column'\n | 'columnPercent'\n | 'columnParallel'\n | 'bar'\n | 'barPercent'\n | 'barParallel'\n | 'area'\n | 'areaPercent'\n | 'scatter'\n | 'dualAxis'\n // polar\n | 'rose'\n | 'roseParallel'\n | 'pie'\n | 'donut'\n | 'radar'\n // other\n | 'heatmap'\n | 'funnel'\n\nexport const zChartType = z.enum([\n 'table',\n 'pivotTable',\n // cartesian\n 'line',\n 'column',\n 'columnPercent',\n 'columnParallel',\n 'bar',\n 'barPercent',\n 'barParallel',\n 'area',\n 'areaPercent',\n 'scatter',\n 'dualAxis',\n // polar\n 'rose',\n 'roseParallel',\n 'pie',\n 'donut',\n 'radar',\n // other\n 'funnel',\n 'heatmap',\n])\n"],"names":["zChartType","z"],"mappings":";AA2BO,MAAMA,aAAaC,CAAC,CAADA,OAAM,CAAC;IAC/B;IACA;IAEA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IAEA;IACA;IACA;IACA;IACA;IAEA;IACA;CACD"}
@@ -28,11 +28,3 @@ export type Color = {
28
28
  */
29
29
  colorMapping?: Record<string, string>;
30
30
  };
31
- export type LinearColor = {
32
- /**
33
- *
34
- * @description 线性渐变颜色配色方案, 线性渐变颜色配色方案用于定义图表中不同元素的颜色
35
- * @example ['#FFCDD2,#F8BBD0,#E1BEE7,#D1C4E9,#C5CAE9,#BBDEFB,#B3E5FC,#B2EBF2,#B2DFDB,#C8E6C9,#DCEDC8,#F0F4C3,#FFF9C4,#FFECB3,#FFE0B2']
36
- */
37
- colorScheme?: string[];
38
- };
@@ -1 +1 @@
1
- {"version":3,"file":"types/properties/config/color/color.js","sources":["webpack://@visactor/vseed/./src/types/properties/config/color/color.ts"],"sourcesContent":["import { z } from 'zod'\n\nexport const zColor = z.object({\n colorScheme: z.array(z.string()).nullish(),\n linearColorScheme: z.array(z.string()).nullish(),\n colorMapping: z.record(z.string(), z.string()).nullish(),\n})\n\nexport const zLinearColor = z.object({\n linearColorScheme: z.array(z.string()).nullish(),\n})\n\nexport type Color = {\n /**\n * @description 离散颜色配色方案, 颜色配色方案用于定义图表中不同元素的颜色\n * @example ['#FFCDD2,#F8BBD0,#E1BEE7,#D1C4E9,#C5CAE9,#BBDEFB,#B3E5FC,#B2EBF2,#B2DFDB,#C8E6C9,#DCEDC8,#F0F4C3,#FFF9C4,#FFECB3,#FFE0B2']\n */\n colorScheme?: string[]\n /**\n * @description 线性渐变颜色配色方案, 线性渐变颜色配色方案用于定义图表中不同元素的颜色\n * @example ['#FFCDD2, #F8BBD0]\n */\n linearColorScheme?: string[]\n /**\n * @description 颜色映射, 颜色映射用于将数据值映射到具体的颜色\n * @example\n * {\n * 'profit': 'red',\n * 'sales': 'blue',\n * }\n */\n colorMapping?: Record<string, string>\n}\n\nexport type LinearColor = {\n /**\n *\n * @description 线性渐变颜色配色方案, 线性渐变颜色配色方案用于定义图表中不同元素的颜色\n * @example ['#FFCDD2,#F8BBD0,#E1BEE7,#D1C4E9,#C5CAE9,#BBDEFB,#B3E5FC,#B2EBF2,#B2DFDB,#C8E6C9,#DCEDC8,#F0F4C3,#FFF9C4,#FFECB3,#FFE0B2']\n */\n colorScheme?: string[]\n}\n"],"names":["zColor","z","zLinearColor"],"mappings":";AAEO,MAAMA,SAASC,EAAE,MAAM,CAAC;IAC7B,aAAaA,EAAE,KAAK,CAACA,EAAE,MAAM,IAAI,OAAO;IACxC,mBAAmBA,EAAE,KAAK,CAACA,EAAE,MAAM,IAAI,OAAO;IAC9C,cAAcA,EAAE,MAAM,CAACA,EAAE,MAAM,IAAIA,EAAE,MAAM,IAAI,OAAO;AACxD;AAEO,MAAMC,eAAeD,EAAE,MAAM,CAAC;IACnC,mBAAmBA,EAAE,KAAK,CAACA,EAAE,MAAM,IAAI,OAAO;AAChD"}
1
+ {"version":3,"file":"types/properties/config/color/color.js","sources":["webpack://@visactor/vseed/./src/types/properties/config/color/color.ts"],"sourcesContent":["import { z } from 'zod'\n\nexport const zColor = z.object({\n colorScheme: z.array(z.string()).nullish(),\n linearColorScheme: z.array(z.string()).nullish(),\n colorMapping: z.record(z.string(), z.string()).nullish(),\n})\n\nexport const zLinearColor = z.object({\n linearColorScheme: z.array(z.string()).nullish(),\n})\n\nexport type Color = {\n /**\n * @description 离散颜色配色方案, 颜色配色方案用于定义图表中不同元素的颜色\n * @example ['#FFCDD2,#F8BBD0,#E1BEE7,#D1C4E9,#C5CAE9,#BBDEFB,#B3E5FC,#B2EBF2,#B2DFDB,#C8E6C9,#DCEDC8,#F0F4C3,#FFF9C4,#FFECB3,#FFE0B2']\n */\n colorScheme?: string[]\n /**\n * @description 线性渐变颜色配色方案, 线性渐变颜色配色方案用于定义图表中不同元素的颜色\n * @example ['#FFCDD2, #F8BBD0]\n */\n linearColorScheme?: string[]\n /**\n * @description 颜色映射, 颜色映射用于将数据值映射到具体的颜色\n * @example\n * {\n * 'profit': 'red',\n * 'sales': 'blue',\n * }\n */\n colorMapping?: Record<string, string>\n}\n"],"names":["zColor","z","zLinearColor"],"mappings":";AAEO,MAAMA,SAASC,EAAE,MAAM,CAAC;IAC7B,aAAaA,EAAE,KAAK,CAACA,EAAE,MAAM,IAAI,OAAO;IACxC,mBAAmBA,EAAE,KAAK,CAACA,EAAE,MAAM,IAAI,OAAO;IAC9C,cAAcA,EAAE,MAAM,CAACA,EAAE,MAAM,IAAIA,EAAE,MAAM,IAAI,OAAO;AACxD;AAEO,MAAMC,eAAeD,EAAE,MAAM,CAAC;IACnC,mBAAmBA,EAAE,KAAK,CAACA,EAAE,MAAM,IAAI,OAAO;AAChD"}
@@ -2785,6 +2785,8 @@ export declare const zScatterConfig: z.ZodObject<{
2785
2785
  labelVisible: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
2786
2786
  labelBackgroundColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2787
2787
  }, z.core.$strip>>>;
2788
+ size: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
2789
+ sizeRange: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
2788
2790
  }, z.core.$strip>;
2789
2791
  export declare const zRoseConfig: z.ZodObject<{
2790
2792
  backgroundColor: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodString>>>>>;
@@ -6133,6 +6135,8 @@ export declare const zConfig: z.ZodObject<{
6133
6135
  labelVisible: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
6134
6136
  labelBackgroundColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6135
6137
  }, z.core.$strip>>>;
6138
+ size: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
6139
+ sizeRange: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
6136
6140
  }, z.core.$strip>>>;
6137
6141
  dualAxis: z.ZodOptional<z.ZodNullable<z.ZodObject<{
6138
6142
  backgroundColor: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodString>>>>>;
@@ -93,7 +93,9 @@ const zScatterConfig = z.object({
93
93
  legend: zLegend.nullish(),
94
94
  xAxis: zXLinearAxis.nullish(),
95
95
  yAxis: zYLinearAxis.nullish(),
96
- crosshairLine: zCrosshairLine.nullish()
96
+ crosshairLine: zCrosshairLine.nullish(),
97
+ size: z.number().or(z.array(z.number())).nullish(),
98
+ sizeRange: z.number().or(z.array(z.number())).nullish()
97
99
  });
98
100
  const zRoseConfig = z.object({
99
101
  backgroundColor: zBackgroundColor.nullish(),