@visactor/vseed 0.1.20 → 0.1.22

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 (152) 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 +1282 -172
  4. package/dist/esm/pipeline/spec/chart/pipeline/donut.js +4 -3
  5. package/dist/esm/pipeline/spec/chart/pipeline/donut.js.map +1 -1
  6. package/dist/esm/pipeline/spec/chart/pipeline/dualAxis.js +3 -3
  7. package/dist/esm/pipeline/spec/chart/pipeline/dualAxis.js.map +1 -1
  8. package/dist/esm/pipeline/spec/chart/pipeline/funnel.js +2 -1
  9. package/dist/esm/pipeline/spec/chart/pipeline/funnel.js.map +1 -1
  10. package/dist/esm/pipeline/spec/chart/pipeline/pie.js +4 -3
  11. package/dist/esm/pipeline/spec/chart/pipeline/pie.js.map +1 -1
  12. package/dist/esm/pipeline/spec/chart/pipeline/radar.js +2 -1
  13. package/dist/esm/pipeline/spec/chart/pipeline/radar.js.map +1 -1
  14. package/dist/esm/pipeline/spec/chart/pipeline/rose.js +4 -3
  15. package/dist/esm/pipeline/spec/chart/pipeline/rose.js.map +1 -1
  16. package/dist/esm/pipeline/spec/chart/pipeline/roseParallel.js +4 -3
  17. package/dist/esm/pipeline/spec/chart/pipeline/roseParallel.js.map +1 -1
  18. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationAreaBand.js +16 -6
  19. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationAreaBand.js.map +1 -1
  20. package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetPivot.js.map +1 -1
  21. package/dist/esm/pipeline/spec/chart/pipes/init/pivot.js.map +1 -1
  22. package/dist/esm/pipeline/spec/chart/pipes/label/index.d.ts +1 -0
  23. package/dist/esm/pipeline/spec/chart/pipes/label/index.js +2 -1
  24. package/dist/esm/pipeline/spec/chart/pipes/label/label.d.ts +3 -2
  25. package/dist/esm/pipeline/spec/chart/pipes/label/label.js +8 -11
  26. package/dist/esm/pipeline/spec/chart/pipes/label/label.js.map +1 -1
  27. package/dist/esm/pipeline/spec/chart/pipes/label/labelDualAxis.js +0 -4
  28. package/dist/esm/pipeline/spec/chart/pipes/label/labelDualAxis.js.map +1 -1
  29. package/dist/esm/pipeline/spec/chart/pipes/label/labelPie.d.ts +2 -0
  30. package/dist/esm/pipeline/spec/chart/pipes/label/labelPie.js +22 -0
  31. package/dist/esm/pipeline/spec/chart/pipes/label/labelPie.js.map +1 -0
  32. package/dist/esm/pipeline/spec/chart/pipes/label/labelScatter.js +0 -2
  33. package/dist/esm/pipeline/spec/chart/pipes/label/labelScatter.js.map +1 -1
  34. package/dist/esm/pipeline/spec/chart/pipes/markStyle/areaStyle.js +9 -1
  35. package/dist/esm/pipeline/spec/chart/pipes/markStyle/areaStyle.js.map +1 -1
  36. package/dist/esm/pipeline/spec/chart/pipes/markStyle/curve/curve.d.ts +3 -0
  37. package/dist/esm/pipeline/spec/chart/pipes/markStyle/curve/curve.js +12 -0
  38. package/dist/esm/pipeline/spec/chart/pipes/markStyle/curve/curve.js.map +1 -0
  39. package/dist/esm/pipeline/spec/chart/pipes/markStyle/curve/index.d.ts +1 -0
  40. package/dist/esm/pipeline/spec/chart/pipes/markStyle/curve/index.js +2 -0
  41. package/dist/esm/pipeline/spec/chart/pipes/markStyle/lineStyle.js +4 -1
  42. package/dist/esm/pipeline/spec/chart/pipes/markStyle/lineStyle.js.map +1 -1
  43. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/index.d.ts +1 -0
  44. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/index.js +2 -1
  45. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.js +7 -4
  46. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.js.map +1 -1
  47. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotHideIndicatorName.d.ts +2 -0
  48. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotHideIndicatorName.js +7 -0
  49. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotHideIndicatorName.js.map +1 -0
  50. package/dist/esm/pipeline/spec/chart/pipes/size/scatterSize.js +2 -1
  51. package/dist/esm/pipeline/spec/chart/pipes/size/scatterSize.js.map +1 -1
  52. package/dist/esm/pipeline/utils/chatType.d.ts +16 -0
  53. package/dist/esm/pipeline/utils/chatType.js +12 -7
  54. package/dist/esm/pipeline/utils/chatType.js.map +1 -1
  55. package/dist/esm/theme/dark.js +5 -1
  56. package/dist/esm/theme/dark.js.map +1 -1
  57. package/dist/esm/theme/light.js +5 -1
  58. package/dist/esm/theme/light.js.map +1 -1
  59. package/dist/esm/types/advancedVSeed.d.ts +478 -180
  60. package/dist/esm/types/chartType/area/area.d.ts +1 -1
  61. package/dist/esm/types/chartType/area/zArea.d.ts +5 -5
  62. package/dist/esm/types/chartType/area/zArea.js +1 -3
  63. package/dist/esm/types/chartType/area/zArea.js.map +1 -1
  64. package/dist/esm/types/chartType/areaPercent/areaPercent.d.ts +1 -1
  65. package/dist/esm/types/chartType/areaPercent/zAreaPercent.d.ts +5 -5
  66. package/dist/esm/types/chartType/areaPercent/zAreaPercent.js +1 -3
  67. package/dist/esm/types/chartType/areaPercent/zAreaPercent.js.map +1 -1
  68. package/dist/esm/types/chartType/bar/bar.d.ts +1 -1
  69. package/dist/esm/types/chartType/bar/zBar.d.ts +5 -5
  70. package/dist/esm/types/chartType/bar/zBar.js +1 -3
  71. package/dist/esm/types/chartType/bar/zBar.js.map +1 -1
  72. package/dist/esm/types/chartType/barParallel/barParallel.d.ts +1 -1
  73. package/dist/esm/types/chartType/barParallel/zBarParallel.d.ts +5 -5
  74. package/dist/esm/types/chartType/barParallel/zBarParallel.js +1 -3
  75. package/dist/esm/types/chartType/barParallel/zBarParallel.js.map +1 -1
  76. package/dist/esm/types/chartType/barPercent/barPercent.d.ts +1 -1
  77. package/dist/esm/types/chartType/barPercent/zBarPercent.d.ts +5 -5
  78. package/dist/esm/types/chartType/barPercent/zBarPercent.js +1 -3
  79. package/dist/esm/types/chartType/barPercent/zBarPercent.js.map +1 -1
  80. package/dist/esm/types/chartType/column/column.d.ts +1 -1
  81. package/dist/esm/types/chartType/column/zColumn.d.ts +5 -5
  82. package/dist/esm/types/chartType/column/zColumn.js +1 -3
  83. package/dist/esm/types/chartType/column/zColumn.js.map +1 -1
  84. package/dist/esm/types/chartType/columnParallel/columnParallel.d.ts +1 -1
  85. package/dist/esm/types/chartType/columnParallel/zColumnParallel.d.ts +5 -5
  86. package/dist/esm/types/chartType/columnParallel/zColumnParallel.js +1 -3
  87. package/dist/esm/types/chartType/columnParallel/zColumnParallel.js.map +1 -1
  88. package/dist/esm/types/chartType/columnPercent/columnPercent.d.ts +1 -1
  89. package/dist/esm/types/chartType/columnPercent/zColumnPercent.d.ts +5 -5
  90. package/dist/esm/types/chartType/columnPercent/zColumnPercent.js +1 -3
  91. package/dist/esm/types/chartType/columnPercent/zColumnPercent.js.map +1 -1
  92. package/dist/esm/types/chartType/donut/donut.d.ts +2 -2
  93. package/dist/esm/types/chartType/donut/zDonut.d.ts +1 -5
  94. package/dist/esm/types/chartType/donut/zDonut.js +2 -2
  95. package/dist/esm/types/chartType/donut/zDonut.js.map +1 -1
  96. package/dist/esm/types/chartType/dualAxis/dualAxis.d.ts +1 -1
  97. package/dist/esm/types/chartType/dualAxis/zDualAxis.d.ts +5 -5
  98. package/dist/esm/types/chartType/dualAxis/zDualAxis.js +1 -3
  99. package/dist/esm/types/chartType/dualAxis/zDualAxis.js.map +1 -1
  100. package/dist/esm/types/chartType/funnel/funnel.d.ts +3 -3
  101. package/dist/esm/types/chartType/funnel/zFunnel.d.ts +5 -5
  102. package/dist/esm/types/chartType/funnel/zFunnel.js +1 -3
  103. package/dist/esm/types/chartType/funnel/zFunnel.js.map +1 -1
  104. package/dist/esm/types/chartType/heatmap/heatmap.d.ts +3 -3
  105. package/dist/esm/types/chartType/heatmap/zHeatmap.d.ts +5 -5
  106. package/dist/esm/types/chartType/heatmap/zHeatmap.js +1 -3
  107. package/dist/esm/types/chartType/heatmap/zHeatmap.js.map +1 -1
  108. package/dist/esm/types/chartType/line/line.d.ts +1 -1
  109. package/dist/esm/types/chartType/line/zLine.d.ts +5 -5
  110. package/dist/esm/types/chartType/line/zLine.js +1 -3
  111. package/dist/esm/types/chartType/line/zLine.js.map +1 -1
  112. package/dist/esm/types/chartType/pie/pie.d.ts +2 -2
  113. package/dist/esm/types/chartType/pie/zPie.d.ts +1 -5
  114. package/dist/esm/types/chartType/pie/zPie.js +2 -2
  115. package/dist/esm/types/chartType/pie/zPie.js.map +1 -1
  116. package/dist/esm/types/chartType/radar/radar.d.ts +1 -1
  117. package/dist/esm/types/chartType/radar/zRadar.d.ts +5 -5
  118. package/dist/esm/types/chartType/radar/zRadar.js +1 -3
  119. package/dist/esm/types/chartType/radar/zRadar.js.map +1 -1
  120. package/dist/esm/types/chartType/rose/rose.d.ts +3 -3
  121. package/dist/esm/types/chartType/rose/zRose.d.ts +5 -5
  122. package/dist/esm/types/chartType/rose/zRose.js +1 -3
  123. package/dist/esm/types/chartType/rose/zRose.js.map +1 -1
  124. package/dist/esm/types/chartType/roseParallel/roseParallel.d.ts +3 -3
  125. package/dist/esm/types/chartType/roseParallel/zRoseParallel.d.ts +5 -5
  126. package/dist/esm/types/chartType/roseParallel/zRoseParallel.js +1 -3
  127. package/dist/esm/types/chartType/roseParallel/zRoseParallel.js.map +1 -1
  128. package/dist/esm/types/chartType/scatter/scatter.d.ts +1 -1
  129. package/dist/esm/types/chartType/scatter/zScatter.d.ts +5 -5
  130. package/dist/esm/types/chartType/scatter/zScatter.js +1 -3
  131. package/dist/esm/types/chartType/scatter/zScatter.js.map +1 -1
  132. package/dist/esm/types/properties/config/color/color.d.ts +0 -8
  133. package/dist/esm/types/properties/config/color/color.js.map +1 -1
  134. package/dist/esm/types/properties/config/config.d.ts +478 -180
  135. package/dist/esm/types/properties/config/config.js +8 -6
  136. package/dist/esm/types/properties/config/config.js.map +1 -1
  137. package/dist/esm/types/properties/config/label/index.d.ts +2 -0
  138. package/dist/esm/types/properties/config/label/index.js +1 -0
  139. package/dist/esm/types/properties/config/label/label.d.ts +0 -7
  140. package/dist/esm/types/properties/config/label/pieLabel.d.ts +10 -0
  141. package/dist/esm/types/properties/config/label/pieLabel.js +0 -0
  142. package/dist/esm/types/properties/config/label/zLabel.d.ts +0 -5
  143. package/dist/esm/types/properties/config/label/zLabel.js +1 -6
  144. package/dist/esm/types/properties/config/label/zLabel.js.map +1 -1
  145. package/dist/esm/types/properties/config/label/zPieLabel.d.ts +46 -0
  146. package/dist/esm/types/properties/config/label/zPieLabel.js +12 -0
  147. package/dist/esm/types/properties/config/label/zPieLabel.js.map +1 -0
  148. package/dist/esm/types/properties/theme/customTheme.d.ts +478 -180
  149. package/dist/esm/types/zVseed.d.ts +82 -90
  150. package/dist/umd/index.js +155 -115
  151. package/dist/umd/index.js.map +1 -1
  152. package/package.json +7 -3
@@ -1,4 +1,3 @@
1
- import { isNullish } from "remeda";
2
1
  import { buildLabel } from "./label.js";
3
2
  import { DUAL_AXIS_LABEL_Z_INDEX } from "../../../../utils/constant.js";
4
3
  const labelPrimary = (spec, context)=>{
@@ -9,7 +8,6 @@ const labelPrimary = (spec, context)=>{
9
8
  const { datasetReshapeInfo, encoding } = advancedVSeed;
10
9
  const { chartType } = advancedVSeed;
11
10
  const baseConfig = advancedVSeed.config[chartType];
12
- if (!baseConfig || !baseConfig.label) return result;
13
11
  const foldInfoList = datasetReshapeInfo[0].foldInfoList;
14
12
  result.label = buildLabel(baseConfig.label, vseed.measures, vseed.dimensions, advancedVSeed.measures, encoding, [
15
13
  foldInfoList[0]
@@ -25,8 +23,6 @@ const labelSecondary = (spec, context)=>{
25
23
  const { datasetReshapeInfo, encoding } = advancedVSeed;
26
24
  const { chartType } = advancedVSeed;
27
25
  const baseConfig = advancedVSeed.config[chartType];
28
- if (!baseConfig || !baseConfig.label) return result;
29
- if (isNullish(datasetReshapeInfo[0].foldInfoList?.[1])) return result;
30
26
  const foldInfoList = datasetReshapeInfo[0].foldInfoList;
31
27
  result.label = buildLabel(baseConfig.label, vseed.measures, vseed.dimensions, advancedVSeed.measures, encoding, [
32
28
  foldInfoList[1]
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/label/labelDualAxis.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/label/labelDualAxis.ts"],"sourcesContent":["import type { ILineChartSpec } from '@visactor/vchart'\nimport type { Encoding, FoldInfo, Label, SpecPipe } from 'src/types'\nimport { isNullish } from 'remeda'\nimport { buildLabel } from './label'\nimport { DUAL_AXIS_LABEL_Z_INDEX } from 'src/pipeline/utils/constant'\n\nexport const labelPrimary: SpecPipe = (spec, context) => {\n const result = { ...spec } as ILineChartSpec\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo, encoding } = advancedVSeed\n const { chartType } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { label: Label }\n\n if (!baseConfig || !baseConfig.label) {\n return result\n }\n\n const foldInfoList = datasetReshapeInfo[0].foldInfoList as FoldInfo[]\n result.label = buildLabel(\n baseConfig.label,\n vseed.measures,\n vseed.dimensions,\n advancedVSeed.measures,\n encoding as Encoding,\n [foldInfoList[0]],\n )\n result.label.zIndex = DUAL_AXIS_LABEL_Z_INDEX\n return result\n}\n\nexport const labelSecondary: SpecPipe = (spec, context) => {\n const result = { ...spec } as ILineChartSpec\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo, encoding } = advancedVSeed\n const { chartType } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { label: Label }\n\n if (!baseConfig || !baseConfig.label) {\n return result\n }\n if (isNullish(datasetReshapeInfo[0].foldInfoList?.[1])) {\n return result\n }\n const foldInfoList = datasetReshapeInfo[0].foldInfoList as FoldInfo[]\n\n result.label = buildLabel(\n baseConfig.label,\n vseed.measures,\n vseed.dimensions,\n advancedVSeed.measures,\n encoding as Encoding,\n [foldInfoList[1]],\n )\n result.label.zIndex = DUAL_AXIS_LABEL_Z_INDEX\n return result\n}\n"],"names":["labelPrimary","spec","context","result","advancedVSeed","vseed","datasetReshapeInfo","encoding","chartType","baseConfig","foldInfoList","buildLabel","DUAL_AXIS_LABEL_Z_INDEX","labelSecondary","isNullish"],"mappings":";;;AAMO,MAAMA,eAAyB,CAACC,MAAMC;IAC3C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEI,kBAAkB,EAAEC,QAAQ,EAAE,GAAGH;IACzC,MAAM,EAAEI,SAAS,EAAE,GAAGJ;IACtB,MAAMK,aAAaL,cAAc,MAAM,CAACI,UAAU;IAElD,IAAI,CAACC,cAAc,CAACA,WAAW,KAAK,EAClC,OAAON;IAGT,MAAMO,eAAeJ,kBAAkB,CAAC,EAAE,CAAC,YAAY;IACvDH,OAAO,KAAK,GAAGQ,WACbF,WAAW,KAAK,EAChBJ,MAAM,QAAQ,EACdA,MAAM,UAAU,EAChBD,cAAc,QAAQ,EACtBG,UACA;QAACG,YAAY,CAAC,EAAE;KAAC;IAEnBP,OAAO,KAAK,CAAC,MAAM,GAAGS;IACtB,OAAOT;AACT;AAEO,MAAMU,iBAA2B,CAACZ,MAAMC;IAC7C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEI,kBAAkB,EAAEC,QAAQ,EAAE,GAAGH;IACzC,MAAM,EAAEI,SAAS,EAAE,GAAGJ;IACtB,MAAMK,aAAaL,cAAc,MAAM,CAACI,UAAU;IAElD,IAAI,CAACC,cAAc,CAACA,WAAW,KAAK,EAClC,OAAON;IAET,IAAIW,UAAUR,kBAAkB,CAAC,EAAE,CAAC,YAAY,EAAE,CAAC,EAAE,GACnD,OAAOH;IAET,MAAMO,eAAeJ,kBAAkB,CAAC,EAAE,CAAC,YAAY;IAEvDH,OAAO,KAAK,GAAGQ,WACbF,WAAW,KAAK,EAChBJ,MAAM,QAAQ,EACdA,MAAM,UAAU,EAChBD,cAAc,QAAQ,EACtBG,UACA;QAACG,YAAY,CAAC,EAAE;KAAC;IAEnBP,OAAO,KAAK,CAAC,MAAM,GAAGS;IACtB,OAAOT;AACT"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/label/labelDualAxis.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/label/labelDualAxis.ts"],"sourcesContent":["import type { ILineChartSpec } from '@visactor/vchart'\nimport type { Encoding, FoldInfo, Label, SpecPipe } from 'src/types'\nimport { buildLabel } from './label'\nimport { DUAL_AXIS_LABEL_Z_INDEX } from 'src/pipeline/utils/constant'\nimport type { ILineLikeLabelSpec } from '@visactor/vchart/esm/series/mixin/interface'\n\nexport const labelPrimary: SpecPipe = (spec, context) => {\n const result = { ...spec } as ILineChartSpec\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo, encoding } = advancedVSeed\n const { chartType } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { label: Label }\n\n const foldInfoList = datasetReshapeInfo[0].foldInfoList as FoldInfo[]\n result.label = buildLabel<ILineLikeLabelSpec>(\n baseConfig.label,\n vseed.measures,\n vseed.dimensions,\n advancedVSeed.measures,\n encoding as Encoding,\n [foldInfoList[0]],\n )\n result.label.zIndex = DUAL_AXIS_LABEL_Z_INDEX\n return result\n}\n\nexport const labelSecondary: SpecPipe = (spec, context) => {\n const result = { ...spec } as ILineChartSpec\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo, encoding } = advancedVSeed\n const { chartType } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { label: Label }\n\n const foldInfoList = datasetReshapeInfo[0].foldInfoList as FoldInfo[]\n\n result.label = buildLabel<ILineLikeLabelSpec>(\n baseConfig.label,\n vseed.measures,\n vseed.dimensions,\n advancedVSeed.measures,\n encoding as Encoding,\n [foldInfoList[1]],\n )\n result.label.zIndex = DUAL_AXIS_LABEL_Z_INDEX\n return result\n}\n"],"names":["labelPrimary","spec","context","result","advancedVSeed","vseed","datasetReshapeInfo","encoding","chartType","baseConfig","foldInfoList","buildLabel","DUAL_AXIS_LABEL_Z_INDEX","labelSecondary"],"mappings":";;AAMO,MAAMA,eAAyB,CAACC,MAAMC;IAC3C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEI,kBAAkB,EAAEC,QAAQ,EAAE,GAAGH;IACzC,MAAM,EAAEI,SAAS,EAAE,GAAGJ;IACtB,MAAMK,aAAaL,cAAc,MAAM,CAACI,UAAU;IAElD,MAAME,eAAeJ,kBAAkB,CAAC,EAAE,CAAC,YAAY;IACvDH,OAAO,KAAK,GAAGQ,WACbF,WAAW,KAAK,EAChBJ,MAAM,QAAQ,EACdA,MAAM,UAAU,EAChBD,cAAc,QAAQ,EACtBG,UACA;QAACG,YAAY,CAAC,EAAE;KAAC;IAEnBP,OAAO,KAAK,CAAC,MAAM,GAAGS;IACtB,OAAOT;AACT;AAEO,MAAMU,iBAA2B,CAACZ,MAAMC;IAC7C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEI,kBAAkB,EAAEC,QAAQ,EAAE,GAAGH;IACzC,MAAM,EAAEI,SAAS,EAAE,GAAGJ;IACtB,MAAMK,aAAaL,cAAc,MAAM,CAACI,UAAU;IAElD,MAAME,eAAeJ,kBAAkB,CAAC,EAAE,CAAC,YAAY;IAEvDH,OAAO,KAAK,GAAGQ,WACbF,WAAW,KAAK,EAChBJ,MAAM,QAAQ,EACdA,MAAM,UAAU,EAChBD,cAAc,QAAQ,EACtBG,UACA;QAACG,YAAY,CAAC,EAAE;KAAC;IAEnBP,OAAO,KAAK,CAAC,MAAM,GAAGS;IACtB,OAAOT;AACT"}
@@ -0,0 +1,2 @@
1
+ import type { SpecPipe } from '../../../../../types';
2
+ export declare const labelPie: SpecPipe;
@@ -0,0 +1,22 @@
1
+ import { buildLabel } from "./label.js";
2
+ const labelPie = (spec, context)=>{
3
+ const result = {
4
+ ...spec
5
+ };
6
+ const { advancedVSeed, vseed } = context;
7
+ const { datasetReshapeInfo } = advancedVSeed;
8
+ const { chartType, encoding } = advancedVSeed;
9
+ const baseConfig = advancedVSeed.config[chartType];
10
+ const foldInfo = datasetReshapeInfo[0].foldInfo;
11
+ const { label } = baseConfig;
12
+ result.label = buildLabel(label, vseed.measures, vseed.dimensions, advancedVSeed.measures, encoding, [
13
+ foldInfo
14
+ ]);
15
+ if (label.labelLayout) result.label.layout = {
16
+ align: label.labelLayout
17
+ };
18
+ return result;
19
+ };
20
+ export { labelPie };
21
+
22
+ //# sourceMappingURL=labelPie.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/label/labelPie.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/label/labelPie.ts"],"sourcesContent":["import type { IArcLabelSpec, IPieChartSpec } from '@visactor/vchart'\nimport type { Encoding, FoldInfo, PieLabel, SpecPipe } from 'src/types'\nimport { buildLabel } from './label'\n\nexport const labelPie: SpecPipe = (spec, context) => {\n const result = { ...spec } as IPieChartSpec\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { chartType, encoding } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { label: PieLabel }\n const foldInfo = datasetReshapeInfo[0].foldInfo as FoldInfo\n\n const { label } = baseConfig\n\n result.label = buildLabel<IArcLabelSpec>(\n label,\n vseed.measures,\n vseed.dimensions,\n advancedVSeed.measures,\n encoding as Encoding,\n [foldInfo],\n )\n if (label.labelLayout) {\n result.label.layout = {\n align: label.labelLayout,\n }\n }\n return result\n}\n"],"names":["labelPie","spec","context","result","advancedVSeed","vseed","datasetReshapeInfo","chartType","encoding","baseConfig","foldInfo","label","buildLabel"],"mappings":";AAIO,MAAMA,WAAqB,CAACC,MAAMC;IACvC,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEI,kBAAkB,EAAE,GAAGF;IAC/B,MAAM,EAAEG,SAAS,EAAEC,QAAQ,EAAE,GAAGJ;IAChC,MAAMK,aAAaL,cAAc,MAAM,CAACG,UAAU;IAClD,MAAMG,WAAWJ,kBAAkB,CAAC,EAAE,CAAC,QAAQ;IAE/C,MAAM,EAAEK,KAAK,EAAE,GAAGF;IAElBN,OAAO,KAAK,GAAGS,WACbD,OACAN,MAAM,QAAQ,EACdA,MAAM,UAAU,EAChBD,cAAc,QAAQ,EACtBI,UACA;QAACE;KAAS;IAEZ,IAAIC,MAAM,WAAW,EACnBR,OAAO,KAAK,CAAC,MAAM,GAAG;QACpB,OAAOQ,MAAM,WAAW;IAC1B;IAEF,OAAOR;AACT"}
@@ -1,4 +1,3 @@
1
- import { isEmpty } from "remeda";
2
1
  import { buildLabel } from "./label.js";
3
2
  const labelScatter = (spec, context)=>{
4
3
  const result = {
@@ -8,7 +7,6 @@ const labelScatter = (spec, context)=>{
8
7
  const { datasetReshapeInfo } = advancedVSeed;
9
8
  const { chartType, encoding } = advancedVSeed;
10
9
  const baseConfig = advancedVSeed.config[chartType];
11
- if (!baseConfig || isEmpty(baseConfig.label)) return result;
12
10
  const foldInfoList = datasetReshapeInfo[0].foldInfoList;
13
11
  const { label } = baseConfig;
14
12
  result.label = buildLabel(label, vseed.measures, vseed.dimensions, advancedVSeed.measures, encoding, foldInfoList);
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/label/labelScatter.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/label/labelScatter.ts"],"sourcesContent":["import type { IScatterChartSpec } from '@visactor/vchart'\nimport type { Encoding, FoldInfo, Label, SpecPipe } from 'src/types'\nimport { isEmpty } from 'remeda'\nimport { buildLabel } from './label'\n\nexport const labelScatter: SpecPipe = (spec, context) => {\n const result = { ...spec } as IScatterChartSpec\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { chartType, encoding } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { label: Label }\n\n if (!baseConfig || isEmpty(baseConfig.label)) {\n return result\n }\n\n const foldInfoList = datasetReshapeInfo[0].foldInfoList as FoldInfo[]\n\n const { label } = baseConfig\n\n result.label = buildLabel(\n label,\n vseed.measures,\n vseed.dimensions,\n advancedVSeed.measures,\n encoding as Encoding,\n foldInfoList,\n )\n\n return result\n}\n"],"names":["labelScatter","spec","context","result","advancedVSeed","vseed","datasetReshapeInfo","chartType","encoding","baseConfig","isEmpty","foldInfoList","label","buildLabel"],"mappings":";;AAKO,MAAMA,eAAyB,CAACC,MAAMC;IAC3C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEI,kBAAkB,EAAE,GAAGF;IAC/B,MAAM,EAAEG,SAAS,EAAEC,QAAQ,EAAE,GAAGJ;IAChC,MAAMK,aAAaL,cAAc,MAAM,CAACG,UAAU;IAElD,IAAI,CAACE,cAAcC,QAAQD,WAAW,KAAK,GACzC,OAAON;IAGT,MAAMQ,eAAeL,kBAAkB,CAAC,EAAE,CAAC,YAAY;IAEvD,MAAM,EAAEM,KAAK,EAAE,GAAGH;IAElBN,OAAO,KAAK,GAAGU,WACbD,OACAP,MAAM,QAAQ,EACdA,MAAM,UAAU,EAChBD,cAAc,QAAQ,EACtBI,UACAG;IAGF,OAAOR;AACT"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/label/labelScatter.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/label/labelScatter.ts"],"sourcesContent":["import type { IScatterChartSpec } from '@visactor/vchart'\nimport type { Encoding, FoldInfo, Label, SpecPipe } from 'src/types'\nimport { buildLabel } from './label'\nimport type { ILineLikeLabelSpec } from '@visactor/vchart/esm/series/mixin/interface'\n\nexport const labelScatter: SpecPipe = (spec, context) => {\n const result = { ...spec } as IScatterChartSpec\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { chartType, encoding } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { label: Label }\n\n const foldInfoList = datasetReshapeInfo[0].foldInfoList as FoldInfo[]\n\n const { label } = baseConfig\n\n result.label = buildLabel<ILineLikeLabelSpec>(\n label,\n vseed.measures,\n vseed.dimensions,\n advancedVSeed.measures,\n encoding as Encoding,\n foldInfoList,\n )\n\n return result\n}\n"],"names":["labelScatter","spec","context","result","advancedVSeed","vseed","datasetReshapeInfo","chartType","encoding","baseConfig","foldInfoList","label","buildLabel"],"mappings":";AAKO,MAAMA,eAAyB,CAACC,MAAMC;IAC3C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEI,kBAAkB,EAAE,GAAGF;IAC/B,MAAM,EAAEG,SAAS,EAAEC,QAAQ,EAAE,GAAGJ;IAChC,MAAMK,aAAaL,cAAc,MAAM,CAACG,UAAU;IAElD,MAAMG,eAAeJ,kBAAkB,CAAC,EAAE,CAAC,YAAY;IAEvD,MAAM,EAAEK,KAAK,EAAE,GAAGF;IAElBN,OAAO,KAAK,GAAGS,WACbD,OACAN,MAAM,QAAQ,EACdA,MAAM,UAAU,EAChBD,cAAc,QAAQ,EACtBI,UACAE;IAGF,OAAOP;AACT"}
@@ -1,9 +1,10 @@
1
1
  import { selector } from "../../../../../dataSelector/index.js";
2
2
  import { groupBy, isEmpty, isNullish } from "remeda";
3
+ import { getCurveTension, getCurveType } from "./curve/index.js";
3
4
  const areaStyle_areaStyle = (spec, context)=>{
4
5
  const { advancedVSeed } = context;
5
6
  const { markStyle, datasetReshapeInfo, dataset } = advancedVSeed;
6
- const { areaStyle } = markStyle;
7
+ const { areaStyle, lineStyle } = markStyle;
7
8
  const { unfoldInfo } = datasetReshapeInfo[0];
8
9
  const result = {
9
10
  ...spec,
@@ -16,10 +17,15 @@ const areaStyle_areaStyle = (spec, context)=>{
16
17
  const areaStyles = Array.isArray(areaStyle) ? areaStyle : [
17
18
  areaStyle
18
19
  ];
20
+ const lineStyles = Array.isArray(lineStyle) ? lineStyle : [
21
+ lineStyle
22
+ ];
19
23
  const group = unfoldInfo.encodingColorId;
20
24
  const areaGroups = groupBy(dataset, (d)=>d[group ?? '']);
21
25
  const customMap = areaStyles.reduce((result, style, index)=>{
22
26
  const { areaColor, areaColorOpacity, areaVisible = true } = style;
27
+ const curveType = getCurveType(context.vseed, lineStyles[index]?.lineSmooth);
28
+ const curveTension = getCurveTension(context.vseed, lineStyles[index]?.lineSmooth);
23
29
  return {
24
30
  ...result,
25
31
  [`custom${index + 1}`]: {
@@ -30,6 +36,8 @@ const areaStyle_areaStyle = (spec, context)=>{
30
36
  return false;
31
37
  },
32
38
  style: {
39
+ curveType,
40
+ curveTension,
33
41
  visible: areaVisible,
34
42
  fill: areaColor,
35
43
  fillOpacity: areaColorOpacity
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/markStyle/areaStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/markStyle/areaStyle.ts"],"sourcesContent":["import type { IAreaChartSpec } from '@visactor/vchart'\nimport { selector } from '../../../../../dataSelector'\nimport type { AreaStyle, Datum, SpecPipe } from 'src/types'\nimport { groupBy, isEmpty, isNullish } from 'remeda'\n\nexport const areaStyle: SpecPipe = (spec, context) => {\n const { advancedVSeed } = context\n const { markStyle, datasetReshapeInfo, dataset } = advancedVSeed\n const { areaStyle } = markStyle\n const { unfoldInfo } = datasetReshapeInfo[0]\n const result = {\n ...spec,\n area: {\n visible: true,\n style: {},\n },\n } as IAreaChartSpec\n\n if (isNullish(areaStyle) || isEmpty(areaStyle)) {\n return result\n }\n\n const areaStyles = (Array.isArray(areaStyle) ? areaStyle : [areaStyle]) as AreaStyle[]\n\n const group = unfoldInfo.encodingColorId\n\n const areaGroups = groupBy(dataset, (d) => d[group ?? ''] as string)\n\n const customMap = areaStyles.reduce<object>((result, style, index) => {\n const { areaColor, areaColorOpacity, areaVisible = true } = style\n\n return {\n ...result,\n [`custom${index + 1}`]: {\n // 优先级: 后者覆盖前者\n level: index + 1,\n filter: (datum: Datum) => {\n const lineData = areaGroups[datum[group ?? ''] as string]\n for (const d of lineData) {\n if (selector(d, style.selector)) {\n return true\n }\n }\n return false\n },\n style: {\n visible: areaVisible,\n fill: areaColor,\n fillOpacity: areaColorOpacity,\n },\n },\n }\n }, {})\n\n return {\n ...result,\n area: {\n ...result.area,\n visible: true,\n state: {\n ...customMap,\n },\n },\n }\n}\n"],"names":["areaStyle","spec","context","advancedVSeed","markStyle","datasetReshapeInfo","dataset","unfoldInfo","result","isNullish","isEmpty","areaStyles","Array","group","areaGroups","groupBy","d","customMap","style","index","areaColor","areaColorOpacity","areaVisible","datum","lineData","selector"],"mappings":";;AAKO,MAAMA,sBAAsB,CAACC,MAAMC;IACxC,MAAM,EAAEC,aAAa,EAAE,GAAGD;IAC1B,MAAM,EAAEE,SAAS,EAAEC,kBAAkB,EAAEC,OAAO,EAAE,GAAGH;IACnD,MAAM,EAAEH,SAAS,EAAE,GAAGI;IACtB,MAAM,EAAEG,UAAU,EAAE,GAAGF,kBAAkB,CAAC,EAAE;IAC5C,MAAMG,SAAS;QACb,GAAGP,IAAI;QACP,MAAM;YACJ,SAAS;YACT,OAAO,CAAC;QACV;IACF;IAEA,IAAIQ,UAAUT,cAAcU,QAAQV,YAClC,OAAOQ;IAGT,MAAMG,aAAcC,MAAM,OAAO,CAACZ,aAAaA,YAAY;QAACA;KAAU;IAEtE,MAAMa,QAAQN,WAAW,eAAe;IAExC,MAAMO,aAAaC,QAAQT,SAAS,CAACU,IAAMA,CAAC,CAACH,SAAS,GAAG;IAEzD,MAAMI,YAAYN,WAAW,MAAM,CAAS,CAACH,QAAQU,OAAOC;QAC1D,MAAM,EAAEC,SAAS,EAAEC,gBAAgB,EAAEC,cAAc,IAAI,EAAE,GAAGJ;QAE5D,OAAO;YACL,GAAGV,MAAM;YACT,CAAC,CAAC,MAAM,EAAEW,QAAQ,GAAG,CAAC,EAAE;gBAEtB,OAAOA,QAAQ;gBACf,QAAQ,CAACI;oBACP,MAAMC,WAAWV,UAAU,CAACS,KAAK,CAACV,SAAS,GAAG,CAAW;oBACzD,KAAK,MAAMG,KAAKQ,SACd,IAAIC,SAAST,GAAGE,MAAM,QAAQ,GAC5B,OAAO;oBAGX,OAAO;gBACT;gBACA,OAAO;oBACL,SAASI;oBACT,MAAMF;oBACN,aAAaC;gBACf;YACF;QACF;IACF,GAAG,CAAC;IAEJ,OAAO;QACL,GAAGb,MAAM;QACT,MAAM;YACJ,GAAGA,OAAO,IAAI;YACd,SAAS;YACT,OAAO;gBACL,GAAGS,SAAS;YACd;QACF;IACF;AACF"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/markStyle/areaStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/markStyle/areaStyle.ts"],"sourcesContent":["import type { IAreaChartSpec } from '@visactor/vchart'\nimport { selector } from '../../../../../dataSelector'\nimport type { AreaStyle, Datum, LineStyle, SpecPipe } from 'src/types'\nimport { groupBy, isEmpty, isNullish } from 'remeda'\nimport { getCurveTension, getCurveType } from './curve'\n\nexport const areaStyle: SpecPipe = (spec, context) => {\n const { advancedVSeed } = context\n const { markStyle, datasetReshapeInfo, dataset } = advancedVSeed\n const { areaStyle, lineStyle } = markStyle\n const { unfoldInfo } = datasetReshapeInfo[0]\n const result = {\n ...spec,\n area: {\n visible: true,\n style: {},\n },\n } as IAreaChartSpec\n\n if (isNullish(areaStyle) || isEmpty(areaStyle)) {\n return result\n }\n\n const areaStyles = (Array.isArray(areaStyle) ? areaStyle : [areaStyle]) as AreaStyle[]\n const lineStyles = (Array.isArray(lineStyle) ? lineStyle : [lineStyle]) as LineStyle[]\n\n const group = unfoldInfo.encodingColorId\n\n const areaGroups = groupBy(dataset, (d) => d[group ?? ''] as string)\n\n const customMap = areaStyles.reduce<object>((result, style, index) => {\n const { areaColor, areaColorOpacity, areaVisible = true } = style\n\n const curveType = getCurveType(context.vseed, lineStyles[index]?.lineSmooth)\n const curveTension = getCurveTension(context.vseed, lineStyles[index]?.lineSmooth)\n\n return {\n ...result,\n [`custom${index + 1}`]: {\n // 优先级: 后者覆盖前者\n level: index + 1,\n filter: (datum: Datum) => {\n const lineData = areaGroups[datum[group ?? ''] as string]\n for (const d of lineData) {\n if (selector(d, style.selector)) {\n return true\n }\n }\n return false\n },\n style: {\n curveType,\n curveTension,\n visible: areaVisible,\n fill: areaColor,\n fillOpacity: areaColorOpacity,\n },\n },\n }\n }, {})\n\n return {\n ...result,\n area: {\n ...result.area,\n visible: true,\n state: {\n ...customMap,\n },\n },\n }\n}\n"],"names":["areaStyle","spec","context","advancedVSeed","markStyle","datasetReshapeInfo","dataset","lineStyle","unfoldInfo","result","isNullish","isEmpty","areaStyles","Array","lineStyles","group","areaGroups","groupBy","d","customMap","style","index","areaColor","areaColorOpacity","areaVisible","curveType","getCurveType","curveTension","getCurveTension","datum","lineData","selector"],"mappings":";;;AAMO,MAAMA,sBAAsB,CAACC,MAAMC;IACxC,MAAM,EAAEC,aAAa,EAAE,GAAGD;IAC1B,MAAM,EAAEE,SAAS,EAAEC,kBAAkB,EAAEC,OAAO,EAAE,GAAGH;IACnD,MAAM,EAAEH,SAAS,EAAEO,SAAS,EAAE,GAAGH;IACjC,MAAM,EAAEI,UAAU,EAAE,GAAGH,kBAAkB,CAAC,EAAE;IAC5C,MAAMI,SAAS;QACb,GAAGR,IAAI;QACP,MAAM;YACJ,SAAS;YACT,OAAO,CAAC;QACV;IACF;IAEA,IAAIS,UAAUV,cAAcW,QAAQX,YAClC,OAAOS;IAGT,MAAMG,aAAcC,MAAM,OAAO,CAACb,aAAaA,YAAY;QAACA;KAAU;IACtE,MAAMc,aAAcD,MAAM,OAAO,CAACN,aAAaA,YAAY;QAACA;KAAU;IAEtE,MAAMQ,QAAQP,WAAW,eAAe;IAExC,MAAMQ,aAAaC,QAAQX,SAAS,CAACY,IAAMA,CAAC,CAACH,SAAS,GAAG;IAEzD,MAAMI,YAAYP,WAAW,MAAM,CAAS,CAACH,QAAQW,OAAOC;QAC1D,MAAM,EAAEC,SAAS,EAAEC,gBAAgB,EAAEC,cAAc,IAAI,EAAE,GAAGJ;QAE5D,MAAMK,YAAYC,aAAaxB,QAAQ,KAAK,EAAEY,UAAU,CAACO,MAAM,EAAE;QACjE,MAAMM,eAAeC,gBAAgB1B,QAAQ,KAAK,EAAEY,UAAU,CAACO,MAAM,EAAE;QAEvE,OAAO;YACL,GAAGZ,MAAM;YACT,CAAC,CAAC,MAAM,EAAEY,QAAQ,GAAG,CAAC,EAAE;gBAEtB,OAAOA,QAAQ;gBACf,QAAQ,CAACQ;oBACP,MAAMC,WAAWd,UAAU,CAACa,KAAK,CAACd,SAAS,GAAG,CAAW;oBACzD,KAAK,MAAMG,KAAKY,SACd,IAAIC,SAASb,GAAGE,MAAM,QAAQ,GAC5B,OAAO;oBAGX,OAAO;gBACT;gBACA,OAAO;oBACLK;oBACAE;oBACA,SAASH;oBACT,MAAMF;oBACN,aAAaC;gBACf;YACF;QACF;IACF,GAAG,CAAC;IAEJ,OAAO;QACL,GAAGd,MAAM;QACT,MAAM;YACJ,GAAGA,OAAO,IAAI;YACd,SAAS;YACT,OAAO;gBACL,GAAGU,SAAS;YACd;QACF;IACF;AACF"}
@@ -0,0 +1,3 @@
1
+ import type { VSeed } from '../../../../../../types';
2
+ export declare const getCurveType: (vseed: VSeed, lineSmooth?: boolean) => string;
3
+ export declare const getCurveTension: (vseed: VSeed, lineSmooth?: boolean) => number;
@@ -0,0 +1,12 @@
1
+ import { isRadar } from "../../../../../utils/index.js";
2
+ const getCurveType = (vseed, lineSmooth = false)=>{
3
+ if (!lineSmooth) return 'linear';
4
+ return isRadar(vseed) ? 'catmullRomClosed' : 'monotone';
5
+ };
6
+ const getCurveTension = (vseed, lineSmooth = false)=>{
7
+ if (!lineSmooth) return 0;
8
+ return isRadar(vseed) ? 0.4 : 0;
9
+ };
10
+ export { getCurveTension, getCurveType };
11
+
12
+ //# sourceMappingURL=curve.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/markStyle/curve/curve.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/markStyle/curve/curve.ts"],"sourcesContent":["import { isRadar } from 'src/pipeline/utils'\nimport type { VSeed } from 'src/types'\n\nexport const getCurveType = (vseed: VSeed, lineSmooth: boolean = false): string => {\n if (!lineSmooth) {\n return 'linear'\n }\n\n /**\n * Tip: 长期来看, 由VChart封装好雷达图与面积图的曲线类型差异, 是一个更好的选择.\n */\n return isRadar(vseed) ? 'catmullRomClosed' : 'monotone'\n}\n\nexport const getCurveTension = (vseed: VSeed, lineSmooth: boolean = false): number => {\n if (!lineSmooth) {\n return 0\n }\n\n /**\n * Tip: 长期来看, 由VChart封装好雷达图与面积图的曲线类型差异, 是一个更好的选择.\n */\n return isRadar(vseed) ? 0.4 : 0\n}\n"],"names":["getCurveType","vseed","lineSmooth","isRadar","getCurveTension"],"mappings":";AAGO,MAAMA,eAAe,CAACC,OAAcC,aAAsB,KAAK;IACpE,IAAI,CAACA,YACH,OAAO;IAMT,OAAOC,QAAQF,SAAS,qBAAqB;AAC/C;AAEO,MAAMG,kBAAkB,CAACH,OAAcC,aAAsB,KAAK;IACvE,IAAI,CAACA,YACH,OAAO;IAMT,OAAOC,QAAQF,SAAS,MAAM;AAChC"}
@@ -0,0 +1 @@
1
+ export { getCurveType, getCurveTension } from './curve';
@@ -0,0 +1,2 @@
1
+ import { getCurveTension, getCurveType } from "./curve.js";
2
+ export { getCurveTension, getCurveType };
@@ -1,5 +1,6 @@
1
1
  import { selector } from "../../../../../dataSelector/index.js";
2
2
  import { groupBy, isEmpty, isNullish } from "remeda";
3
+ import { getCurveTension, getCurveType } from "./curve/index.js";
3
4
  const lineStyle_lineStyle = (spec, context)=>{
4
5
  const { advancedVSeed } = context;
5
6
  const { markStyle, datasetReshapeInfo, dataset } = advancedVSeed;
@@ -31,7 +32,8 @@ const lineStyle_lineStyle = (spec, context)=>{
31
32
  0,
32
33
  0
33
34
  ];
34
- const curveType = lineSmooth ? 'monotone' : 'linear';
35
+ const curveType = getCurveType(context.vseed, lineSmooth);
36
+ const curveTension = getCurveTension(context.vseed, lineSmooth);
35
37
  return {
36
38
  ...result,
37
39
  [`custom${index + 1}`]: {
@@ -44,6 +46,7 @@ const lineStyle_lineStyle = (spec, context)=>{
44
46
  style: {
45
47
  visible: lineVisible,
46
48
  curveType: curveType,
49
+ curveTension: curveTension,
47
50
  strokeOpacity: lineColorOpacity,
48
51
  stroke: lineColor,
49
52
  lineWidth: lineWidth,
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/markStyle/lineStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/markStyle/lineStyle.ts"],"sourcesContent":["import type { IAreaChartSpec } from '@visactor/vchart'\nimport { selector } from '../../../../../dataSelector'\nimport type { Datum, LineStyle, SpecPipe } from 'src/types'\nimport { groupBy, isEmpty, isNullish } from 'remeda'\n\nexport const lineStyle: SpecPipe = (spec, context) => {\n const { advancedVSeed } = context\n const { markStyle, datasetReshapeInfo, dataset } = advancedVSeed\n const { unfoldInfo } = datasetReshapeInfo[0]\n const { lineStyle } = markStyle\n const result = {\n ...spec,\n line: {\n style: {},\n },\n } as IAreaChartSpec\n\n if (isNullish(lineStyle) || isEmpty(lineStyle)) {\n return result\n }\n\n const lineStyles = (Array.isArray(lineStyle) ? lineStyle : [lineStyle]) as LineStyle[]\n\n const colorId = unfoldInfo.encodingColorId\n const lineGroups = groupBy(dataset, (d) => d[colorId ?? ''] as string)\n\n const customMap = lineStyles.reduce<object>((result, style, index) => {\n const { lineColor, lineColorOpacity, lineSmooth, lineStyle, lineWidth = 2, lineVisible = true } = style\n\n const dashSegment = lineWidth * 2\n const dashGap = lineWidth\n\n const lineDash =\n lineStyle === 'dashed' ? [dashSegment, dashSegment] : lineStyle === 'dotted' ? [dashGap / 2, dashGap * 2] : [0, 0]\n\n const curveType = lineSmooth ? 'monotone' : 'linear'\n\n return {\n ...result,\n [`custom${index + 1}`]: {\n // 优先级: 后者覆盖前者\n level: index + 1,\n filter: (datum: Datum) => {\n const lineData = lineGroups[datum[colorId ?? ''] as string]\n for (const d of lineData) {\n if (selector(d, style.selector)) {\n return true\n }\n }\n return false\n },\n style: {\n visible: lineVisible,\n curveType: curveType,\n strokeOpacity: lineColorOpacity,\n stroke: lineColor,\n lineWidth: lineWidth,\n lineDash: lineDash,\n },\n },\n }\n }, {})\n\n return {\n ...result,\n line: {\n ...result.line,\n state: {\n ...customMap,\n },\n },\n }\n}\n"],"names":["lineStyle","spec","context","advancedVSeed","markStyle","datasetReshapeInfo","dataset","unfoldInfo","result","isNullish","isEmpty","lineStyles","Array","colorId","lineGroups","groupBy","d","customMap","style","index","lineColor","lineColorOpacity","lineSmooth","lineWidth","lineVisible","dashSegment","dashGap","lineDash","curveType","datum","lineData","selector"],"mappings":";;AAKO,MAAMA,sBAAsB,CAACC,MAAMC;IACxC,MAAM,EAAEC,aAAa,EAAE,GAAGD;IAC1B,MAAM,EAAEE,SAAS,EAAEC,kBAAkB,EAAEC,OAAO,EAAE,GAAGH;IACnD,MAAM,EAAEI,UAAU,EAAE,GAAGF,kBAAkB,CAAC,EAAE;IAC5C,MAAM,EAAEL,SAAS,EAAE,GAAGI;IACtB,MAAMI,SAAS;QACb,GAAGP,IAAI;QACP,MAAM;YACJ,OAAO,CAAC;QACV;IACF;IAEA,IAAIQ,UAAUT,cAAcU,QAAQV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pipes/markStyle/lineStyle.ts"],"sourcesContent":["import type { IAreaChartSpec } from '@visactor/vchart'\nimport { selector } from '../../../../../dataSelector'\nimport type { Datum, LineStyle, SpecPipe } from 'src/types'\nimport { groupBy, isEmpty, isNullish } from 'remeda'\nimport { getCurveTension, getCurveType } from './curve'\n\nexport const lineStyle: SpecPipe = (spec, context) => {\n const { advancedVSeed } = context\n const { markStyle, datasetReshapeInfo, dataset } = advancedVSeed\n const { unfoldInfo } = datasetReshapeInfo[0]\n const { lineStyle } = markStyle\n const result = {\n ...spec,\n line: {\n style: {},\n },\n } as IAreaChartSpec\n\n if (isNullish(lineStyle) || isEmpty(lineStyle)) {\n return result\n }\n\n const lineStyles = (Array.isArray(lineStyle) ? lineStyle : [lineStyle]) as LineStyle[]\n\n const colorId = unfoldInfo.encodingColorId\n const lineGroups = groupBy(dataset, (d) => d[colorId ?? ''] as string)\n\n const customMap = lineStyles.reduce<object>((result, style, index) => {\n const { lineColor, lineColorOpacity, lineSmooth, lineStyle, lineWidth = 2, lineVisible = true } = style\n\n const dashSegment = lineWidth * 2\n const dashGap = lineWidth\n\n const lineDash =\n lineStyle === 'dashed' ? [dashSegment, dashSegment] : lineStyle === 'dotted' ? [dashGap / 2, dashGap * 2] : [0, 0]\n\n const curveType = getCurveType(context.vseed, lineSmooth)\n const curveTension = getCurveTension(context.vseed, lineSmooth)\n\n return {\n ...result,\n [`custom${index + 1}`]: {\n // 优先级: 后者覆盖前者\n level: index + 1,\n filter: (datum: Datum) => {\n const lineData = lineGroups[datum[colorId ?? ''] as string]\n for (const d of lineData) {\n if (selector(d, style.selector)) {\n return true\n }\n }\n return false\n },\n style: {\n visible: lineVisible,\n curveType: curveType,\n curveTension: curveTension,\n strokeOpacity: lineColorOpacity,\n stroke: lineColor,\n lineWidth: lineWidth,\n lineDash: lineDash,\n },\n },\n }\n }, {})\n\n return {\n ...result,\n line: {\n ...result.line,\n state: {\n ...customMap,\n },\n },\n }\n}\n"],"names":["lineStyle","spec","context","advancedVSeed","markStyle","datasetReshapeInfo","dataset","unfoldInfo","result","isNullish","isEmpty","lineStyles","Array","colorId","lineGroups","groupBy","d","customMap","style","index","lineColor","lineColorOpacity","lineSmooth","lineWidth","lineVisible","dashSegment","dashGap","lineDash","curveType","getCurveType","curveTension","getCurveTension","datum","lineData","selector"],"mappings":";;;AAMO,MAAMA,sBAAsB,CAACC,MAAMC;IACxC,MAAM,EAAEC,aAAa,EAAE,GAAGD;IAC1B,MAAM,EAAEE,SAAS,EAAEC,kBAAkB,EAAEC,OAAO,EAAE,GAAGH;IACnD,MAAM,EAAEI,UAAU,EAAE,GAAGF,kBAAkB,CAAC,EAAE;IAC5C,MAAM,EAAEL,SAAS,EAAE,GAAGI;IACtB,MAAMI,SAAS;QACb,GAAGP,IAAI;QACP,MAAM;YACJ,OAAO,CAAC;QACV;IACF;IAEA,IAAIQ,UAAUT,cAAcU,QAAQV,YAClC,OAAOQ;IAGT,MAAMG,aAAcC,MAAM,OAAO,CAACZ,aAAaA,YAAY;QAACA;KAAU;IAEtE,MAAMa,UAAUN,WAAW,eAAe;IAC1C,MAAMO,aAAaC,QAAQT,SAAS,CAACU,IAAMA,CAAC,CAACH,WAAW,GAAG;IAE3D,MAAMI,YAAYN,WAAW,MAAM,CAAS,CAACH,QAAQU,OAAOC;QAC1D,MAAM,EAAEC,SAAS,EAAEC,gBAAgB,EAAEC,UAAU,EAAEtB,SAAS,EAAEuB,YAAY,CAAC,EAAEC,cAAc,IAAI,EAAE,GAAGN;QAElG,MAAMO,cAAcF,AAAY,IAAZA;QACpB,MAAMG,UAAUH;QAEhB,MAAMI,WACJ3B,AAAc,aAAdA,YAAyB;YAACyB;YAAaA;SAAY,GAAGzB,AAAc,aAAdA,YAAyB;YAAC0B,UAAU;YAAa,IAAVA;SAAY,GAAG;YAAC;YAAG;SAAE;QAEpH,MAAME,YAAYC,aAAa3B,QAAQ,KAAK,EAAEoB;QAC9C,MAAMQ,eAAeC,gBAAgB7B,QAAQ,KAAK,EAAEoB;QAEpD,OAAO;YACL,GAAGd,MAAM;YACT,CAAC,CAAC,MAAM,EAAEW,QAAQ,GAAG,CAAC,EAAE;gBAEtB,OAAOA,QAAQ;gBACf,QAAQ,CAACa;oBACP,MAAMC,WAAWnB,UAAU,CAACkB,KAAK,CAACnB,WAAW,GAAG,CAAW;oBAC3D,KAAK,MAAMG,KAAKiB,SACd,IAAIC,SAASlB,GAAGE,MAAM,QAAQ,GAC5B,OAAO;oBAGX,OAAO;gBACT;gBACA,OAAO;oBACL,SAASM;oBACT,WAAWI;oBACX,cAAcE;oBACd,eAAeT;oBACf,QAAQD;oBACR,WAAWG;oBACX,UAAUI;gBACZ;YACF;QACF;IACF,GAAG,CAAC;IAEJ,OAAO;QACL,GAAGnB,MAAM;QACT,MAAM;YACJ,GAAGA,OAAO,IAAI;YACd,OAAO;gBACL,GAAGS,SAAS;YACd;QACF;IACF;AACF"}
@@ -3,3 +3,4 @@ export { pivotIndicators, pivotIndicatorsAsRow, pivotIndicatorsAsCol } from './p
3
3
  export { pivotGridStyle } from './pivotGridStyle';
4
4
  export { pivotColumnDimensions } from './pivotColumnDimensions';
5
5
  export { pivotRowDimensions } from './pivotRowDimensions';
6
+ export { pivotHideIndicatorName } from './pivotHideIndicatorName';
@@ -3,4 +3,5 @@ import { pivotIndicators, pivotIndicatorsAsCol, pivotIndicatorsAsRow } from "./p
3
3
  import { pivotGridStyle } from "./pivotGridStyle.js";
4
4
  import { pivotColumnDimensions } from "./pivotColumnDimensions.js";
5
5
  import { pivotRowDimensions } from "./pivotRowDimensions.js";
6
- export { pivotAdapter, pivotColumnDimensions, pivotGridStyle, pivotIndicators, pivotIndicatorsAsCol, pivotIndicatorsAsRow, pivotRowDimensions };
6
+ import { pivotHideIndicatorName } from "./pivotHideIndicatorName.js";
7
+ export { pivotAdapter, pivotColumnDimensions, pivotGridStyle, pivotHideIndicatorName, pivotIndicators, pivotIndicatorsAsCol, pivotIndicatorsAsRow, pivotRowDimensions };
@@ -1,4 +1,7 @@
1
- const pivotGridStyle = (spec)=>{
1
+ import { isCombination, isPivot } from "../../../../utils/index.js";
2
+ const pivotGridStyle = (spec, context)=>{
3
+ const { vseed } = context;
4
+ const onlyCombination = !isPivot(vseed) && isCombination(vseed);
2
5
  const result = {
3
6
  ...spec
4
7
  };
@@ -7,8 +10,8 @@ const pivotGridStyle = (spec)=>{
7
10
  const bodyFontColor = '#141414';
8
11
  const headerFontColor = '#21252c';
9
12
  const headerBackgroundColor = 'rgba(0,0,0,0)';
10
- const hoverHeaderBackgroundColor = '#D9DDE4';
11
- const hoverHeaderInlineBackgroundColor = '#D9DDE455';
13
+ const hoverHeaderBackgroundColor = onlyCombination ? transparent : '#D9DDE4';
14
+ const hoverHeaderInlineBackgroundColor = onlyCombination ? transparent : '#D9DDE455';
12
15
  return {
13
16
  ...result,
14
17
  theme: {
@@ -19,7 +22,7 @@ const pivotGridStyle = (spec)=>{
19
22
  borderLineWidth: [
20
23
  1,
21
24
  1,
22
- 0,
25
+ 1,
23
26
  1
24
27
  ],
25
28
  bgColor: transparent,
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.ts"],"sourcesContent":["import type { PivotChartConstructorOptions } from '@visactor/vtable'\nimport type { SpecPipe } from 'src/types'\n\nexport const pivotGridStyle: SpecPipe = (spec) => {\n const result = { ...spec } as PivotChartConstructorOptions\n const transparent = 'rgba(0,0,0,0)'\n\n const borderColor = '#e3e5eb'\n const bodyFontColor = '#141414'\n const headerFontColor = '#21252c'\n const headerBackgroundColor = 'rgba(0,0,0,0)'\n const hoverHeaderBackgroundColor = '#D9DDE4'\n const hoverHeaderInlineBackgroundColor = '#D9DDE455'\n\n return {\n ...result,\n theme: {\n underlayBackgroundColor: transparent,\n bodyStyle: {\n borderColor,\n color: bodyFontColor,\n borderLineWidth: [1, 1, 0, 1],\n bgColor: transparent,\n hover: {\n cellBgColor: 'transparent',\n },\n },\n headerStyle: {\n borderColor,\n fontSize: 12,\n borderLineWidth: 1,\n color: headerFontColor,\n textAlign: 'center',\n bgColor: headerBackgroundColor,\n hover: {\n cellBgColor: hoverHeaderBackgroundColor,\n inlineRowBgColor: hoverHeaderInlineBackgroundColor || undefined,\n inlineColumnBgColor: hoverHeaderInlineBackgroundColor || undefined,\n },\n },\n rowHeaderStyle: {\n borderColor,\n fontSize: 12,\n color: headerFontColor,\n borderLineWidth: 1,\n bgColor: headerBackgroundColor,\n hover: {\n cellBgColor: hoverHeaderBackgroundColor,\n inlineRowBgColor: hoverHeaderInlineBackgroundColor || undefined,\n inlineColumnBgColor: hoverHeaderInlineBackgroundColor || undefined,\n },\n },\n cornerHeaderStyle: {\n borderColor,\n textAlign: 'center',\n fontSize: 12,\n color: headerFontColor,\n fontWeight: 'bold',\n borderLineWidth: 1,\n bgColor: headerBackgroundColor,\n frameStyle: {\n borderColor,\n borderLineWidth: [1, 0, 0, 1],\n },\n hover: {\n cellBgColor: hoverHeaderBackgroundColor,\n inlineRowBgColor: hoverHeaderInlineBackgroundColor || undefined,\n inlineColumnBgColor: hoverHeaderInlineBackgroundColor || undefined,\n },\n },\n cornerRightTopCellStyle: {\n borderColor,\n borderLineWidth: 0,\n frameStyle: {\n borderColor,\n borderLineWidth: [1, 1, 0, 1],\n },\n bgColor: headerBackgroundColor,\n hover: {\n cellBgColor: hoverHeaderBackgroundColor,\n },\n },\n cornerLeftBottomCellStyle: {\n borderColor,\n borderLineWidth: [1, 0, 1, 1],\n bgColor: headerBackgroundColor,\n frameStyle: {\n borderColor,\n borderLineWidth: [1, 0, 1, 1],\n },\n hover: {\n cellBgColor: hoverHeaderBackgroundColor,\n },\n },\n cornerRightBottomCellStyle: {\n borderColor,\n borderLineWidth: 0,\n bgColor: headerBackgroundColor,\n frameStyle: {\n borderColor,\n borderLineWidth: [1, 1, 1, 1],\n },\n hover: {\n cellBgColor: hoverHeaderBackgroundColor,\n },\n },\n rightFrozenStyle: {\n borderColor,\n borderLineWidth: 1,\n bgColor: headerBackgroundColor,\n hover: {\n cellBgColor: hoverHeaderBackgroundColor,\n },\n },\n bottomFrozenStyle: {\n borderColor,\n borderLineWidth: 1,\n bgColor: headerBackgroundColor,\n hover: {\n cellBgColor: hoverHeaderBackgroundColor,\n },\n },\n selectionStyle: {\n cellBgColor: '',\n cellBorderColor: '',\n },\n frameStyle: {\n borderColor,\n cornerRadius: 4,\n },\n },\n }\n}\n"],"names":["pivotGridStyle","spec","result","transparent","borderColor","bodyFontColor","headerFontColor","headerBackgroundColor","hoverHeaderBackgroundColor","hoverHeaderInlineBackgroundColor","undefined"],"mappings":"AAGO,MAAMA,iBAA2B,CAACC;IACvC,MAAMC,SAAS;QAAE,GAAGD,IAAI;IAAC;IACzB,MAAME,cAAc;IAEpB,MAAMC,cAAc;IACpB,MAAMC,gBAAgB;IACtB,MAAMC,kBAAkB;IACxB,MAAMC,wBAAwB;IAC9B,MAAMC,6BAA6B;IACnC,MAAMC,mCAAmC;IAEzC,OAAO;QACL,GAAGP,MAAM;QACT,OAAO;YACL,yBAAyBC;YACzB,WAAW;gBACTC;gBACA,OAAOC;gBACP,iBAAiB;oBAAC;oBAAG;oBAAG;oBAAG;iBAAE;gBAC7B,SAASF;gBACT,OAAO;oBACL,aAAa;gBACf;YACF;YACA,aAAa;gBACXC;gBACA,UAAU;gBACV,iBAAiB;gBACjB,OAAOE;gBACP,WAAW;gBACX,SAASC;gBACT,OAAO;oBACL,aAAaC;oBACb,kBAAkBC,oCAAoCC;oBACtD,qBAAqBD,oCAAoCC;gBAC3D;YACF;YACA,gBAAgB;gBACdN;gBACA,UAAU;gBACV,OAAOE;gBACP,iBAAiB;gBACjB,SAASC;gBACT,OAAO;oBACL,aAAaC;oBACb,kBAAkBC,oCAAoCC;oBACtD,qBAAqBD,oCAAoCC;gBAC3D;YACF;YACA,mBAAmB;gBACjBN;gBACA,WAAW;gBACX,UAAU;gBACV,OAAOE;gBACP,YAAY;gBACZ,iBAAiB;gBACjB,SAASC;gBACT,YAAY;oBACVH;oBACA,iBAAiB;wBAAC;wBAAG;wBAAG;wBAAG;qBAAE;gBAC/B;gBACA,OAAO;oBACL,aAAaI;oBACb,kBAAkBC,oCAAoCC;oBACtD,qBAAqBD,oCAAoCC;gBAC3D;YACF;YACA,yBAAyB;gBACvBN;gBACA,iBAAiB;gBACjB,YAAY;oBACVA;oBACA,iBAAiB;wBAAC;wBAAG;wBAAG;wBAAG;qBAAE;gBAC/B;gBACA,SAASG;gBACT,OAAO;oBACL,aAAaC;gBACf;YACF;YACA,2BAA2B;gBACzBJ;gBACA,iBAAiB;oBAAC;oBAAG;oBAAG;oBAAG;iBAAE;gBAC7B,SAASG;gBACT,YAAY;oBACVH;oBACA,iBAAiB;wBAAC;wBAAG;wBAAG;wBAAG;qBAAE;gBAC/B;gBACA,OAAO;oBACL,aAAaI;gBACf;YACF;YACA,4BAA4B;gBAC1BJ;gBACA,iBAAiB;gBACjB,SAASG;gBACT,YAAY;oBACVH;oBACA,iBAAiB;wBAAC;wBAAG;wBAAG;wBAAG;qBAAE;gBAC/B;gBACA,OAAO;oBACL,aAAaI;gBACf;YACF;YACA,kBAAkB;gBAChBJ;gBACA,iBAAiB;gBACjB,SAASG;gBACT,OAAO;oBACL,aAAaC;gBACf;YACF;YACA,mBAAmB;gBACjBJ;gBACA,iBAAiB;gBACjB,SAASG;gBACT,OAAO;oBACL,aAAaC;gBACf;YACF;YACA,gBAAgB;gBACd,aAAa;gBACb,iBAAiB;YACnB;YACA,YAAY;gBACVJ;gBACA,cAAc;YAChB;QACF;IACF;AACF"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.ts"],"sourcesContent":["import type { PivotChartConstructorOptions } from '@visactor/vtable'\nimport { isCombination, isPivot } from 'src/pipeline/utils'\nimport type { SpecPipe } from 'src/types'\n\nexport const pivotGridStyle: SpecPipe = (spec, context) => {\n const { vseed } = context\n\n const onlyCombination = !isPivot(vseed) && isCombination(vseed)\n\n const result = { ...spec } as PivotChartConstructorOptions\n const transparent = 'rgba(0,0,0,0)'\n\n const borderColor = '#e3e5eb'\n const bodyFontColor = '#141414'\n const headerFontColor = '#21252c'\n const headerBackgroundColor = 'rgba(0,0,0,0)'\n const hoverHeaderBackgroundColor = onlyCombination ? transparent : '#D9DDE4'\n const hoverHeaderInlineBackgroundColor = onlyCombination ? transparent : '#D9DDE455'\n\n return {\n ...result,\n theme: {\n underlayBackgroundColor: transparent,\n bodyStyle: {\n borderColor,\n color: bodyFontColor,\n borderLineWidth: [1, 1, 1, 1],\n bgColor: transparent,\n hover: {\n cellBgColor: 'transparent',\n },\n },\n headerStyle: {\n borderColor,\n fontSize: 12,\n borderLineWidth: 1,\n color: headerFontColor,\n textAlign: 'center',\n bgColor: headerBackgroundColor,\n hover: {\n cellBgColor: hoverHeaderBackgroundColor,\n inlineRowBgColor: hoverHeaderInlineBackgroundColor || undefined,\n inlineColumnBgColor: hoverHeaderInlineBackgroundColor || undefined,\n },\n },\n rowHeaderStyle: {\n borderColor,\n fontSize: 12,\n color: headerFontColor,\n borderLineWidth: 1,\n bgColor: headerBackgroundColor,\n hover: {\n cellBgColor: hoverHeaderBackgroundColor,\n inlineRowBgColor: hoverHeaderInlineBackgroundColor || undefined,\n inlineColumnBgColor: hoverHeaderInlineBackgroundColor || undefined,\n },\n },\n cornerHeaderStyle: {\n borderColor,\n textAlign: 'center',\n fontSize: 12,\n color: headerFontColor,\n fontWeight: 'bold',\n borderLineWidth: 1,\n bgColor: headerBackgroundColor,\n frameStyle: {\n borderColor,\n borderLineWidth: [1, 0, 0, 1],\n },\n hover: {\n cellBgColor: hoverHeaderBackgroundColor,\n inlineRowBgColor: hoverHeaderInlineBackgroundColor || undefined,\n inlineColumnBgColor: hoverHeaderInlineBackgroundColor || undefined,\n },\n },\n cornerRightTopCellStyle: {\n borderColor,\n borderLineWidth: 0,\n frameStyle: {\n borderColor,\n borderLineWidth: [1, 1, 0, 1],\n },\n bgColor: headerBackgroundColor,\n hover: {\n cellBgColor: hoverHeaderBackgroundColor,\n },\n },\n cornerLeftBottomCellStyle: {\n borderColor,\n borderLineWidth: [1, 0, 1, 1],\n bgColor: headerBackgroundColor,\n frameStyle: {\n borderColor,\n borderLineWidth: [1, 0, 1, 1],\n },\n hover: {\n cellBgColor: hoverHeaderBackgroundColor,\n },\n },\n cornerRightBottomCellStyle: {\n borderColor,\n borderLineWidth: 0,\n bgColor: headerBackgroundColor,\n frameStyle: {\n borderColor,\n borderLineWidth: [1, 1, 1, 1],\n },\n hover: {\n cellBgColor: hoverHeaderBackgroundColor,\n },\n },\n rightFrozenStyle: {\n borderColor,\n borderLineWidth: 1,\n bgColor: headerBackgroundColor,\n hover: {\n cellBgColor: hoverHeaderBackgroundColor,\n },\n },\n bottomFrozenStyle: {\n borderColor,\n borderLineWidth: 1,\n bgColor: headerBackgroundColor,\n hover: {\n cellBgColor: hoverHeaderBackgroundColor,\n },\n },\n selectionStyle: {\n cellBgColor: '',\n cellBorderColor: '',\n },\n frameStyle: {\n borderColor,\n cornerRadius: 4,\n },\n },\n }\n}\n"],"names":["pivotGridStyle","spec","context","vseed","onlyCombination","isPivot","isCombination","result","transparent","borderColor","bodyFontColor","headerFontColor","headerBackgroundColor","hoverHeaderBackgroundColor","hoverHeaderInlineBackgroundColor","undefined"],"mappings":";AAIO,MAAMA,iBAA2B,CAACC,MAAMC;IAC7C,MAAM,EAAEC,KAAK,EAAE,GAAGD;IAElB,MAAME,kBAAkB,CAACC,QAAQF,UAAUG,cAAcH;IAEzD,MAAMI,SAAS;QAAE,GAAGN,IAAI;IAAC;IACzB,MAAMO,cAAc;IAEpB,MAAMC,cAAc;IACpB,MAAMC,gBAAgB;IACtB,MAAMC,kBAAkB;IACxB,MAAMC,wBAAwB;IAC9B,MAAMC,6BAA6BT,kBAAkBI,cAAc;IACnE,MAA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B,SAASG;gBACT,YAAY;oBACVH;oBACA,iBAAiB;wBAAC;wBAAG;wBAAG;wBAAG;qBAAE;gBAC/B;gBACA,OAAO;oBACL,aAAaI;gBACf;YACF;YACA,kBAAkB;gBAChBJ;gBACA,iBAAiB;gBACjB,SAASG;gBACT,OAAO;oBACL,aAAaC;gBACf;YACF;YACA,mBAAmB;gBACjBJ;gBACA,iBAAiB;gBACjB,SAASG;gBACT,OAAO;oBACL,aAAaC;gBACf;YACF;YACA,gBAAgB;gBACd,aAAa;gBACb,iBAAiB;YACnB;YACA,YAAY;gBACVJ;gBACA,cAAc;YAChB;QACF;IACF;AACF"}
@@ -0,0 +1,2 @@
1
+ import type { SpecPipe } from '../../../../../types';
2
+ export declare const pivotHideIndicatorName: SpecPipe;
@@ -0,0 +1,7 @@
1
+ const pivotHideIndicatorName = (spec)=>({
2
+ ...spec,
3
+ hideIndicatorName: true
4
+ });
5
+ export { pivotHideIndicatorName };
6
+
7
+ //# sourceMappingURL=pivotHideIndicatorName.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/pivotChart/pivotHideIndicatorName.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/pivotChart/pivotHideIndicatorName.ts"],"sourcesContent":["import type { SpecPipe } from 'src/types'\n\nexport const pivotHideIndicatorName: SpecPipe = (spec) => {\n return {\n ...spec,\n hideIndicatorName: true,\n }\n}\n"],"names":["pivotHideIndicatorName","spec"],"mappings":"AAEO,MAAMA,yBAAmC,CAACC,OACxC;QACL,GAAGA,IAAI;QACP,mBAAmB;IACrB"}
@@ -5,7 +5,8 @@ const scatterSize = (spec, context)=>{
5
5
  const { advancedVSeed } = context;
6
6
  const { chartType, encoding } = advancedVSeed;
7
7
  const baseConfig = advancedVSeed.config[chartType];
8
- if (!baseConfig || !baseConfig.sizeRange && !baseConfig.size) return result;
8
+ const hasSizeEncoding = encoding?.size?.[0];
9
+ if (!hasSizeEncoding) return result;
9
10
  const size = baseConfig.size ?? baseConfig.sizeRange;
10
11
  result.size = {
11
12
  type: 'linear',
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/size/scatterSize.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/size/scatterSize.ts"],"sourcesContent":["import type { IScatterChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\n\nexport const scatterSize: SpecPipe = (spec, context) => {\n const result = { ...spec } as IScatterChartSpec\n const { advancedVSeed } = context\n const { chartType, encoding } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as {\n sizeRange: number | number[]\n size?: number | number[]\n }\n\n if (!baseConfig || (!baseConfig.sizeRange && !baseConfig.size)) {\n return result\n }\n\n const size = baseConfig.size ?? baseConfig.sizeRange\n\n result.size = {\n type: 'linear',\n range: Array.isArray(size) ? size : [size, size],\n } as IScatterChartSpec['size']\n\n result.sizeField = encoding?.size?.[0] || undefined\n\n return result\n}\n"],"names":["scatterSize","spec","context","result","advancedVSeed","chartType","encoding","baseConfig","size","Array","undefined"],"mappings":"AAGO,MAAMA,cAAwB,CAACC,MAAMC;IAC1C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,SAAS,EAAEC,QAAQ,EAAE,GAAGF;IAChC,MAAMG,aAAaH,cAAc,MAAM,CAACC,UAAU;IAKlD,IAAI,CAACE,cAAe,CAACA,WAAW,SAAS,IAAI,CAACA,WAAW,IAAI,EAC3D,OAAOJ;IAGT,MAAMK,OAAOD,WAAW,IAAI,IAAIA,WAAW,SAAS;IAEpDJ,OAAO,IAAI,GAAG;QACZ,MAAM;QACN,OAAOM,MAAM,OAAO,CAACD,QAAQA,OAAO;YAACA;YAAMA;SAAK;IAClD;IAEAL,OAAO,SAAS,GAAGG,UAAU,MAAM,CAAC,EAAE,IAAII;IAE1C,OAAOP;AACT"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/size/scatterSize.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/size/scatterSize.ts"],"sourcesContent":["import type { IScatterChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\n\nexport const scatterSize: SpecPipe = (spec, context) => {\n const result = { ...spec } as IScatterChartSpec\n const { advancedVSeed } = context\n const { chartType, encoding } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as {\n sizeRange: number | number[]\n size?: number | number[]\n }\n const hasSizeEncoding = encoding?.size?.[0]\n if (!hasSizeEncoding) {\n return result\n }\n\n const size = baseConfig.size ?? baseConfig.sizeRange\n\n result.size = {\n type: 'linear',\n range: Array.isArray(size) ? size : [size, size],\n } as IScatterChartSpec['size']\n\n result.sizeField = encoding?.size?.[0] || undefined\n\n return result\n}\n"],"names":["scatterSize","spec","context","result","advancedVSeed","chartType","encoding","baseConfig","hasSizeEncoding","size","Array","undefined"],"mappings":"AAGO,MAAMA,cAAwB,CAACC,MAAMC;IAC1C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,SAAS,EAAEC,QAAQ,EAAE,GAAGF;IAChC,MAAMG,aAAaH,cAAc,MAAM,CAACC,UAAU;IAIlD,MAAMG,kBAAkBF,UAAU,MAAM,CAAC,EAAE;IAC3C,IAAI,CAACE,iBACH,OAAOL;IAGT,MAAMM,OAAOF,WAAW,IAAI,IAAIA,WAAW,SAAS;IAEpDJ,OAAO,IAAI,GAAG;QACZ,MAAM;QACN,OAAOO,MAAM,OAAO,CAACD,QAAQA,OAAO;YAACA;YAAMA;SAAK;IAClD;IAEAN,OAAO,SAAS,GAAGG,UAAU,MAAM,CAAC,EAAE,IAAIK;IAE1C,OAAOR;AACT"}
@@ -1,6 +1,22 @@
1
1
  import type { VSeed } from '../../types';
2
2
  export declare const isTable: (vseed: VSeed) => vseed is import("../../types").Table;
3
3
  export declare const isPivotTable: (vseed: VSeed) => vseed is import("../../types").PivotTable;
4
+ export declare const isRadar: (vseed: VSeed) => vseed is import("../../types").Radar;
4
5
  export declare const isVTable: (vseed: VSeed) => boolean;
5
6
  export declare const isVChart: (vseed: VSeed) => boolean;
7
+ /**
8
+ * @description 透视图表或组合图
9
+ * - 透视图表定义: 存在 column 或 row的 encoding
10
+ * - 组合图表定义: 存在多组指标的情况
11
+ * - 透视组合图表: 存在 column 或 row的 encoding 且 存在多组指标的情况
12
+ * 上述三者都只能使用 VTable.PivotChart 绘制
13
+ */
6
14
  export declare const isPivotChart: (vseed: VSeed) => boolean | undefined;
15
+ /**
16
+ * @description 存在column 或 row的encoding
17
+ */
18
+ export declare const isPivot: (vseed: VSeed) => boolean;
19
+ /**
20
+ * @description 不存在column 或 row的encoding, 但是有多组指标的情况
21
+ */
22
+ export declare const isCombination: (vseed: VSeed) => boolean | undefined;
@@ -4,6 +4,7 @@ import { unique } from "remeda";
4
4
  import { DEFAULT_PARENT_ID } from "./constant.js";
5
5
  const isTable = (vseed)=>'table' === vseed.chartType;
6
6
  const isPivotTable = (vseed)=>'pivotTable' === vseed.chartType;
7
+ const isRadar = (vseed)=>'radar' === vseed.chartType;
7
8
  const isVTable = (vseed)=>[
8
9
  'table',
9
10
  'pivotTable'
@@ -11,14 +12,19 @@ const isVTable = (vseed)=>[
11
12
  const isVChart = (vseed)=>!isVTable(vseed);
12
13
  const isPivotChart = (vseed)=>{
13
14
  if (isVTable(vseed)) return false;
15
+ if (isPivot(vseed)) return true;
16
+ return isCombination(vseed);
17
+ };
18
+ const isPivot = (vseed)=>{
19
+ const { dimensions = [] } = vseed;
20
+ return dimensions && dimensions.some((dimension)=>'row' === dimension.encoding || 'column' === dimension.encoding);
21
+ };
22
+ const isCombination = (vseed)=>{
14
23
  if (isMeasureTreeWithParentId(vseed.measures)) {
15
24
  const parentIds = vseed.measures?.map((measure)=>measure.parentId || DEFAULT_PARENT_ID);
16
25
  return parentIds && unique(parentIds).length > 1;
17
26
  }
18
27
  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
28
  if ('scatter' === vseed.chartType) {
23
29
  if (isMeasureTreeWithChildren(vseed.measures)) {
24
30
  const depth = measureDepth(vseed.measures);
@@ -36,11 +42,10 @@ const isPivotChart = (vseed)=>{
36
42
  }
37
43
  return false;
38
44
  }
39
- const { measures = [], dimensions = [] } = vseed;
40
- const hasRowOrColumnDimension = dimensions && dimensions.some((dimension)=>'row' === dimension.encoding || 'column' === dimension.encoding);
45
+ const { measures = [] } = vseed;
41
46
  const hasMeasureGroup = measures && measures.some((measure)=>measure && measure.children);
42
- return hasRowOrColumnDimension || hasMeasureGroup;
47
+ return hasMeasureGroup;
43
48
  };
44
- export { isPivotChart, isPivotTable, isTable, isVChart, isVTable };
49
+ export { isCombination, isPivot, isPivotChart, isPivotTable, isRadar, isTable, isVChart, isVTable };
45
50
 
46
51
  //# 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,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,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, 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 isRadar = (vseed: VSeed) => {\n return vseed.chartType === 'radar'\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","isPivotTable","isRadar","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,AAAoB,YAApBA,MAAM,SAAS;AAEjB,MAAMC,eAAe,CAACD,QACpBA,AAAoB,iBAApBA,MAAM,SAAS;AAEjB,MAAME,UAAU,CAACF,QACfA,AAAoB,YAApBA,MAAM,SAAS;AAGjB,MAAMG,WAAW,CAACH,QAChB;QAAC;QAAS;KAAa,CAAC,QAAQ,CAACA,MAAM,SAAS;AAElD,MAAMI,WAAW,CAACJ,QAChB,CAACG,SAASH;AAUZ,MAAMK,eAAe,CAACL;IAC3B,IAAIG,SAASH,QACX,OAAO;IAGT,IAAIM,QAAQN,QACV,OAAO;IAGT,OAAOO,cAAcP;AACvB;AAKO,MAAMM,UAAU,CAACN;IACtB,MAAM,EAAEQ,aAAa,EAAE,EAAE,GAAGR;IAI5B,OAAO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xis: {
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,gBAAgB;QAChB,sBAAsBE;QACtB,iBAAiB;QACjB,2BAA2B;YAAC;YAAG;YAAK;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BACf;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;YACT,YAAY;YACZ,YAAY;YACZ,eAAe;YACf,iBAAiB;QACnB;QACA,OAAO;YACL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;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"}
@@ -286,7 +286,11 @@ const lightTheme = ()=>{
286
286
  visible: true
287
287
  }
288
288
  },
289
- crosshairLine
289
+ crosshairLine,
290
+ sizeRange: [
291
+ 8,
292
+ 24
293
+ ]
290
294
  },
291
295
  dualAxis: {
292
296
  ...baseConfig,