@visactor/vseed 0.1.39 → 0.1.41

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 (110) hide show
  1. package/dist/cjs/index.cjs +3 -3
  2. package/dist/cjs/index.cjs.map +1 -1
  3. package/dist/esm/builder/builder/builder.d.ts +3028 -286
  4. package/dist/esm/pipeline/advanced/chart/pipeline/column.js +3 -2
  5. package/dist/esm/pipeline/advanced/chart/pipeline/column.js.map +1 -1
  6. package/dist/esm/pipeline/advanced/chart/pipeline/scatter.js +3 -2
  7. package/dist/esm/pipeline/advanced/chart/pipeline/scatter.js.map +1 -1
  8. package/dist/esm/pipeline/advanced/chart/pipes/regressionLine/regressionLine.js +28 -1
  9. package/dist/esm/pipeline/advanced/chart/pipes/regressionLine/regressionLine.js.map +1 -1
  10. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithBoxplotEncoding.js +0 -1
  11. package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithBoxplotEncoding.js.map +1 -1
  12. package/dist/esm/pipeline/spec/chart/pipeline/column.js +5 -3
  13. package/dist/esm/pipeline/spec/chart/pipeline/column.js.map +1 -1
  14. package/dist/esm/pipeline/spec/chart/pipeline/histogram.js +5 -3
  15. package/dist/esm/pipeline/spec/chart/pipeline/histogram.js.map +1 -1
  16. package/dist/esm/pipeline/spec/chart/pipeline/scatter.js +9 -3
  17. package/dist/esm/pipeline/spec/chart/pipeline/scatter.js.map +1 -1
  18. package/dist/esm/pipeline/spec/chart/pipes/init/pivot.js +7 -2
  19. package/dist/esm/pipeline/spec/chart/pipes/init/pivot.js.map +1 -1
  20. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.js +3 -0
  21. package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.js.map +1 -1
  22. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/columnRegressionLine.d.ts +2 -0
  23. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/columnRegressionLine.js +150 -0
  24. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/columnRegressionLine.js.map +1 -0
  25. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/common.d.ts +4 -0
  26. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/common.js +21 -0
  27. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/common.js.map +1 -0
  28. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/ecdfRegressionLine.d.ts +2 -0
  29. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/ecdfRegressionLine.js +98 -0
  30. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/ecdfRegressionLine.js.map +1 -0
  31. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/index.d.ts +4 -1
  32. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/index.js +4 -1
  33. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/kdeRegressionLine.d.ts +2 -0
  34. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/kdeRegressionLine.js +98 -0
  35. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/kdeRegressionLine.js.map +1 -0
  36. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/linearRegressionLine.d.ts +16 -0
  37. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/linearRegressionLine.js +159 -0
  38. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/linearRegressionLine.js.map +1 -0
  39. package/dist/esm/theme/common/regressionLine.d.ts +8 -4
  40. package/dist/esm/theme/common/regressionLine.js +60 -8
  41. package/dist/esm/theme/common/regressionLine.js.map +1 -1
  42. package/dist/esm/theme/dark/dark.js +6 -4
  43. package/dist/esm/theme/dark/dark.js.map +1 -1
  44. package/dist/esm/theme/light/light.js +6 -4
  45. package/dist/esm/theme/light/light.js.map +1 -1
  46. package/dist/esm/types/advancedVSeed.d.ts +988 -37
  47. package/dist/esm/types/advancedVSeed.js +2 -2
  48. package/dist/esm/types/advancedVSeed.js.map +1 -1
  49. package/dist/esm/types/chartType/column/column.d.ts +6 -1
  50. package/dist/esm/types/chartType/column/zColumn.d.ts +25 -0
  51. package/dist/esm/types/chartType/column/zColumn.js +2 -1
  52. package/dist/esm/types/chartType/column/zColumn.js.map +1 -1
  53. package/dist/esm/types/chartType/histogram/histogram.d.ts +7 -3
  54. package/dist/esm/types/chartType/histogram/zHistogram.d.ts +19 -4
  55. package/dist/esm/types/chartType/histogram/zHistogram.js +3 -2
  56. package/dist/esm/types/chartType/histogram/zHistogram.js.map +1 -1
  57. package/dist/esm/types/chartType/scatter/scatter.d.ts +21 -1
  58. package/dist/esm/types/chartType/scatter/zScatter.d.ts +94 -0
  59. package/dist/esm/types/chartType/scatter/zScatter.js +5 -1
  60. package/dist/esm/types/chartType/scatter/zScatter.js.map +1 -1
  61. package/dist/esm/types/properties/config/area.d.ts +4 -0
  62. package/dist/esm/types/properties/config/bar.d.ts +6 -0
  63. package/dist/esm/types/properties/config/boxplot.d.ts +2 -0
  64. package/dist/esm/types/properties/config/column.d.ts +138 -2
  65. package/dist/esm/types/properties/config/column.js +6 -3
  66. package/dist/esm/types/properties/config/column.js.map +1 -1
  67. package/dist/esm/types/properties/config/config.d.ts +429 -9
  68. package/dist/esm/types/properties/config/dualAxis.d.ts +2 -0
  69. package/dist/esm/types/properties/config/funnel.d.ts +2 -0
  70. package/dist/esm/types/properties/config/heatmap.d.ts +2 -0
  71. package/dist/esm/types/properties/config/histogram.d.ts +131 -9
  72. package/dist/esm/types/properties/config/histogram.js +2 -2
  73. package/dist/esm/types/properties/config/histogram.js.map +1 -1
  74. package/dist/esm/types/properties/config/line.d.ts +2 -0
  75. package/dist/esm/types/properties/config/pie.d.ts +6 -0
  76. package/dist/esm/types/properties/config/pivotGrid/pivotGrid.d.ts +2 -0
  77. package/dist/esm/types/properties/config/pivotGrid/pivotGrid.js +3 -1
  78. package/dist/esm/types/properties/config/pivotGrid/pivotGrid.js.map +1 -1
  79. package/dist/esm/types/properties/config/rose.d.ts +4 -0
  80. package/dist/esm/types/properties/config/scatter.d.ts +132 -0
  81. package/dist/esm/types/properties/config/scatter.js +3 -1
  82. package/dist/esm/types/properties/config/scatter.js.map +1 -1
  83. package/dist/esm/types/properties/regressionLine/{histogramRegressionLine.d.ts → ecdfRegressionLine.d.ts} +2 -7
  84. package/dist/esm/types/properties/regressionLine/index.d.ts +7 -2
  85. package/dist/esm/types/properties/regressionLine/index.js +1 -1
  86. package/dist/esm/types/properties/regressionLine/kdeRegressionLine.d.ts +40 -0
  87. package/dist/esm/types/properties/regressionLine/kdeRegressionLine.js +0 -0
  88. package/dist/esm/types/properties/regressionLine/linearRegressionLine.d.ts +53 -0
  89. package/dist/esm/types/properties/regressionLine/linearRegressionLine.js +0 -0
  90. package/dist/esm/types/properties/regressionLine/logisticRegressionLine.d.ts +53 -0
  91. package/dist/esm/types/properties/regressionLine/logisticRegressionLine.js +0 -0
  92. package/dist/esm/types/properties/regressionLine/lowessRegressionLine.d.ts +53 -0
  93. package/dist/esm/types/properties/regressionLine/lowessRegressionLine.js +0 -0
  94. package/dist/esm/types/properties/regressionLine/polynomialRegressionLine.d.ts +57 -0
  95. package/dist/esm/types/properties/regressionLine/polynomialRegressionLine.js +0 -0
  96. package/dist/esm/types/properties/regressionLine/zRegressionLine.d.ts +199 -0
  97. package/dist/esm/types/properties/regressionLine/zRegressionLine.js +32 -0
  98. package/dist/esm/types/properties/regressionLine/zRegressionLine.js.map +1 -0
  99. package/dist/esm/types/properties/theme/customTheme.d.ts +858 -18
  100. package/dist/esm/types/zVseed.d.ts +138 -4
  101. package/dist/umd/index.js +1156 -134
  102. package/dist/umd/index.js.map +1 -1
  103. package/package.json +1 -1
  104. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/histogramRegressionLine.d.ts +0 -2
  105. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/histogramRegressionLine.js +0 -126
  106. package/dist/esm/pipeline/spec/chart/pipes/regressionLine/histogramRegressionLine.js.map +0 -1
  107. package/dist/esm/types/properties/regressionLine/zHistogramRegressionLine.d.ts +0 -11
  108. package/dist/esm/types/properties/regressionLine/zHistogramRegressionLine.js +0 -17
  109. package/dist/esm/types/properties/regressionLine/zHistogramRegressionLine.js.map +0 -1
  110. /package/dist/esm/types/properties/regressionLine/{histogramRegressionLine.js → ecdfRegressionLine.js} +0 -0
@@ -1,4 +1,4 @@
1
- import { annotation, buildMeasures, columnConfig, defaultDimensions, defaultEncodingForColumn, defaultMeasureName, defaultMeasures, deleteEncodingForMeasure, deleteTooltipAndLabelDimension, encodingAdapter, encodingForColumn, initAdvancedVSeed, markStyle, pivotAdapter, pivotReshapeWithEncoding, reshapeWithEncoding, sortLegend, sortXBandAxis, theme } from "../pipes/index.js";
1
+ import { annotation, buildMeasures, columnConfig, defaultDimensions, defaultEncodingForColumn, defaultMeasureName, defaultMeasures, deleteEncodingForMeasure, deleteTooltipAndLabelDimension, encodingAdapter, encodingForColumn, initAdvancedVSeed, markStyle, pivotAdapter, pivotReshapeWithEncoding, regressionLine, reshapeWithEncoding, sortLegend, sortXBandAxis, theme } from "../pipes/index.js";
2
2
  const columnAdvancedPipeline = [
3
3
  initAdvancedVSeed,
4
4
  defaultMeasures,
@@ -27,7 +27,8 @@ const columnAdvancedPipeline = [
27
27
  columnConfig,
28
28
  theme,
29
29
  markStyle,
30
- annotation
30
+ annotation,
31
+ regressionLine
31
32
  ];
32
33
  export { columnAdvancedPipeline };
33
34
 
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/advanced/chart/pipeline/column.js","sources":["webpack://@visactor/vseed/./src/pipeline/advanced/chart/pipeline/column.ts"],"sourcesContent":["import type { AdvancedPipeline } from 'src/types'\nimport {\n initAdvancedVSeed,\n theme,\n pivotAdapter,\n columnConfig,\n markStyle,\n annotation,\n sortXBandAxis,\n sortLegend,\n encodingForColumn,\n reshapeWithEncoding,\n pivotReshapeWithEncoding,\n buildMeasures,\n defaultMeasures,\n defaultDimensions,\n defaultMeasureName,\n encodingAdapter,\n defaultEncodingForColumn,\n deleteEncodingForMeasure,\n deleteTooltipAndLabelDimension,\n} from '../pipes'\n\nexport const columnAdvancedPipeline: AdvancedPipeline = [\n initAdvancedVSeed,\n defaultMeasures,\n defaultDimensions,\n defaultMeasureName,\n\n encodingAdapter(\n [defaultEncodingForColumn, buildMeasures],\n [\n encodingForColumn,\n buildMeasures,\n deleteEncodingForMeasure(['tooltip', 'label', 'color']),\n deleteTooltipAndLabelDimension,\n ],\n ),\n pivotAdapter([reshapeWithEncoding], [pivotReshapeWithEncoding]),\n\n sortXBandAxis,\n sortLegend,\n columnConfig,\n theme,\n markStyle,\n annotation,\n]\n"],"names":["columnAdvancedPipeline","initAdvancedVSeed","defaultMeasures","defaultDimensions","defaultMeasureName","encodingAdapter","defaultEncodingForColumn","buildMeasures","encodingForColumn","deleteEncodingForMeasure","deleteTooltipAndLabelDimension","pivotAdapter","reshapeWithEncoding","pivotReshapeWithEncoding","sortXBandAxis","sortLegend","columnConfig","theme","markStyle","annotation"],"mappings":";AAuBO,MAAMA,yBAA2C;IACtDC;IACAC;IACAC;IACAC;IAEAC,gBACE;QAACC;QAA0BC;KAAc,EACzC;QACEC;QACAD;QACAE,yBAAyB;YAAC;YAAW;YAAS;SAAQ;QACtDC;KACD;IAEHC,aAAa;QAACC;KAAoB,EAAE;QAACC;KAAyB;IAE9DC;IACAC;IACAC;IACAC;IACAC;IACAC;CACD"}
1
+ {"version":3,"file":"pipeline/advanced/chart/pipeline/column.js","sources":["webpack://@visactor/vseed/./src/pipeline/advanced/chart/pipeline/column.ts"],"sourcesContent":["import type { AdvancedPipeline } from 'src/types'\nimport {\n initAdvancedVSeed,\n theme,\n pivotAdapter,\n columnConfig,\n markStyle,\n annotation,\n sortXBandAxis,\n sortLegend,\n encodingForColumn,\n reshapeWithEncoding,\n pivotReshapeWithEncoding,\n buildMeasures,\n defaultMeasures,\n defaultDimensions,\n defaultMeasureName,\n encodingAdapter,\n defaultEncodingForColumn,\n deleteEncodingForMeasure,\n deleteTooltipAndLabelDimension,\n regressionLine,\n} from '../pipes'\n\nexport const columnAdvancedPipeline: AdvancedPipeline = [\n initAdvancedVSeed,\n defaultMeasures,\n defaultDimensions,\n defaultMeasureName,\n\n encodingAdapter(\n [defaultEncodingForColumn, buildMeasures],\n [\n encodingForColumn,\n buildMeasures,\n deleteEncodingForMeasure(['tooltip', 'label', 'color']),\n deleteTooltipAndLabelDimension,\n ],\n ),\n pivotAdapter([reshapeWithEncoding], [pivotReshapeWithEncoding]),\n\n sortXBandAxis,\n sortLegend,\n columnConfig,\n theme,\n markStyle,\n annotation,\n regressionLine,\n]\n"],"names":["columnAdvancedPipeline","initAdvancedVSeed","defaultMeasures","defaultDimensions","defaultMeasureName","encodingAdapter","defaultEncodingForColumn","buildMeasures","encodingForColumn","deleteEncodingForMeasure","deleteTooltipAndLabelDimension","pivotAdapter","reshapeWithEncoding","pivotReshapeWithEncoding","sortXBandAxis","sortLegend","columnConfig","theme","markStyle","annotation","regressionLine"],"mappings":";AAwBO,MAAMA,yBAA2C;IACtDC;IACAC;IACAC;IACAC;IAEAC,gBACE;QAACC;QAA0BC;KAAc,EACzC;QACEC;QACAD;QACAE,yBAAyB;YAAC;YAAW;YAAS;SAAQ;QACtDC;KACD;IAEHC,aAAa;QAACC;KAAoB,EAAE;QAACC;KAAyB;IAE9DC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;CACD"}
@@ -1,4 +1,4 @@
1
- import { annotation, buildMeasuresForScatter, defaultDimensions, defaultEncodingForScatter, defaultMeasureName, defaultMeasures, deleteEncodingForMeasure, deleteTooltipAndLabelDimension, encodingAdapter, encodingForScatter, initAdvancedVSeed, markStyle, pivotAdapter, scatterConfig, theme } from "../pipes/index.js";
1
+ import { annotation, buildMeasuresForScatter, defaultDimensions, defaultEncodingForScatter, defaultMeasureName, defaultMeasures, deleteEncodingForMeasure, deleteTooltipAndLabelDimension, encodingAdapter, encodingForScatter, initAdvancedVSeed, markStyle, pivotAdapter, regressionLine, scatterConfig, theme } from "../pipes/index.js";
2
2
  import { reshapeWithScatterEncoding } from "../pipes/reshape/reshapeWithScatterEncoding.js";
3
3
  import { pivotReshapeWithScatterEncoding } from "../pipes/reshape/pivotReshapeWithScatterEncoding.js";
4
4
  const scatterAdvancedPipeline = [
@@ -27,7 +27,8 @@ const scatterAdvancedPipeline = [
27
27
  scatterConfig,
28
28
  theme,
29
29
  markStyle,
30
- annotation
30
+ annotation,
31
+ regressionLine
31
32
  ];
32
33
  export { scatterAdvancedPipeline };
33
34
 
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/advanced/chart/pipeline/scatter.js","sources":["webpack://@visactor/vseed/./src/pipeline/advanced/chart/pipeline/scatter.ts"],"sourcesContent":["import type { AdvancedPipeline } from 'src/types'\nimport {\n initAdvancedVSeed,\n theme,\n pivotAdapter,\n annotation,\n markStyle,\n scatterConfig,\n encodingForScatter,\n buildMeasuresForScatter,\n defaultMeasures,\n defaultDimensions,\n defaultMeasureName,\n encodingAdapter,\n defaultEncodingForScatter,\n deleteEncodingForMeasure,\n deleteTooltipAndLabelDimension,\n} from '../pipes'\nimport { reshapeWithScatterEncoding } from '../pipes/reshape/reshapeWithScatterEncoding'\nimport { pivotReshapeWithScatterEncoding } from '../pipes/reshape/pivotReshapeWithScatterEncoding'\n\nexport const scatterAdvancedPipeline: AdvancedPipeline = [\n initAdvancedVSeed,\n defaultMeasures,\n defaultDimensions,\n defaultMeasureName,\n\n encodingAdapter(\n [defaultEncodingForScatter, buildMeasuresForScatter],\n [\n encodingForScatter,\n buildMeasuresForScatter,\n deleteEncodingForMeasure(['tooltip', 'label', 'size']),\n deleteTooltipAndLabelDimension,\n ],\n ),\n pivotAdapter([reshapeWithScatterEncoding], [pivotReshapeWithScatterEncoding]),\n\n scatterConfig,\n theme,\n markStyle,\n annotation,\n]\n"],"names":["scatterAdvancedPipeline","initAdvancedVSeed","defaultMeasures","defaultDimensions","defaultMeasureName","encodingAdapter","defaultEncodingForScatter","buildMeasuresForScatter","encodingForScatter","deleteEncodingForMeasure","deleteTooltipAndLabelDimension","pivotAdapter","reshapeWithScatterEncoding","pivotReshapeWithScatterEncoding","scatterConfig","theme","markStyle","annotation"],"mappings":";;;AAqBO,MAAMA,0BAA4C;IACvDC;IACAC;IACAC;IACAC;IAEAC,gBACE;QAACC;QAA2BC;KAAwB,EACpD;QACEC;QACAD;QACAE,yBAAyB;YAAC;YAAW;YAAS;SAAO;QACrDC;KACD;IAEHC,aAAa;QAACC;KAA2B,EAAE;QAACC;KAAgC;IAE5EC;IACAC;IACAC;IACAC;CACD"}
1
+ {"version":3,"file":"pipeline/advanced/chart/pipeline/scatter.js","sources":["webpack://@visactor/vseed/./src/pipeline/advanced/chart/pipeline/scatter.ts"],"sourcesContent":["import type { AdvancedPipeline } from 'src/types'\nimport {\n initAdvancedVSeed,\n theme,\n pivotAdapter,\n annotation,\n markStyle,\n scatterConfig,\n encodingForScatter,\n buildMeasuresForScatter,\n defaultMeasures,\n defaultDimensions,\n defaultMeasureName,\n encodingAdapter,\n defaultEncodingForScatter,\n deleteEncodingForMeasure,\n deleteTooltipAndLabelDimension,\n regressionLine,\n} from '../pipes'\nimport { reshapeWithScatterEncoding } from '../pipes/reshape/reshapeWithScatterEncoding'\nimport { pivotReshapeWithScatterEncoding } from '../pipes/reshape/pivotReshapeWithScatterEncoding'\n\nexport const scatterAdvancedPipeline: AdvancedPipeline = [\n initAdvancedVSeed,\n defaultMeasures,\n defaultDimensions,\n defaultMeasureName,\n\n encodingAdapter(\n [defaultEncodingForScatter, buildMeasuresForScatter],\n [\n encodingForScatter,\n buildMeasuresForScatter,\n deleteEncodingForMeasure(['tooltip', 'label', 'size']),\n deleteTooltipAndLabelDimension,\n ],\n ),\n pivotAdapter([reshapeWithScatterEncoding], [pivotReshapeWithScatterEncoding]),\n\n scatterConfig,\n theme,\n markStyle,\n annotation,\n regressionLine,\n]\n"],"names":["scatterAdvancedPipeline","initAdvancedVSeed","defaultMeasures","defaultDimensions","defaultMeasureName","encodingAdapter","defaultEncodingForScatter","buildMeasuresForScatter","encodingForScatter","deleteEncodingForMeasure","deleteTooltipAndLabelDimension","pivotAdapter","reshapeWithScatterEncoding","pivotReshapeWithScatterEncoding","scatterConfig","theme","markStyle","annotation","regressionLine"],"mappings":";;;AAsBO,MAAMA,0BAA4C;IACvDC;IACAC;IACAC;IACAC;IAEAC,gBACE;QAACC;QAA2BC;KAAwB,EACpD;QACEC;QACAD;QACAE,yBAAyB;YAAC;YAAW;YAAS;SAAO;QACrDC;KACD;IAEHC,aAAa;QAACC;KAA2B,EAAE;QAACC;KAAgC;IAE5EC;IACAC;IACAC;IACAC;IACAC;CACD"}
@@ -1,6 +1,33 @@
1
1
  const regressionLine = (advancedVSeed, context)=>{
2
2
  const { vseed } = context;
3
- if ('histogramRegressionLine' in vseed && 'histogram' === vseed.chartType) advancedVSeed.histogramRegressionLine = vseed.histogramRegressionLine;
3
+ let keys = [];
4
+ if ('histogram' === vseed.chartType) keys = [
5
+ 'kdeRegressionLine',
6
+ 'ecdfRegressionLine'
7
+ ];
8
+ else if ('scatter' === vseed.chartType) keys = [
9
+ 'linearRegressionLine',
10
+ 'lowessRegressionLine',
11
+ 'polynomialRegressionLine',
12
+ 'logisticRegressionLine'
13
+ ];
14
+ else if ('column' === vseed.chartType) keys = [
15
+ 'polynomialRegressionLine'
16
+ ];
17
+ if (keys.length) {
18
+ const regressionLineConfig = {};
19
+ let hasLine = false;
20
+ keys.forEach((key)=>{
21
+ if (vseed[key]) {
22
+ hasLine = true;
23
+ regressionLineConfig[key] = true === vseed[key] ? {} : vseed[key];
24
+ }
25
+ });
26
+ return hasLine ? {
27
+ ...advancedVSeed,
28
+ regressionLine: regressionLineConfig
29
+ } : advancedVSeed;
30
+ }
4
31
  return advancedVSeed;
5
32
  };
6
33
  export { regressionLine };
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/advanced/chart/pipes/regressionLine/regressionLine.js","sources":["webpack://@visactor/vseed/./src/pipeline/advanced/chart/pipes/regressionLine/regressionLine.ts"],"sourcesContent":["import type { AdvancedPipe } from 'src/types'\n\nexport const regressionLine: AdvancedPipe = (advancedVSeed, context) => {\n const { vseed } = context\n\n if ('histogramRegressionLine' in vseed && vseed.chartType === 'histogram') {\n advancedVSeed.histogramRegressionLine = vseed.histogramRegressionLine\n }\n\n return advancedVSeed\n}\n"],"names":["regressionLine","advancedVSeed","context","vseed"],"mappings":"AAEO,MAAMA,iBAA+B,CAACC,eAAeC;IAC1D,MAAM,EAAEC,KAAK,EAAE,GAAGD;IAElB,IAAI,6BAA6BC,SAASA,AAAoB,gBAApBA,MAAM,SAAS,EACvDF,cAAc,uBAAuB,GAAGE,MAAM,uBAAuB;IAGvE,OAAOF;AACT"}
1
+ {"version":3,"file":"pipeline/advanced/chart/pipes/regressionLine/regressionLine.js","sources":["webpack://@visactor/vseed/./src/pipeline/advanced/chart/pipes/regressionLine/regressionLine.ts"],"sourcesContent":["import type { AdvancedPipe, RegressionLineConfig } from 'src/types'\n\nexport const regressionLine: AdvancedPipe = (advancedVSeed, context) => {\n const { vseed } = context\n let keys = [] as string[]\n\n if (vseed.chartType === 'histogram') {\n keys = ['kdeRegressionLine', 'ecdfRegressionLine']\n } else if (vseed.chartType === 'scatter') {\n keys = ['linearRegressionLine', 'lowessRegressionLine', 'polynomialRegressionLine', 'logisticRegressionLine']\n } else if (vseed.chartType === 'column') {\n keys = ['polynomialRegressionLine']\n }\n\n if (keys.length) {\n const regressionLineConfig: RegressionLineConfig = {}\n let hasLine = false\n\n keys.forEach((key: string) => {\n if ((vseed as any)[key]) {\n hasLine = true\n regressionLineConfig[key as keyof RegressionLineConfig] =\n (vseed as any)[key] === true ? {} : (vseed as any)[key]\n }\n })\n\n return hasLine\n ? {\n ...advancedVSeed,\n regressionLine: regressionLineConfig,\n }\n : advancedVSeed\n }\n\n return advancedVSeed\n}\n"],"names":["regressionLine","advancedVSeed","context","vseed","keys","regressionLineConfig","hasLine","key"],"mappings":"AAEO,MAAMA,iBAA+B,CAACC,eAAeC;IAC1D,MAAM,EAAEC,KAAK,EAAE,GAAGD;IAClB,IAAIE,OAAO,EAAE;IAEb,IAAID,AAAoB,gBAApBA,MAAM,SAAS,EACjBC,OAAO;QAAC;QAAqB;KAAqB;SAC7C,IAAID,AAAoB,cAApBA,MAAM,SAAS,EACxBC,OAAO;QAAC;QAAwB;QAAwB;QAA4B;KAAyB;SACxG,IAAID,AAAoB,aAApBA,MAAM,SAAS,EACxBC,OAAO;QAAC;KAA2B;IAGrC,IAAIA,KAAK,MAAM,EAAE;QACf,MAAMC,uBAA6C,CAAC;QACpD,IAAIC,UAAU;QAEdF,KAAK,OAAO,CAAC,CAACG;YACZ,IAAKJ,KAAa,CAACI,IAAI,EAAE;gBACvBD,UAAU;gBACVD,oBAAoB,CAACE,IAAkC,GACpDJ,AAAuB,SAAvBA,KAAa,CAACI,IAAI,GAAY,CAAC,IAAKJ,KAAa,CAACI,IAAI;YAC3D;QACF;QAEA,OAAOD,UACH;YACE,GAAGL,aAAa;YAChB,gBAAgBI;QAClB,IACAJ;IACN;IAEA,OAAOA;AACT"}
@@ -84,7 +84,6 @@ const pivotReshapeWithBoxplotEncoding = (advancedVSeed, context)=>{
84
84
  datasets.push(newDatasets);
85
85
  datasetReshapeInfo.push(reshapeInfo);
86
86
  });
87
- console.log(datasets);
88
87
  return {
89
88
  ...result,
90
89
  dataset: datasets,
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/advanced/chart/pipes/reshape/pivotReshapeWithBoxplotEncoding.js","sources":["webpack://@visactor/vseed/./src/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithBoxplotEncoding.ts"],"sourcesContent":["import { boxplot } from '@visactor/vdataset'\nimport { uniqueBy } from 'remeda'\nimport {\n FoldMeasureId,\n FoldMeasureName,\n MaxMeasureId,\n MedianMeasureId,\n MinMeasureId,\n OutliersMeasureId,\n Q1MeasureValue,\n Q3MeasureValue,\n Separator,\n unfoldDimensions,\n} from 'src/dataReshape'\nimport type {\n AdvancedPipe,\n ColumnParallel,\n Dataset,\n DatasetReshapeInfo,\n Dimension,\n Encoding,\n MeasureGroup,\n} from 'src/types'\n\nexport const pivotReshapeWithBoxplotEncoding: AdvancedPipe = (advancedVSeed, context) => {\n const result = { ...advancedVSeed }\n const { vseed } = context\n const { dataset, chartType } = vseed as ColumnParallel\n const { dimensions = [], measures = [], encoding = {}, config } = advancedVSeed\n const uniqDims = uniqueBy(dimensions, (item: Dimension) => item.id)\n const chartConfig = config?.[chartType as 'boxPlot']\n const whiskers = chartConfig?.whiskers\n\n const measureGroups: MeasureGroup[] = []\n if (measures) {\n measures.forEach((measure: MeasureGroup) => {\n if (measure.children && measure.children.length > 0) {\n measureGroups.push(measure)\n }\n })\n }\n\n const rowColumnFields = uniqueBy(\n dimensions.filter((dim: Dimension) => dim.encoding === 'row' || dim.encoding === 'column'),\n (item: Dimension) => item.id,\n )\n const datasets: Dataset = []\n const datasetReshapeInfo: DatasetReshapeInfo = []\n\n measureGroups.forEach((measureGroup, index) => {\n const subMeasures = measureGroup.children\n if (!subMeasures) {\n return\n }\n const groupId = measureGroup.id\n let newDatasets: any[] = []\n let foldInfo: any = {}\n let unfoldInfo: any = {}\n\n if (encoding.value?.length) {\n encoding.value.forEach((f) => {\n const m = subMeasures.find((m) => m.id === f)\n const boxPlotData = boxplot(dataset, {\n field: f,\n groupField: [\n ...(encoding.x ?? []),\n ...(encoding.color ?? []),\n ...rowColumnFields.map((item: Dimension) => item.id),\n ] as string[],\n whiskers,\n outputNames: {\n q1: Q1MeasureValue,\n q3: Q3MeasureValue,\n min: MinMeasureId,\n max: MaxMeasureId,\n median: MedianMeasureId,\n outliers: OutliersMeasureId,\n },\n }) as Dataset\n\n boxPlotData.forEach((datum) => {\n datum[FoldMeasureId] = f\n datum[FoldMeasureName] = m?.alias ?? f\n })\n\n const res = unfoldDimensions(boxPlotData, uniqDims, encoding as Encoding, {\n foldMeasureId: FoldMeasureId,\n separator: Separator,\n colorItemAsId: false,\n })\n\n res.dataset.forEach((d) => {\n newDatasets.push(d)\n })\n unfoldInfo = res.unfoldInfo\n })\n } else if (\n encoding.q1?.length &&\n encoding.q3?.length &&\n encoding.min?.length &&\n encoding.max?.length &&\n encoding.median?.length\n ) {\n const res = unfoldDimensions(dataset, uniqDims, encoding as Encoding, {\n foldMeasureId: FoldMeasureId,\n separator: Separator,\n colorItemAsId: false,\n })\n\n res.dataset.forEach((datum) => {\n datum[MaxMeasureId] = datum[encoding.max![0]]\n datum[MinMeasureId] = datum[encoding.min![0]]\n datum[Q1MeasureValue] = datum[encoding.q1![0]]\n datum[Q3MeasureValue] = datum[encoding.q3![0]]\n datum[MedianMeasureId] = datum[encoding.median![0]]\n })\n\n newDatasets = res.dataset\n foldInfo = {}\n unfoldInfo = res.unfoldInfo\n }\n\n const reshapeInfo = {\n id: groupId,\n index,\n foldInfo,\n unfoldInfo,\n }\n datasets.push(newDatasets)\n datasetReshapeInfo.push(reshapeInfo)\n })\n\n console.log(datasets)\n\n return {\n ...result,\n dataset: datasets,\n datasetReshapeInfo: datasetReshapeInfo,\n }\n}\n"],"names":["pivotReshapeWithBoxplotEncoding","advancedVSeed","context","result","vseed","dataset","chartType","dimensions","measures","encoding","config","uniqDims","uniqueBy","item","chartConfig","whiskers","measureGroups","measure","rowColumnFields","dim","datasets","datasetReshapeInfo","measureGroup","index","subMeasures","groupId","newDatasets","foldInfo","unfoldInfo","f","m","boxPlotData","boxplot","Q1MeasureValue","Q3MeasureValue","MinMeasureId","MaxMeasureId","MedianMeasureId","OutliersMeasureId","datum","FoldMeasureId","FoldMeasureName","res","unfoldDimensions","Separator","d","reshapeInfo","console"],"mappings":";;;AAwBO,MAAMA,kCAAgD,CAACC,eAAeC;IAC3E,MAAMC,SAAS;QAAE,GAAGF,aAAa;IAAC;IAClC,MAAM,EAAEG,KAAK,EAAE,GAAGF;IAClB,MAAM,EAAEG,OAAO,EAAEC,SAAS,EAAE,GAAGF;IAC/B,MAAM,EAAEG,aAAa,EAAE,EAAEC,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AQ,GAAG,CAAC3B;IAEZ,OAAO;QACL,GAAGjB,MAAM;QACT,SAASiB;QACT,oBAAoBC;IACtB;AACF"}
1
+ {"version":3,"file":"pipeline/advanced/chart/pipes/reshape/pivotReshapeWithBoxplotEncoding.js","sources":["webpack://@visactor/vseed/./src/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithBoxplotEncoding.ts"],"sourcesContent":["import { boxplot } from '@visactor/vdataset'\nimport { uniqueBy } from 'remeda'\nimport {\n FoldMeasureId,\n FoldMeasureName,\n MaxMeasureId,\n MedianMeasureId,\n MinMeasureId,\n OutliersMeasureId,\n Q1MeasureValue,\n Q3MeasureValue,\n Separator,\n unfoldDimensions,\n} from 'src/dataReshape'\nimport type {\n AdvancedPipe,\n ColumnParallel,\n Dataset,\n DatasetReshapeInfo,\n Dimension,\n Encoding,\n MeasureGroup,\n} from 'src/types'\n\nexport const pivotReshapeWithBoxplotEncoding: AdvancedPipe = (advancedVSeed, context) => {\n const result = { ...advancedVSeed }\n const { vseed } = context\n const { dataset, chartType } = vseed as ColumnParallel\n const { dimensions = [], measures = [], encoding = {}, config } = advancedVSeed\n const uniqDims = uniqueBy(dimensions, (item: Dimension) => item.id)\n const chartConfig = config?.[chartType as 'boxPlot']\n const whiskers = chartConfig?.whiskers\n\n const measureGroups: MeasureGroup[] = []\n if (measures) {\n measures.forEach((measure: MeasureGroup) => {\n if (measure.children && measure.children.length > 0) {\n measureGroups.push(measure)\n }\n })\n }\n\n const rowColumnFields = uniqueBy(\n dimensions.filter((dim: Dimension) => dim.encoding === 'row' || dim.encoding === 'column'),\n (item: Dimension) => item.id,\n )\n const datasets: Dataset = []\n const datasetReshapeInfo: DatasetReshapeInfo = []\n\n measureGroups.forEach((measureGroup, index) => {\n const subMeasures = measureGroup.children\n if (!subMeasures) {\n return\n }\n const groupId = measureGroup.id\n let newDatasets: any[] = []\n let foldInfo: any = {}\n let unfoldInfo: any = {}\n\n if (encoding.value?.length) {\n encoding.value.forEach((f) => {\n const m = subMeasures.find((m) => m.id === f)\n const boxPlotData = boxplot(dataset, {\n field: f,\n groupField: [\n ...(encoding.x ?? []),\n ...(encoding.color ?? []),\n ...rowColumnFields.map((item: Dimension) => item.id),\n ] as string[],\n whiskers,\n outputNames: {\n q1: Q1MeasureValue,\n q3: Q3MeasureValue,\n min: MinMeasureId,\n max: MaxMeasureId,\n median: MedianMeasureId,\n outliers: OutliersMeasureId,\n },\n }) as Dataset\n\n boxPlotData.forEach((datum) => {\n datum[FoldMeasureId] = f\n datum[FoldMeasureName] = m?.alias ?? f\n })\n\n const res = unfoldDimensions(boxPlotData, uniqDims, encoding as Encoding, {\n foldMeasureId: FoldMeasureId,\n separator: Separator,\n colorItemAsId: false,\n })\n\n res.dataset.forEach((d) => {\n newDatasets.push(d)\n })\n unfoldInfo = res.unfoldInfo\n })\n } else if (\n encoding.q1?.length &&\n encoding.q3?.length &&\n encoding.min?.length &&\n encoding.max?.length &&\n encoding.median?.length\n ) {\n const res = unfoldDimensions(dataset, uniqDims, encoding as Encoding, {\n foldMeasureId: FoldMeasureId,\n separator: Separator,\n colorItemAsId: false,\n })\n\n res.dataset.forEach((datum) => {\n datum[MaxMeasureId] = datum[encoding.max![0]]\n datum[MinMeasureId] = datum[encoding.min![0]]\n datum[Q1MeasureValue] = datum[encoding.q1![0]]\n datum[Q3MeasureValue] = datum[encoding.q3![0]]\n datum[MedianMeasureId] = datum[encoding.median![0]]\n })\n\n newDatasets = res.dataset\n foldInfo = {}\n unfoldInfo = res.unfoldInfo\n }\n\n const reshapeInfo = {\n id: groupId,\n index,\n foldInfo,\n unfoldInfo,\n }\n datasets.push(newDatasets)\n datasetReshapeInfo.push(reshapeInfo)\n })\n\n return {\n ...result,\n dataset: datasets,\n datasetReshapeInfo: datasetReshapeInfo,\n }\n}\n"],"names":["pivotReshapeWithBoxplotEncoding","advancedVSeed","context","result","vseed","dataset","chartType","dimensions","measures","encoding","config","uniqDims","uniqueBy","item","chartConfig","whiskers","measureGroups","measure","rowColumnFields","dim","datasets","datasetReshapeInfo","measureGroup","index","subMeasures","groupId","newDatasets","foldInfo","unfoldInfo","f","m","boxPlotData","boxplot","Q1MeasureValue","Q3MeasureValue","MinMeasureId","MaxMeasureId","MedianMeasureId","OutliersMeasureId","datum","FoldMeasureId","FoldMeasureName","res","unfoldDimensions","Separator","d","reshapeInfo"],"mappings":";;;AAwBO,MAAMA,kCAAgD,CAACC,eAAeC;IAC3E,MAAMC,SAAS;QAAE,GAAGF,aAAa;IAAC;IAClC,MAAM,EAAEG,KAAK,EAAE,GAAGF;IAClB,MAAM,EAAEG,OAAO,EAAEC,SAAS,EAAE,GAAGF;IAC/B,MAAM,EAAEG,aAAa,EAAE,EAAEC,WAAW,EAAE,EAAEC,WAAW,CAAC,CAAC,EAAEC,MAAM,EAAE,GAAGT;IAClE,MAAMU,WAAWC,SAASL,YAAY,CAACM,OAAoBA,KAAK,EAAE;IAClE,MAAMC,cAAcJ,QAAQ,CAACJ,UAAuB;IACpD,MAAMS,WAAWD,aAAa;IAE9B,MAAME,gBAAgC,EAAE;IACxC,IAAIR,UACFA,SAAS,OAAO,CAAC,CAACS;QAChB,IAAIA,QAAQ,QAAQ,IAAIA,QAAQ,QAAQ,CAAC,MAAM,GAAG,GAChDD,cAAc,IAAI,CAACC;IAEvB;IAGF,MAAMC,kBAAkBN,SACtBL,WAAW,MAAM,CAAC,CAACY,MAAmBA,AAAiB,UAAjBA,IAAI,QAAQ,IAAcA,AAAiB,aAAjBA,IAAI,QAAQ,GAC5E,CAACN,OAAoBA,KAAK,EAAE;IAE9B,MAAMO,WAAoB,EAAE;IAC5B,MAAMC,qBAAyC,EAAE;IAEjDL,cAAc,OAAO,CAAC,CAACM,cAAcC;QACnC,MAAMC,cAAcF,aAAa,QAAQ;QACzC,IAAI,CAACE,aACH;QAEF,MAAMC,UAAUH,aAAa,EAAE;QAC/B,IAAII,cAAqB,EAAE;QAC3B,IAAIC,WAAgB,CAAC;QACrB,IAAIC,aAAkB,CAAC;QAEvB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ACN,eAAe,GAAGM,KAAK,CAAC9B,SAAS,EAAG,CAAC,EAAE,CAAC;gBAC9C8B,KAAK,CAACL,eAAe,GAAGK,KAAK,CAAC9B,SAAS,EAAG,CAAC,EAAE,CAAC;gBAC9C8B,KAAK,CAACF,gBAAgB,GAAGE,KAAK,CAAC9B,SAAS,MAAO,CAAC,EAAE,CAAC;YACrD;YAEAiB,cAAcgB,IAAI,OAAO;YACzBf,WAAW,CAAC;YACZC,aAAac,IAAI,UAAU;QAC7B;QAEA,MAAMI,cAAc;YAClB,IAAIrB;YACJF;YACAI;YACAC;QACF;QACAR,SAAS,IAAI,CAACM;QACdL,mBAAmB,IAAI,CAACyB;IAC1B;IAEA,OAAO;QACL,GAAG3C,MAAM;QACT,SAASiB;QACT,oBAAoBC;IACtB;AACF"}
@@ -1,4 +1,4 @@
1
- import { annotationAreaBand, annotationHorizontalLine, annotationPoint, annotationVerticalLine, backgroundColor, barMaxWidth, barStyle, color, colorAdapter, colorBarStyleFill, colorLegend, datasetPivot, datasetXY, discreteLegend, initColumn, initPivot, label, linearColor, pivotAdapter, pivotColorLegend, pivotColumnDimensions, pivotDiscreteLegend, pivotGridStyle, pivotIndicators, pivotIndicatorsAsRow, pivotRowDimensions, progressive, stackCornerRadius, stackInverse, tooltip, verticalCrosshairRect, xBand, yLinear } from "../pipes/index.js";
1
+ import { annotationAreaBand, annotationHorizontalLine, annotationPoint, annotationVerticalLine, backgroundColor, barMaxWidth, barStyle, color, colorAdapter, colorBarStyleFill, colorLegend, columnPolynomialRegressionLine, datasetPivot, datasetXY, discreteLegend, initColumn, initPivot, label, linearColor, pivotAdapter, pivotColorLegend, pivotColumnDimensions, pivotDiscreteLegend, pivotGridStyle, pivotIndicators, pivotIndicatorsAsRow, pivotRowDimensions, progressive, stackCornerRadius, stackInverse, tooltip, verticalCrosshairRect, xBand, yLinear } from "../pipes/index.js";
2
2
  const column = [
3
3
  initColumn,
4
4
  stackCornerRadius,
@@ -18,7 +18,8 @@ const column = [
18
18
  annotationPoint,
19
19
  annotationVerticalLine,
20
20
  annotationHorizontalLine,
21
- annotationAreaBand
21
+ annotationAreaBand,
22
+ columnPolynomialRegressionLine
22
23
  ];
23
24
  const pivotColumn = [
24
25
  initPivot,
@@ -42,7 +43,8 @@ const pivotColumn = [
42
43
  annotationPoint,
43
44
  annotationVerticalLine,
44
45
  annotationHorizontalLine,
45
- annotationAreaBand
46
+ annotationAreaBand,
47
+ columnPolynomialRegressionLine
46
48
  ]),
47
49
  pivotRowDimensions,
48
50
  pivotColumnDimensions,
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipeline/column.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/column.ts"],"sourcesContent":["import type { SpecPipeline } from 'src/types'\nimport {\n initColumn,\n datasetXY,\n xBand,\n yLinear,\n backgroundColor,\n label,\n tooltip,\n discreteLegend,\n color,\n pivotAdapter,\n initPivot,\n datasetPivot,\n pivotIndicators,\n pivotDiscreteLegend,\n pivotIndicatorsAsRow,\n pivotGridStyle,\n pivotRowDimensions,\n pivotColumnDimensions,\n stackInverse,\n barStyle,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationAreaBand,\n verticalCrosshairRect,\n stackCornerRadius,\n progressive,\n colorAdapter,\n linearColor,\n colorLegend,\n colorBarStyleFill,\n pivotColorLegend,\n barMaxWidth,\n} from '../pipes'\n\nconst column: SpecPipeline = [\n initColumn,\n stackCornerRadius,\n barMaxWidth,\n stackInverse,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n xBand,\n yLinear,\n label,\n tooltip,\n verticalCrosshairRect,\n colorAdapter(discreteLegend, colorLegend),\n colorBarStyleFill(barStyle),\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationAreaBand,\n]\n\nconst pivotColumn: SpecPipeline = [\n initPivot,\n pivotGridStyle,\n pivotIndicatorsAsRow,\n datasetPivot,\n pivotIndicators([\n initColumn,\n stackCornerRadius,\n stackInverse,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n xBand,\n yLinear,\n label,\n tooltip,\n verticalCrosshairRect,\n colorBarStyleFill(barStyle),\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationAreaBand,\n ]),\n pivotRowDimensions,\n pivotColumnDimensions,\n colorAdapter(pivotDiscreteLegend, pivotColorLegend),\n]\n\nexport const columnSpecPipeline = [pivotAdapter(column, pivotColumn)]\n"],"names":["column","initColumn","stackCornerRadius","barMaxWidth","stackInverse","colorAdapter","color","linearColor","backgroundColor","datasetXY","progressive","xBand","yLinear","label","tooltip","verticalCrosshairRect","discreteLegend","colorLegend","colorBarStyleFill","barStyle","annotationPoint","annotationVerticalLine","annotationHorizontalLine","annotationAreaBand","pivotColumn","initPivot","pivotGridStyle","pivotIndicatorsAsRow","datasetPivot","pivotIndicators","pivotRowDimensions","pivotColumnDimensions","pivotDiscreteLegend","pivotColorLegend","columnSpecPipeline","pivotAdapter"],"mappings":";AAqCA,MAAMA,SAAuB;IAC3BC;IACAC;IACAC;IACAC;IACAC,aAAaC,OAAOC;IACpBC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAV,aAAaW,gBAAgBC;IAC7BC,kBAAkBC;IAClBC;IACAC;IACAC;IACAC;CACD;AAED,MAAMC,cAA4B;IAChCC;IACAC;IACAC;IACAC;IACAC,gBAAgB;QACd5B;QACAC;QACAE;QACAC,aAAaC,OAAOC;QACpBC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAG,kBAAkBC;QAClBC;QACAC;QACAC;QACAC;KACD;IACDO;IACAC;IACA1B,aAAa2B,qBAAqBC;CACnC;AAEM,MAAMC,qBAAqB;IAACC,aAAanC,QAAQwB;CAAa"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipeline/column.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/column.ts"],"sourcesContent":["import type { SpecPipeline } from 'src/types'\nimport {\n initColumn,\n datasetXY,\n xBand,\n yLinear,\n backgroundColor,\n label,\n tooltip,\n discreteLegend,\n color,\n pivotAdapter,\n initPivot,\n datasetPivot,\n pivotIndicators,\n pivotDiscreteLegend,\n pivotIndicatorsAsRow,\n pivotGridStyle,\n pivotRowDimensions,\n pivotColumnDimensions,\n stackInverse,\n barStyle,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationAreaBand,\n verticalCrosshairRect,\n stackCornerRadius,\n progressive,\n colorAdapter,\n linearColor,\n colorLegend,\n colorBarStyleFill,\n pivotColorLegend,\n barMaxWidth,\n columnPolynomialRegressionLine,\n} from '../pipes'\n\nconst column: SpecPipeline = [\n initColumn,\n stackCornerRadius,\n barMaxWidth,\n stackInverse,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n xBand,\n yLinear,\n label,\n tooltip,\n verticalCrosshairRect,\n colorAdapter(discreteLegend, colorLegend),\n colorBarStyleFill(barStyle),\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationAreaBand,\n columnPolynomialRegressionLine,\n]\n\nconst pivotColumn: SpecPipeline = [\n initPivot,\n pivotGridStyle,\n pivotIndicatorsAsRow,\n datasetPivot,\n pivotIndicators([\n initColumn,\n stackCornerRadius,\n stackInverse,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetXY,\n progressive,\n xBand,\n yLinear,\n label,\n tooltip,\n verticalCrosshairRect,\n colorBarStyleFill(barStyle),\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationAreaBand,\n columnPolynomialRegressionLine,\n ]),\n pivotRowDimensions,\n pivotColumnDimensions,\n colorAdapter(pivotDiscreteLegend, pivotColorLegend),\n]\n\nexport const columnSpecPipeline = [pivotAdapter(column, pivotColumn)]\n"],"names":["column","initColumn","stackCornerRadius","barMaxWidth","stackInverse","colorAdapter","color","linearColor","backgroundColor","datasetXY","progressive","xBand","yLinear","label","tooltip","verticalCrosshairRect","discreteLegend","colorLegend","colorBarStyleFill","barStyle","annotationPoint","annotationVerticalLine","annotationHorizontalLine","annotationAreaBand","columnPolynomialRegressionLine","pivotColumn","initPivot","pivotGridStyle","pivotIndicatorsAsRow","datasetPivot","pivotIndicators","pivotRowDimensions","pivotColumnDimensions","pivotDiscreteLegend","pivotColorLegend","columnSpecPipeline","pivotAdapter"],"mappings":";AAsCA,MAAMA,SAAuB;IAC3BC;IACAC;IACAC;IACAC;IACAC,aAAaC,OAAOC;IACpBC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAV,aAAaW,gBAAgBC;IAC7BC,kBAAkBC;IAClBC;IACAC;IACAC;IACAC;IACAC;CACD;AAED,MAAMC,cAA4B;IAChCC;IACAC;IACAC;IACAC;IACAC,gBAAgB;QACd7B;QACAC;QACAE;QACAC,aAAaC,OAAOC;QACpBC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAG,kBAAkBC;QAClBC;QACAC;QACAC;QACAC;QACAC;KACD;IACDO;IACAC;IACA3B,aAAa4B,qBAAqBC;CACnC;AAEM,MAAMC,qBAAqB;IAACC,aAAapC,QAAQyB;CAAa"}
@@ -1,4 +1,4 @@
1
- import { annotationAreaBand, annotationHorizontalLine, annotationPoint, annotationVerticalLine, backgroundColor, barStyle, color, colorAdapter, colorBarStyleFill, colorLegend, datasetHistogram, datasetPivot, discreteLegend, histogramRegressionLine, initHistogram, initPivot, label, linearColor, pivotAdapter, pivotColorLegend, pivotColumnDimensions, pivotDiscreteLegend, pivotGridStyle, pivotIndicators, pivotRowDimensions, progressive, tooltipHistogram, verticalCrosshairRect, xLinear, yLinear } from "../pipes/index.js";
1
+ import { annotationAreaBand, annotationHorizontalLine, annotationPoint, annotationVerticalLine, backgroundColor, barStyle, color, colorAdapter, colorBarStyleFill, colorLegend, datasetHistogram, datasetPivot, discreteLegend, ecdfRegressionLine, initHistogram, initPivot, kdeRegressionLine, label, linearColor, pivotAdapter, pivotColorLegend, pivotColumnDimensions, pivotDiscreteLegend, pivotGridStyle, pivotIndicators, pivotRowDimensions, progressive, tooltipHistogram, verticalCrosshairRect, xLinear, yLinear } from "../pipes/index.js";
2
2
  const histogram = [
3
3
  initHistogram,
4
4
  colorAdapter(color, linearColor),
@@ -16,7 +16,8 @@ const histogram = [
16
16
  annotationVerticalLine,
17
17
  annotationHorizontalLine,
18
18
  annotationAreaBand,
19
- histogramRegressionLine
19
+ kdeRegressionLine,
20
+ ecdfRegressionLine
20
21
  ];
21
22
  const pivotHistogram = [
22
23
  initPivot,
@@ -38,7 +39,8 @@ const pivotHistogram = [
38
39
  annotationVerticalLine,
39
40
  annotationHorizontalLine,
40
41
  annotationAreaBand,
41
- histogramRegressionLine
42
+ kdeRegressionLine,
43
+ ecdfRegressionLine
42
44
  ]),
43
45
  pivotRowDimensions,
44
46
  pivotColumnDimensions,
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipeline/histogram.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/histogram.ts"],"sourcesContent":["import type { SpecPipeline } from 'src/types'\nimport {\n xLinear,\n backgroundColor,\n label,\n discreteLegend,\n color,\n pivotAdapter,\n initPivot,\n datasetPivot,\n pivotIndicators,\n pivotDiscreteLegend,\n pivotGridStyle,\n pivotColumnDimensions,\n pivotRowDimensions,\n barStyle,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationAreaBand,\n datasetHistogram,\n progressive,\n colorAdapter,\n linearColor,\n colorLegend,\n colorBarStyleFill,\n pivotColorLegend,\n initHistogram,\n yLinear,\n verticalCrosshairRect,\n tooltipHistogram,\n histogramRegressionLine,\n} from '../pipes'\n\nconst histogram: SpecPipeline = [\n initHistogram,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetHistogram,\n progressive,\n xLinear,\n yLinear,\n label,\n tooltipHistogram,\n colorAdapter(discreteLegend, colorLegend),\n verticalCrosshairRect,\n colorBarStyleFill(barStyle),\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationAreaBand,\n histogramRegressionLine,\n]\n\nconst pivotHistogram: SpecPipeline = [\n initPivot,\n pivotGridStyle,\n datasetPivot,\n pivotIndicators([\n initHistogram,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetHistogram,\n progressive,\n xLinear,\n yLinear,\n label,\n tooltipHistogram,\n colorBarStyleFill(barStyle),\n verticalCrosshairRect,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationAreaBand,\n histogramRegressionLine,\n ]),\n pivotRowDimensions,\n pivotColumnDimensions,\n colorAdapter(pivotDiscreteLegend, pivotColorLegend),\n]\n\nexport const histogramSpecPipeline: SpecPipeline = [pivotAdapter(histogram, pivotHistogram)]\n"],"names":["histogram","initHistogram","colorAdapter","color","linearColor","backgroundColor","datasetHistogram","progressive","xLinear","yLinear","label","tooltipHistogram","discreteLegend","colorLegend","verticalCrosshairRect","colorBarStyleFill","barStyle","annotationPoint","annotationVerticalLine","annotationHorizontalLine","annotationAreaBand","histogramRegressionLine","pivotHistogram","initPivot","pivotGridStyle","datasetPivot","pivotIndicators","pivotRowDimensions","pivotColumnDimensions","pivotDiscreteLegend","pivotColorLegend","histogramSpecPipeline","pivotAdapter"],"mappings":";AAkCA,MAAMA,YAA0B;IAC9BC;IACAC,aAAaC,OAAOC;IACpBC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAT,aAAaU,gBAAgBC;IAC7BC;IACAC,kBAAkBC;IAClBC;IACAC;IACAC;IACAC;IACAC;CACD;AAED,MAAMC,iBAA+B;IACnCC;IACAC;IACAC;IACAC,gBAAgB;QACdzB;QACAC,aAAaC,OAAOC;QACpBC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAI,kBAAkBC;QAClBF;QACAG;QACAC;QACAC;QACAC;QACAC;KACD;IACDM;IACAC;IACA1B,aAAa2B,qBAAqBC;CACnC;AAEM,MAAMC,wBAAsC;IAACC,aAAahC,WAAWsB;CAAgB"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipeline/histogram.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/histogram.ts"],"sourcesContent":["import type { SpecPipeline } from 'src/types'\nimport {\n xLinear,\n backgroundColor,\n label,\n discreteLegend,\n color,\n pivotAdapter,\n initPivot,\n datasetPivot,\n pivotIndicators,\n pivotDiscreteLegend,\n pivotGridStyle,\n pivotColumnDimensions,\n pivotRowDimensions,\n barStyle,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationAreaBand,\n datasetHistogram,\n progressive,\n colorAdapter,\n linearColor,\n colorLegend,\n colorBarStyleFill,\n pivotColorLegend,\n initHistogram,\n yLinear,\n verticalCrosshairRect,\n tooltipHistogram,\n kdeRegressionLine,\n ecdfRegressionLine,\n} from '../pipes'\n\nconst histogram: SpecPipeline = [\n initHistogram,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetHistogram,\n progressive,\n xLinear,\n yLinear,\n label,\n tooltipHistogram,\n colorAdapter(discreteLegend, colorLegend),\n verticalCrosshairRect,\n colorBarStyleFill(barStyle),\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationAreaBand,\n kdeRegressionLine,\n ecdfRegressionLine,\n]\n\nconst pivotHistogram: SpecPipeline = [\n initPivot,\n pivotGridStyle,\n datasetPivot,\n pivotIndicators([\n initHistogram,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetHistogram,\n progressive,\n xLinear,\n yLinear,\n label,\n tooltipHistogram,\n colorBarStyleFill(barStyle),\n verticalCrosshairRect,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationAreaBand,\n kdeRegressionLine,\n ecdfRegressionLine,\n ]),\n pivotRowDimensions,\n pivotColumnDimensions,\n colorAdapter(pivotDiscreteLegend, pivotColorLegend),\n]\n\nexport const histogramSpecPipeline: SpecPipeline = [pivotAdapter(histogram, pivotHistogram)]\n"],"names":["histogram","initHistogram","colorAdapter","color","linearColor","backgroundColor","datasetHistogram","progressive","xLinear","yLinear","label","tooltipHistogram","discreteLegend","colorLegend","verticalCrosshairRect","colorBarStyleFill","barStyle","annotationPoint","annotationVerticalLine","annotationHorizontalLine","annotationAreaBand","kdeRegressionLine","ecdfRegressionLine","pivotHistogram","initPivot","pivotGridStyle","datasetPivot","pivotIndicators","pivotRowDimensions","pivotColumnDimensions","pivotDiscreteLegend","pivotColorLegend","histogramSpecPipeline","pivotAdapter"],"mappings":";AAmCA,MAAMA,YAA0B;IAC9BC;IACAC,aAAaC,OAAOC;IACpBC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAT,aAAaU,gBAAgBC;IAC7BC;IACAC,kBAAkBC;IAClBC;IACAC;IACAC;IACAC;IACAC;IACAC;CACD;AAED,MAAMC,iBAA+B;IACnCC;IACAC;IACAC;IACAC,gBAAgB;QACd1B;QACAC,aAAaC,OAAOC;QACpBC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAI,kBAAkBC;QAClBF;QACAG;QACAC;QACAC;QACAC;QACAC;QACAC;KACD;IACDM;IACAC;IACA3B,aAAa4B,qBAAqBC;CACnC;AAEM,MAAMC,wBAAsC;IAACC,aAAajC,WAAWuB;CAAgB"}
@@ -1,4 +1,4 @@
1
- import { annotationArea, annotationHorizontalLine, annotationPoint, annotationVerticalLine, backgroundColor, color, colorAdapter, colorLegend, colorPointStyleFill, datasetPivot, datasetScatter, discreteLegend, horizontalCrosshairLine, initPivot, initScatter, labelScatter, linearColor, pivotAdapter, pivotColorLegend, pivotColumnDimensions, pivotDiscreteLegend, pivotGridStyle, pivotIndicators, pivotIndicatorsAsRow, pivotRowDimensions, pointStateHover, pointStyle, progressive, scatterSize, tooltipScatter, verticalCrosshairLine, xLinear, yLinear } from "../pipes/index.js";
1
+ import { annotationArea, annotationHorizontalLine, annotationPoint, annotationVerticalLine, backgroundColor, color, colorAdapter, colorLegend, colorPointStyleFill, datasetPivot, datasetScatter, discreteLegend, horizontalCrosshairLine, initPivot, initScatter, labelScatter, linearColor, linearRegressionLine, logisticRegressionLine, lowessRegressionLine, pivotAdapter, pivotColorLegend, pivotColumnDimensions, pivotDiscreteLegend, pivotGridStyle, pivotIndicators, pivotIndicatorsAsRow, pivotRowDimensions, pointStateHover, pointStyle, polynomialRegressionLine, progressive, scatterSize, tooltipScatter, verticalCrosshairLine, xLinear, yLinear } from "../pipes/index.js";
2
2
  const scatter = [
3
3
  initScatter,
4
4
  colorAdapter(color, linearColor),
@@ -18,7 +18,11 @@ const scatter = [
18
18
  annotationPoint,
19
19
  annotationVerticalLine,
20
20
  annotationHorizontalLine,
21
- annotationArea
21
+ annotationArea,
22
+ linearRegressionLine,
23
+ lowessRegressionLine,
24
+ polynomialRegressionLine,
25
+ logisticRegressionLine
22
26
  ];
23
27
  const pivotScatter = [
24
28
  initPivot,
@@ -43,7 +47,9 @@ const pivotScatter = [
43
47
  annotationPoint,
44
48
  annotationVerticalLine,
45
49
  annotationHorizontalLine,
46
- annotationArea
50
+ annotationArea,
51
+ linearRegressionLine,
52
+ lowessRegressionLine
47
53
  ]),
48
54
  pivotRowDimensions,
49
55
  pivotColumnDimensions,
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipeline/scatter.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/scatter.ts"],"sourcesContent":["import type { SpecPipeline } from 'src/types'\nimport {\n yLinear,\n backgroundColor,\n tooltipScatter,\n discreteLegend,\n color,\n initPivot,\n datasetPivot,\n pivotDiscreteLegend,\n pivotIndicators,\n pivotAdapter,\n pivotIndicatorsAsRow,\n pivotGridStyle,\n pivotColumnDimensions,\n pivotRowDimensions,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n pointStyle,\n verticalCrosshairLine,\n xLinear,\n horizontalCrosshairLine,\n pointStateHover,\n initScatter,\n progressive,\n datasetScatter,\n linearColor,\n colorAdapter,\n colorPointStyleFill,\n colorLegend,\n pivotColorLegend,\n labelScatter,\n scatterSize,\n} from '../pipes'\n\nconst scatter: SpecPipeline = [\n initScatter,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetScatter,\n progressive,\n xLinear,\n yLinear,\n scatterSize,\n labelScatter,\n tooltipScatter,\n colorAdapter(discreteLegend, colorLegend),\n verticalCrosshairLine,\n horizontalCrosshairLine,\n colorPointStyleFill(pointStyle),\n pointStateHover,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n]\n\nconst pivotScatter: SpecPipeline = [\n initPivot,\n pivotGridStyle,\n pivotIndicatorsAsRow,\n datasetPivot,\n pivotIndicators([\n initScatter,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetScatter,\n progressive,\n xLinear,\n yLinear,\n scatterSize,\n labelScatter,\n tooltipScatter,\n verticalCrosshairLine,\n horizontalCrosshairLine,\n colorPointStyleFill(pointStyle),\n pointStateHover,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n ]),\n pivotRowDimensions,\n pivotColumnDimensions,\n colorAdapter(pivotDiscreteLegend, pivotColorLegend),\n]\n\nexport const scatterSpecPipeline: SpecPipeline = [pivotAdapter(scatter, pivotScatter)]\n"],"names":["scatter","initScatter","colorAdapter","color","linearColor","backgroundColor","datasetScatter","progressive","xLinear","yLinear","scatterSize","labelScatter","tooltipScatter","discreteLegend","colorLegend","verticalCrosshairLine","horizontalCrosshairLine","colorPointStyleFill","pointStyle","pointStateHover","annotationPoint","annotationVerticalLine","annotationHorizontalLine","annotationArea","pivotScatter","initPivot","pivotGridStyle","pivotIndicatorsAsRow","datasetPivot","pivotIndicators","pivotRowDimensions","pivotColumnDimensions","pivotDiscreteLegend","pivotColorLegend","scatterSpecPipeline","pivotAdapter"],"mappings":";AAqCA,MAAMA,UAAwB;IAC5BC;IACAC,aAAaC,OAAOC;IACpBC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAV,aAAaW,gBAAgBC;IAC7BC;IACAC;IACAC,oBAAoBC;IACpBC;IACAC;IACAC;IACAC;IACAC;CACD;AAED,MAAMC,eAA6B;IACjCC;IACAC;IACAC;IACAC;IACAC,gBAAgB;QACd5B;QACAC,aAAaC,OAAOC;QACpBC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAG;QACAC;QACAC,oBAAoBC;QACpBC;QACAC;QACAC;QACAC;QACAC;KACD;IACDO;IACAC;IACA7B,aAAa8B,qBAAqBC;CACnC;AAEM,MAAMC,sBAAoC;IAACC,aAAanC,SAASwB;CAAc"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipeline/scatter.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/scatter.ts"],"sourcesContent":["import type { SpecPipeline } from 'src/types'\nimport {\n yLinear,\n backgroundColor,\n tooltipScatter,\n discreteLegend,\n color,\n initPivot,\n datasetPivot,\n pivotDiscreteLegend,\n pivotIndicators,\n pivotAdapter,\n pivotIndicatorsAsRow,\n pivotGridStyle,\n pivotColumnDimensions,\n pivotRowDimensions,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n pointStyle,\n verticalCrosshairLine,\n xLinear,\n horizontalCrosshairLine,\n pointStateHover,\n initScatter,\n progressive,\n datasetScatter,\n linearColor,\n colorAdapter,\n colorPointStyleFill,\n colorLegend,\n pivotColorLegend,\n labelScatter,\n scatterSize,\n linearRegressionLine,\n lowessRegressionLine,\n polynomialRegressionLine,\n logisticRegressionLine,\n} from '../pipes'\n\nconst scatter: SpecPipeline = [\n initScatter,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetScatter,\n progressive,\n xLinear,\n yLinear,\n scatterSize,\n labelScatter,\n tooltipScatter,\n colorAdapter(discreteLegend, colorLegend),\n verticalCrosshairLine,\n horizontalCrosshairLine,\n colorPointStyleFill(pointStyle),\n pointStateHover,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n linearRegressionLine,\n lowessRegressionLine,\n polynomialRegressionLine,\n logisticRegressionLine,\n]\n\nconst pivotScatter: SpecPipeline = [\n initPivot,\n pivotGridStyle,\n pivotIndicatorsAsRow,\n datasetPivot,\n pivotIndicators([\n initScatter,\n colorAdapter(color, linearColor),\n backgroundColor,\n datasetScatter,\n progressive,\n xLinear,\n yLinear,\n scatterSize,\n labelScatter,\n tooltipScatter,\n verticalCrosshairLine,\n horizontalCrosshairLine,\n colorPointStyleFill(pointStyle),\n pointStateHover,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n linearRegressionLine,\n lowessRegressionLine,\n ]),\n pivotRowDimensions,\n pivotColumnDimensions,\n colorAdapter(pivotDiscreteLegend, pivotColorLegend),\n]\n\nexport const scatterSpecPipeline: SpecPipeline = [pivotAdapter(scatter, pivotScatter)]\n"],"names":["scatter","initScatter","colorAdapter","color","linearColor","backgroundColor","datasetScatter","progressive","xLinear","yLinear","scatterSize","labelScatter","tooltipScatter","discreteLegend","colorLegend","verticalCrosshairLine","horizontalCrosshairLine","colorPointStyleFill","pointStyle","pointStateHover","annotationPoint","annotationVerticalLine","annotationHorizontalLine","annotationArea","linearRegressionLine","lowessRegressionLine","polynomialRegressionLine","logisticRegressionLine","pivotScatter","initPivot","pivotGridStyle","pivotIndicatorsAsRow","datasetPivot","pivotIndicators","pivotRowDimensions","pivotColumnDimensions","pivotDiscreteLegend","pivotColorLegend","scatterSpecPipeline","pivotAdapter"],"mappings":";AAyCA,MAAMA,UAAwB;IAC5BC;IACAC,aAAaC,OAAOC;IACpBC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAV,aAAaW,gBAAgBC;IAC7BC;IACAC;IACAC,oBAAoBC;IACpBC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;CACD;AAED,MAAMC,eAA6B;IACjCC;IACAC;IACAC;IACAC;IACAC,gBAAgB;QACdhC;QACAC,aAAaC,OAAOC;QACpBC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAG;QACAC;QACAC,oBAAoBC;QACpBC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;KACD;IACDS;IACAC;IACAjC,aAAakC,qBAAqBC;CACnC;AAEM,MAAMC,sBAAoC;IAACC,aAAavC,SAAS4B;CAAc"}
@@ -9,9 +9,14 @@ const initPivot = (spec)=>{
9
9
  columns: [],
10
10
  indicators: [],
11
11
  records: [],
12
- widthMode: 'adaptive',
12
+ widthMode: 'standard',
13
+ autoFillWidth: true,
13
14
  defaultHeaderColWidth: 'auto',
14
- heightMode: 'adaptive',
15
+ defaultColWidth: 200,
16
+ heightMode: 'standard',
17
+ autoFillHeight: true,
18
+ defaultRowHeight: 100,
19
+ defaultHeaderRowHeight: 'auto',
15
20
  indicatorsAsCol: false,
16
21
  select: {
17
22
  highlightMode: 'cell',
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/chart/pipes/init/pivot.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/init/pivot.ts"],"sourcesContent":["import type { PivotChartConstructorOptions } from '@visactor/vtable'\nimport type { SpecPipe } from 'src/types'\n\nexport const initPivot: SpecPipe = (spec) => {\n const result = { ...spec } as PivotChartConstructorOptions\n\n return {\n ...result,\n animation: true,\n rows: [],\n columns: [],\n indicators: [],\n records: [],\n widthMode: 'adaptive',\n defaultHeaderColWidth: 'auto',\n heightMode: 'adaptive',\n indicatorsAsCol: false,\n select: {\n highlightMode: 'cell',\n headerSelectMode: 'inline',\n },\n hover: {\n highlightMode: 'cross',\n },\n tooltip: {\n isShowOverflowTextTooltip: true,\n },\n corner: {\n titleOnDimension: 'all',\n },\n animationAppear: {\n duration: 600,\n type: 'all',\n direction: 'row',\n },\n }\n}\n"],"names":["initPivot","spec","result"],"mappings":"AAGO,MAAMA,YAAsB,CAACC;IAClC,MAAMC,SAAS;QAAE,GAAGD,IAAI;IAAC;IAEzB,OAAO;QACL,GAAGC,MAAM;QACT,WAAW;QACX,MAAM,EAAE;QACR,SAAS,EAAE;QACX,YAAY,EAAE;QACd,SAAS,EAAE;QACX,WAAW;QACX,uBAAuB;QACvB,YAAY;QACZ,iBAAiB;QACjB,QAAQ;YACN,eAAe;YACf,kBAAkB;QACpB;QACA,OAAO;YACL,eAAe;QACjB;QACA,SAAS;YACP,2BAA2B;QAC7B;QACA,QAAQ;YACN,kBAAkB;QACpB;QACA,iBAAiB;YACf,UAAU;YACV,MAAM;YACN,WAAW;QACb;IACF;AACF"}
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/init/pivot.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/init/pivot.ts"],"sourcesContent":["import type { PivotChartConstructorOptions } from '@visactor/vtable'\nimport type { SpecPipe } from 'src/types'\n\nexport const initPivot: SpecPipe = (spec) => {\n const result = { ...spec } as PivotChartConstructorOptions\n\n return {\n ...result,\n animation: true,\n rows: [],\n columns: [],\n indicators: [],\n records: [],\n widthMode: 'standard',\n autoFillWidth: true,\n defaultHeaderColWidth: 'auto',\n defaultColWidth: 200,\n\n heightMode: 'standard',\n autoFillHeight: true,\n defaultRowHeight: 100,\n defaultHeaderRowHeight: 'auto',\n\n indicatorsAsCol: false,\n select: {\n highlightMode: 'cell',\n headerSelectMode: 'inline',\n },\n hover: {\n highlightMode: 'cross',\n },\n tooltip: {\n isShowOverflowTextTooltip: true,\n },\n corner: {\n titleOnDimension: 'all',\n },\n animationAppear: {\n duration: 600,\n type: 'all',\n direction: 'row',\n },\n }\n}\n"],"names":["initPivot","spec","result"],"mappings":"AAGO,MAAMA,YAAsB,CAACC;IAClC,MAAMC,SAAS;QAAE,GAAGD,IAAI;IAAC;IAEzB,OAAO;QACL,GAAGC,MAAM;QACT,WAAW;QACX,MAAM,EAAE;QACR,SAAS,EAAE;QACX,YAAY,EAAE;QACd,SAAS,EAAE;QACX,WAAW;QACX,eAAe;QACf,uBAAuB;QACvB,iBAAiB;QAEjB,YAAY;QACZ,gBAAgB;QAChB,kBAAkB;QAClB,wBAAwB;QAExB,iBAAiB;QACjB,QAAQ;YACN,eAAe;YACf,kBAAkB;QACpB;QACA,OAAO;YACL,eAAe;QACjB;QACA,SAAS;YACP,2BAA2B;QAC7B;QACA,QAAQ;YACN,kBAAkB;QACpB;QACA,iBAAiB;YACf,UAAU;YACV,MAAM;YACN,WAAW;QACb;IACF;AACF"}
@@ -1,4 +1,5 @@
1
1
  import { isCombination, isPivot } from "../../../../utils/index.js";
2
+ import { isNullish } from "remeda";
2
3
  const pivotGridStyle = (spec, context)=>{
3
4
  const { vseed, advancedVSeed } = context;
4
5
  const { config, chartType } = advancedVSeed;
@@ -16,6 +17,8 @@ const pivotGridStyle = (spec, context)=>{
16
17
  const hoverHeaderInlineBackgroundColor = onlyCombination ? transparent : themConfig.hoverHeaderInlineBackgroundColor ?? '#D9DDE455';
17
18
  const outlineBorderLineWidth = themConfig.outlineBorderLineWidth ?? 0;
18
19
  const frameCornerRadius = themConfig.frameCornerRadius ?? 0;
20
+ if (!isNullish(themConfig.minChartWidth)) result.defaultColWidth = themConfig.minChartWidth;
21
+ if (!isNullish(themConfig.minChartHeight)) result.defaultRowHeight = themConfig.minChartHeight;
19
22
  return {
20
23
  ...result,
21
24
  theme: {
@@ -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 { isCombination, isPivot } from 'src/pipeline/utils'\nimport type { Config, SpecPipe } from 'src/types'\n\nexport const pivotGridStyle: SpecPipe = (spec, context) => {\n const { vseed, advancedVSeed } = context\n const { config, chartType } = advancedVSeed\n const themConfig = (config?.[chartType] as Config['line'])?.pivotGrid ?? {}\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 = themConfig.borderColor ?? '#e3e5eb'\n const bodyFontColor = themConfig.bodyFontColor ?? '#141414'\n const headerFontColor = themConfig.headerFontColor ?? '#21252c'\n const headerBackgroundColor = themConfig.headerBackgroundColor ?? 'rgba(0,0,0,0)'\n const hoverHeaderBackgroundColor = onlyCombination\n ? transparent\n : (themConfig.hoverHeaderBackgroundColor ?? '#D9DDE4')\n const hoverHeaderInlineBackgroundColor = onlyCombination\n ? transparent\n : (themConfig.hoverHeaderInlineBackgroundColor ?? '#D9DDE455')\n const outlineBorderLineWidth = themConfig.outlineBorderLineWidth ?? 0\n const frameCornerRadius = themConfig.frameCornerRadius ?? 0\n\n return {\n ...result,\n theme: {\n underlayBackgroundColor: transparent,\n bodyStyle: {\n borderColor,\n color: bodyFontColor,\n borderLineWidth: [1, outlineBorderLineWidth, 0, 1],\n bgColor: transparent,\n hover: {\n cellBgColor: 'transparent',\n },\n },\n headerStyle: {\n borderColor,\n fontSize: 12,\n borderLineWidth: [outlineBorderLineWidth, outlineBorderLineWidth, 1, 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 padding: [0, 4, 0, 4],\n borderLineWidth: [1, 1, 1, outlineBorderLineWidth],\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 padding: [0, 4, 0, 4],\n fontWeight: 'bold',\n borderLineWidth: [outlineBorderLineWidth, 1, 1, outlineBorderLineWidth],\n bgColor: headerBackgroundColor,\n frameStyle: {\n borderColor,\n borderLineWidth: [outlineBorderLineWidth, 0, 0, outlineBorderLineWidth],\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: [outlineBorderLineWidth, 1, 0, 1],\n },\n bgColor: headerBackgroundColor,\n hover: {\n cellBgColor: hoverHeaderBackgroundColor,\n },\n },\n cornerLeftBottomCellStyle: {\n borderColor,\n borderLineWidth: [1, 0, outlineBorderLineWidth, outlineBorderLineWidth],\n bgColor: headerBackgroundColor,\n frameStyle: {\n borderColor,\n borderLineWidth: [1, 0, outlineBorderLineWidth, outlineBorderLineWidth],\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, outlineBorderLineWidth, outlineBorderLineWidth, 1],\n bgColor: headerBackgroundColor,\n hover: {\n cellBgColor: hoverHeaderBackgroundColor,\n },\n },\n selectionStyle: {\n cellBgColor: '',\n cellBorderColor: '',\n },\n frameStyle: {\n borderColor,\n cornerRadius: frameCornerRadius,\n borderLineWidth: outlineBorderLineWidth,\n },\n },\n }\n}\n"],"names":["pivotGridStyle","spec","context","vseed","advancedVSeed","config","chartType","themConfig","onlyCombination","isPivot","isCombination","result","transparent","borderColor","bodyFontColor","headerFontColor","headerBackgroundColor","hoverHeaderBackgroundColor","h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E;gBACvE,SAASH;gBACT,OAAO;oBACL,aAAaC;gBACf;YACF;YACA,gBAAgB;gBACd,aAAa;gBACb,iBAAiB;YACnB;YACA,YAAY;gBACVJ;gBACA,cAAcO;gBACd,iBAAiBD;YACnB;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 { Config, SpecPipe } from 'src/types'\nimport { isNullish } from 'remeda'\n\nexport const pivotGridStyle: SpecPipe = (spec, context) => {\n const { vseed, advancedVSeed } = context\n const { config, chartType } = advancedVSeed\n const themConfig = (config?.[chartType] as Config['line'])?.pivotGrid ?? {}\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 = themConfig.borderColor ?? '#e3e5eb'\n const bodyFontColor = themConfig.bodyFontColor ?? '#141414'\n const headerFontColor = themConfig.headerFontColor ?? '#21252c'\n const headerBackgroundColor = themConfig.headerBackgroundColor ?? 'rgba(0,0,0,0)'\n const hoverHeaderBackgroundColor = onlyCombination\n ? transparent\n : (themConfig.hoverHeaderBackgroundColor ?? '#D9DDE4')\n const hoverHeaderInlineBackgroundColor = onlyCombination\n ? transparent\n : (themConfig.hoverHeaderInlineBackgroundColor ?? '#D9DDE455')\n const outlineBorderLineWidth = themConfig.outlineBorderLineWidth ?? 0\n const frameCornerRadius = themConfig.frameCornerRadius ?? 0\n\n if (!isNullish(themConfig.minChartWidth)) {\n result.defaultColWidth = themConfig.minChartWidth\n }\n\n if (!isNullish(themConfig.minChartHeight)) {\n result.defaultRowHeight = themConfig.minChartHeight\n }\n\n return {\n ...result,\n theme: {\n underlayBackgroundColor: transparent,\n bodyStyle: {\n borderColor,\n color: bodyFontColor,\n borderLineWidth: [1, outlineBorderLineWidth, 0, 1],\n bgColor: transparent,\n hover: {\n cellBgColor: 'transparent',\n },\n },\n headerStyle: {\n borderColor,\n fontSize: 12,\n borderLineWidth: [outlineBorderLineWidth, outlineBorderLineWidth, 1, 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 padding: [0, 4, 0, 4],\n borderLineWidth: [1, 1, 1, outlineBorderLineWidth],\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 padding: [0, 4, 0, 4],\n fontWeight: 'bold',\n borderLineWidth: [outlineBorderLineWidth, 1, 1, outlineBorderLineWidth],\n bgColor: headerBackgroundColor,\n frameStyle: {\n borderColor,\n borderLineWidth: [outlineBorderLineWidth, 0, 0, outlineBorderLineWidth],\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: [outlineBorderLineWidth, 1, 0, 1],\n },\n bgColor: headerBackgroundColor,\n hover: {\n cellBgColor: hoverHeaderBackgroundColor,\n },\n },\n cornerLeftBottomCellStyle: {\n borderColor,\n borderLineWidth: [1, 0, outlineBorderLineWidth, outlineBorderLineWidth],\n bgColor: headerBackgroundColor,\n frameStyle: {\n borderColor,\n borderLineWidth: [1, 0, outlineBorderLineWidth, outlineBorderLineWidth],\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, outlineBorderLineWidth, outlineBorderLineWidth, 1],\n bgColor: headerBackgroundColor,\n hover: {\n cellBgColor: hoverHeaderBackgroundColor,\n },\n },\n selectionStyle: {\n cellBgColor: '',\n cellBorderColor: '',\n },\n frameStyle: {\n borderColor,\n cornerRadius: frameCornerRadius,\n borderLineWidth: outlineBorderLineWidth,\n },\n },\n }\n}\n"],"names":["pivotGridStyle","spec","context","vseed","advancedVSeed","config","chartType","themConfig","onlyCombination","isPivot","isCombination","result","transparent","borderColor","bodyFontColor","headerFontColor","headerBackgroundColor","hoverHeaderBackgroundColor","hoverHeaderInlineBackgroundColor","outlineBorderLineWidth","frameCornerRadius","isNullish","undefined"],"mappings":";;AAKO,MAAMA,iBAA2B,CAACC,MAAMC;IAC7C,MAAM,EAAEC,KAAK,EAAEC,aAAa,EAAE,GAAGF;IACjC,MAAM,EAAEG,MAAM,EAAEC,SAAS,EAAE,GAAGF;IAC9B,MAAMG,aAAcF,QAAQ,CAACC,UAAU,EAAqB,aAAa,CAAC;IAE1E,MAAME,kBAAkB,CAACC,QAAQN,UAAUO,cAAcP;IAEzD,MAAMQ,SAAS;QAAE,GAAGV,IAAI;IAAC;IACzB,MAAMW,cAAc;IAEpB,MAAMC,cAAcN,WAAW,WAAW,IAAI;IAC9C,MAAMO,gBAAgBP,W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gBACrB,YAAY;gBACZ,iBAAiB;oBAACI;oBAAwB;oBAAG;oBAAGA;iBAAuB;gBACvE,SAASH;gBACT,YAAY;oBACVH;oBACA,iBAAiB;wBAACM;wBAAwB;wBAAG;wBAAGA;qBAAuB;gBACzE;gBACA,OAAO;oBACL,aAAaF;oBACb,kBAAkBC,oCAAoCI;oBACtD,qBAAqBJ,oCAAoCI;gBAC3D;YACF;YACA,yBAAyB;gBACvBT;gBACA,iBAAiB;gBACjB,YAAY;oBACVA;oBACA,iBAAiB;wBAACM;wBAAwB;wBAAG;wBAAG;qBAAE;gBACpD;gBACA,SAASH;gBACT,OAAO;oBACL,aAAaC;gBACf;YACF;YACA,2BAA2B;gBACzBJ;gBACA,iBAAiB;oBAAC;oBAAG;oBAAGM;oBAAwBA;iBAAuB;gBACvE,SAASH;gBACT,YAAY;oBACVH;oBACA,iBAAiB;wBAAC;wBAAG;wBAAGM;wBAAwBA;qBAAuB;gBACzE;gBACA,OAAO;oBACL,aAAaF;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;oBAAC;oBAAGM;oBAAwBA;oBAAwB;iBAAE;gBACvE,SAASH;gBACT,OAAO;oBACL,aAAaC;gBACf;YACF;YACA,gBAAgB;gBACd,aAAa;gBACb,iBAAiB;YACnB;YACA,YAAY;gBACVJ;gBACA,cAAcO;gBACd,iBAAiBD;YACnB;QACF;IACF;AACF"}
@@ -0,0 +1,2 @@
1
+ import type { SpecPipe } from '../../../../../types';
2
+ export declare const columnPolynomialRegressionLine: SpecPipe;
@@ -0,0 +1,150 @@
1
+ import { isNullish } from "remeda";
2
+ import { array, clamper, regressionPolynomial } from "@visactor/vutils";
3
+ import { defaultRegressionLineColor } from "./common.js";
4
+ const columnPolynomialRegressionLine = (spec, context)=>{
5
+ const result = {
6
+ ...spec
7
+ };
8
+ const { advancedVSeed } = context;
9
+ const { chartType, regressionLine } = advancedVSeed;
10
+ const lineTheme = advancedVSeed.config[chartType]?.regressionLine;
11
+ if (!regressionLine || !regressionLine.polynomialRegressionLine) return result;
12
+ const lineList = array(regressionLine.polynomialRegressionLine);
13
+ if (!result.customMark) result.customMark = [];
14
+ lineList.forEach((line, lineIndex)=>{
15
+ const theme = lineTheme.linearRegressionLine ?? {};
16
+ const { color, lineWidth, lineDash, text, textColor, textFontSize, textFontWeight, confidenceIntervalOpacity, confidenceIntervalVisible = theme.confidenceIntervalVisible } = line;
17
+ const childrenMarks = [];
18
+ result.customMark.push({
19
+ type: 'group',
20
+ interactive: false,
21
+ zIndex: 500,
22
+ name: `polynomialRegressionLine-${lineIndex}`,
23
+ style: {
24
+ data: (datum, ctx)=>{
25
+ const vchart = ctx.vchart;
26
+ const chart = vchart.getChart();
27
+ const s = chart.getAllSeries()[0];
28
+ if (s) {
29
+ const rect = s.getRegion().getLayoutRect();
30
+ if (0 === rect.width || 0 === rect.height) return null;
31
+ const start = s.getRegion().getLayoutStartPoint();
32
+ const yClamper = clamper(start.y, start.y + rect.height);
33
+ const data = s.getViewData()?.latestData;
34
+ const fieldX = s.fieldX?.[0];
35
+ const fieldY = s.fieldY?.[0];
36
+ const xValues = s.getRawDataStatisticsByField(fieldX).values;
37
+ if (!fieldX || !fieldY || !data || data.length <= 2 || xValues.length <= 2) return null;
38
+ const { confidenceInterval, evaluateGrid } = regressionPolynomial(xValues.map((xVal, index)=>{
39
+ const filteredData = data.filter((d)=>d[fieldX] === xVal);
40
+ return {
41
+ x: index,
42
+ y: Math.max(...filteredData.map((d)=>d[fieldY]))
43
+ };
44
+ }), void 0, void 0, {
45
+ degree: line.degree ?? 2
46
+ });
47
+ const N = xValues.length;
48
+ const xAxisHelper = s.getXAxisHelper();
49
+ const halfBandWidth = xAxisHelper ? xAxisHelper.getBandwidth(0) / 2 : 0;
50
+ const lineData = evaluateGrid(N);
51
+ const linePoints = lineData.map((datum, index)=>{
52
+ const d = {
53
+ [fieldX]: xValues[index],
54
+ [fieldY]: datum.y
55
+ };
56
+ return {
57
+ x: s.dataToPositionX(d) + start.x + halfBandWidth,
58
+ y: yClamper(s.dataToPositionY(d) + start.y)
59
+ };
60
+ });
61
+ const result = {
62
+ linePoints,
63
+ color: s.getOption().globalScale.getScale('color')?.scale(s.getSeriesKeys()[0])
64
+ };
65
+ if (confidenceIntervalVisible) {
66
+ const intervalData = confidenceInterval(N);
67
+ result.areaPoints = intervalData.map((datum, index)=>{
68
+ const d = {
69
+ [fieldX]: xValues[index],
70
+ [fieldY]: datum.lower
71
+ };
72
+ return {
73
+ x: s.dataToPositionX(d) + start.x + halfBandWidth,
74
+ y: yClamper(s.dataToPositionY(d) + start.y),
75
+ y1: yClamper(s.dataToPositionY({
76
+ [fieldY]: datum.upper
77
+ }) + start.y)
78
+ };
79
+ });
80
+ }
81
+ return result;
82
+ }
83
+ return null;
84
+ }
85
+ },
86
+ children: childrenMarks
87
+ });
88
+ if (confidenceIntervalVisible) childrenMarks.push({
89
+ type: 'area',
90
+ interactive: false,
91
+ zIndex: 500,
92
+ style: {
93
+ lineWidth: lineWidth ?? theme.lineWidth,
94
+ lineDash: lineDash ?? theme.lineDash,
95
+ fillOpacity: confidenceIntervalOpacity ?? theme.confidenceIntervalOpacity,
96
+ fill: color ?? defaultRegressionLineColor,
97
+ points: (datum, ctx, opt)=>{
98
+ const parentNode = opt.mark?._product?.parent;
99
+ if (parentNode?.attribute?.data) return parentNode.attribute.data.areaPoints;
100
+ return [];
101
+ }
102
+ }
103
+ });
104
+ childrenMarks.push({
105
+ type: 'line',
106
+ interactive: false,
107
+ zIndex: 500,
108
+ style: {
109
+ lineWidth: lineWidth ?? theme.lineWidth,
110
+ lineDash: lineDash ?? theme.lineDash,
111
+ stroke: color ?? defaultRegressionLineColor,
112
+ points: (datum, ctx, opt)=>{
113
+ const parentNode = opt.mark?._product?.parent;
114
+ if (parentNode?.attribute?.data) return parentNode.attribute.data.linePoints;
115
+ return [];
116
+ }
117
+ }
118
+ });
119
+ if (!isNullish(text)) childrenMarks.push({
120
+ type: 'text',
121
+ interactive: false,
122
+ zIndex: 500,
123
+ style: {
124
+ textAlign: 'end',
125
+ fill: textColor ?? theme.textColor,
126
+ fontSize: textFontSize ?? theme.textFontSize,
127
+ fontWeight: textFontWeight ?? theme.textFontWeight,
128
+ text: text,
129
+ x: (datum, ctx, opt)=>{
130
+ const parentNode = opt.mark?._product?.parent;
131
+ if (parentNode?.attribute?.data?.linePoints) {
132
+ const points = parentNode.attribute.data.linePoints;
133
+ return points[points.length - 1]?.x;
134
+ }
135
+ },
136
+ y: (datum, ctx, opt)=>{
137
+ const parentNode = opt.mark?._product?.parent;
138
+ if (parentNode?.attribute?.data?.linePoints) {
139
+ const points = parentNode.attribute.data.linePoints;
140
+ return points[points.length - 1]?.y;
141
+ }
142
+ }
143
+ }
144
+ });
145
+ });
146
+ return result;
147
+ };
148
+ export { columnPolynomialRegressionLine };
149
+
150
+ //# sourceMappingURL=columnRegressionLine.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/regressionLine/columnRegressionLine.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/regressionLine/columnRegressionLine.ts"],"sourcesContent":["import type { IBarChartSpec, ICartesianSeries, IChart, IVChart } from '@visactor/vchart'\nimport { isNullish } from 'remeda'\nimport { array, clamper, regressionPolynomial } from '@visactor/vutils'\nimport type { Datum, SpecPipe, RegressionLineConfig, LinearRegressionLine, PolynomialRegressionLine } from 'src/types'\nimport { defaultRegressionLineColor } from './common'\n\nexport const columnPolynomialRegressionLine: SpecPipe = (spec, context): Partial<IBarChartSpec> => {\n const result = { ...spec } as Partial<IBarChartSpec>\n const { advancedVSeed } = context\n const { chartType, regressionLine } = advancedVSeed\n const lineTheme = advancedVSeed.config[chartType as 'scatter']?.regressionLine as RegressionLineConfig\n\n if (!regressionLine || !regressionLine.polynomialRegressionLine) {\n return result\n }\n\n const lineList = array(regressionLine.polynomialRegressionLine)\n\n if (!result.customMark) {\n result.customMark = []\n }\n\n lineList.forEach((line, lineIndex) => {\n const theme = (lineTheme.linearRegressionLine ?? {}) as LinearRegressionLine\n const {\n color,\n lineWidth,\n lineDash,\n text,\n textColor,\n textFontSize,\n textFontWeight,\n confidenceIntervalOpacity,\n confidenceIntervalVisible = theme.confidenceIntervalVisible,\n } = line as LinearRegressionLine\n\n const childrenMarks: any[] = []\n\n ;(result.customMark as any[]).push({\n type: 'group',\n interactive: false,\n zIndex: 500,\n name: `polynomialRegressionLine-${lineIndex}`,\n style: {\n data: (datum: any, ctx: any) => {\n const vchart = ctx.vchart as IVChart\n const chart = vchart.getChart() as IChart\n const s = chart.getAllSeries()[0] as ICartesianSeries\n\n if (s) {\n const rect = s.getRegion().getLayoutRect()\n\n if (rect.width === 0 || rect.height === 0) {\n return null\n }\n\n const start = s.getRegion().getLayoutStartPoint()\n const yClamper = clamper(start.y, start.y + rect.height)\n const data = s.getViewData()?.latestData as Datum[]\n const fieldX = s.fieldX?.[0]\n const fieldY = s.fieldY?.[0]\n const xValues = s.getRawDataStatisticsByField(fieldX).values as string[]\n\n if (!fieldX || !fieldY || !data || data.length <= 2 || xValues.length <= 2) {\n return null\n }\n\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const { confidenceInterval, evaluateGrid } = regressionPolynomial(\n xValues.map((xVal, index: number) => {\n const filteredData = data.filter((d) => d[fieldX] === xVal)\n\n return {\n x: index,\n y: Math.max(...filteredData.map((d) => d[fieldY] as number)),\n }\n }),\n undefined,\n undefined,\n {\n degree: (line as PolynomialRegressionLine).degree ?? 2,\n },\n )\n const N = xValues.length\n const xAxisHelper = s.getXAxisHelper()\n const halfBandWidth = xAxisHelper ? xAxisHelper.getBandwidth!(0) / 2 : 0\n const lineData = evaluateGrid(N)\n const linePoints = lineData.map((datum: Datum, index: number) => {\n const d = { [fieldX]: xValues[index], [fieldY]: datum.y }\n return {\n x: s.dataToPositionX(d)! + start.x + halfBandWidth,\n y: yClamper(s.dataToPositionY(d)! + start.y),\n }\n })\n const result: {\n linePoints: { x: number; y: number }[]\n areaPoints?: { x: number; y: number; y1: number }[]\n color: string\n } = {\n linePoints,\n color: s.getOption().globalScale.getScale('color')?.scale(s.getSeriesKeys()[0]),\n }\n\n if (confidenceIntervalVisible) {\n const intervalData = confidenceInterval(N)\n\n result.areaPoints = intervalData.map((datum: Datum, index: number) => {\n const d = { [fieldX]: xValues[index], [fieldY]: datum.lower }\n return {\n x: s.dataToPositionX(d)! + start.x + halfBandWidth,\n y: yClamper(s.dataToPositionY(d)! + start.y),\n y1: yClamper(s.dataToPositionY({ [fieldY]: datum.upper })! + start.y),\n }\n })\n }\n\n return result\n }\n return null\n },\n },\n children: childrenMarks,\n })\n\n if (confidenceIntervalVisible) {\n childrenMarks.push({\n type: 'area',\n interactive: false,\n zIndex: 500,\n style: {\n lineWidth: lineWidth ?? theme.lineWidth,\n lineDash: lineDash ?? theme.lineDash,\n fillOpacity: confidenceIntervalOpacity ?? theme.confidenceIntervalOpacity,\n fill: color ?? defaultRegressionLineColor,\n points: (datum: any, ctx: any, opt: any) => {\n const parentNode = opt.mark?._product?.parent\n\n if (parentNode?.attribute?.data) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return parentNode.attribute.data.areaPoints\n }\n\n return []\n },\n },\n })\n }\n\n childrenMarks.push({\n type: 'line',\n interactive: false,\n zIndex: 500,\n style: {\n lineWidth: lineWidth ?? theme.lineWidth,\n lineDash: lineDash ?? theme.lineDash,\n stroke: color ?? defaultRegressionLineColor,\n points: (datum: any, ctx: any, opt: any) => {\n const parentNode = opt.mark?._product?.parent\n\n if (parentNode?.attribute?.data) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return parentNode.attribute.data.linePoints\n }\n\n return []\n },\n },\n })\n\n if (!isNullish(text)) {\n childrenMarks.push({\n type: 'text',\n interactive: false,\n zIndex: 500,\n style: {\n textAlign: 'end',\n fill: textColor ?? theme.textColor,\n fontSize: textFontSize ?? theme.textFontSize,\n fontWeight: textFontWeight ?? theme.textFontWeight,\n text: text,\n x: (datum: any, ctx: any, opt: any) => {\n const parentNode = opt.mark?._product?.parent\n\n if (parentNode?.attribute?.data?.linePoints) {\n const points = parentNode.attribute.data.linePoints\n return points[points.length - 1]?.x\n }\n\n return undefined\n },\n y: (datum: any, ctx: any, opt: any) => {\n const parentNode = opt.mark?._product?.parent\n\n if (parentNode?.attribute?.data?.linePoints) {\n const points = parentNode.attribute.data.linePoints\n return points[points.length - 1]?.y\n }\n\n return undefined\n },\n },\n })\n }\n })\n\n return result\n}\n"],"names":["columnPolynomialRegressionLine","spec","context","result","advancedVSeed","chartType","regressionLine","lineTheme","lineList","array","line","lineIndex","theme","color","lineWidth","lineDash","text","textColor","textFontSize","textFontWeight","confidenceIntervalOpacity","confidenceIntervalVisible","childrenMarks","datum","ctx","vchart","chart","s","rect","start","yClamper","clamper","data","fieldX","fieldY","xValues","confidenceInterval","evaluateGrid","regressionPolynomial","xVal","index","filteredData","d","Math","undefined","N","xAxisHelper","halfBandWidth","lineData","linePoints","intervalData","defaultRegressionLineColor","opt","parentNode","isNullish","points"],"mappings":";;;AAMO,MAAMA,iCAA2C,CAACC,MAAMC;IAC7D,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,SAAS,EAAEC,cAAc,EAAE,GAAGF;IACtC,MAAMG,YAAYH,cAAc,MAAM,CAACC,UAAuB,EAAE;IAEhE,IAAI,CAACC,kBAAkB,CAACA,eAAe,wBAAwB,EAC7D,OAAOH;IAGT,MAAMK,WAAWC,MAAMH,eAAe,wBAAwB;IAE9D,IA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I;gBACN,GAAG,CAACO,OAAYC,KAAU4B;oBACxB,MAAMC,aAAaD,IAAI,IAAI,EAAE,UAAU;oBAEvC,IAAIC,YAAY,WAAW,MAAM,YAAY;wBAC3C,MAAME,SAASF,WAAW,SAAS,CAAC,IAAI,CAAC,UAAU;wBACnD,OAAOE,MAAM,CAACA,OAAO,MAAM,GAAG,EAAE,EAAE;oBACpC;gBAGF;gBACA,GAAG,CAAChC,OAAYC,KAAU4B;oBACxB,MAAMC,aAAaD,IAAI,IAAI,EAAE,UAAU;oBAEvC,IAAIC,YAAY,WAAW,MAAM,YAAY;wBAC3C,MAAME,SAASF,WAAW,SAAS,CAAC,IAAI,CAAC,UAAU;wBACnD,OAAOE,MAAM,CAACA,OAAO,MAAM,GAAG,EAAE,EAAE;oBACpC;gBAGF;YACF;QACF;IAEJ;IAEA,OAAOpD;AACT"}
@@ -0,0 +1,4 @@
1
+ import type { Datum } from '@visactor/vchart';
2
+ export declare const defaultRegressionLineColor: (datum: Datum, ctx: any, opt: any) => string | undefined;
3
+ export declare const defaultRegressionLineLabelX: (datum: any, ctx: any, opt: any) => any;
4
+ export declare const defaultRegressionLineLabelY: (datum: any, ctx: any, opt: any) => any;
@@ -0,0 +1,21 @@
1
+ const defaultRegressionLineColor = (datum, ctx, opt)=>{
2
+ const parentNode = opt.mark?._product?.parent;
3
+ if (parentNode?.attribute?.data) return parentNode.attribute.data.color;
4
+ };
5
+ const defaultRegressionLineLabelX = (datum, ctx, opt)=>{
6
+ const parentNode = opt.mark?._product?.parent;
7
+ if (parentNode?.attribute?.data?.linePoints) {
8
+ const points = parentNode.attribute.data.linePoints;
9
+ return points[points.length - 1]?.x;
10
+ }
11
+ };
12
+ const defaultRegressionLineLabelY = (datum, ctx, opt)=>{
13
+ const parentNode = opt.mark?._product?.parent;
14
+ if (parentNode?.attribute?.data?.linePoints) {
15
+ const points = parentNode.attribute.data.linePoints;
16
+ return points[points.length - 1]?.y;
17
+ }
18
+ };
19
+ export { defaultRegressionLineColor, defaultRegressionLineLabelX, defaultRegressionLineLabelY };
20
+
21
+ //# sourceMappingURL=common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipeline/spec/chart/pipes/regressionLine/common.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/regressionLine/common.ts"],"sourcesContent":["import type { Datum } from '@visactor/vchart'\n\nexport const defaultRegressionLineColor = (datum: Datum, ctx: any, opt: any): string | undefined => {\n const parentNode = opt.mark?._product?.parent\n if (parentNode?.attribute?.data) {\n return parentNode.attribute.data.color\n }\n return undefined\n}\n\nexport const defaultRegressionLineLabelX = (datum: any, ctx: any, opt: any) => {\n const parentNode = opt.mark?._product?.parent\n\n if (parentNode?.attribute?.data?.linePoints) {\n const points = parentNode.attribute.data.linePoints\n return points[points.length - 1]?.x\n }\n\n return undefined\n}\n\nexport const defaultRegressionLineLabelY = (datum: any, ctx: any, opt: any) => {\n const parentNode = opt.mark?._product?.parent\n\n if (parentNode?.attribute?.data?.linePoints) {\n const points = parentNode.attribute.data.linePoints\n return points[points.length - 1]?.y\n }\n\n return undefined\n}\n"],"names":["defaultRegressionLineColor","datum","ctx","opt","parentNode","defaultRegressionLineLabelX","points","defaultRegressionLineLabelY"],"mappings":"AAEO,MAAMA,6BAA6B,CAACC,OAAcC,KAAUC;IACjE,MAAMC,aAAaD,IAAI,IAAI,EAAE,UAAU;IACvC,IAAIC,YAAY,WAAW,MACzB,OAAOA,WAAW,SAAS,CAAC,IAAI,CAAC,KAAK;AAG1C;AAEO,MAAMC,8BAA8B,CAACJ,OAAYC,KAAUC;IAChE,MAAMC,aAAaD,IAAI,IAAI,EAAE,UAAU;IAEvC,IAAIC,YAAY,WAAW,MAAM,YAAY;QAC3C,MAAME,SAASF,WAAW,SAAS,CAAC,IAAI,CAAC,UAAU;QACnD,OAAOE,MAAM,CAACA,OAAO,MAAM,GAAG,EAAE,EAAE;IACpC;AAGF;AAEO,MAAMC,8BAA8B,CAACN,OAAYC,KAAUC;IAChE,MAAMC,aAAaD,IAAI,IAAI,EAAE,UAAU;IAEvC,IAAIC,YAAY,WAAW,MAAM,YAAY;QAC3C,MAAME,SAASF,WAAW,SAAS,CAAC,IAAI,CAAC,UAAU;QACnD,OAAOE,MAAM,CAACA,OAAO,MAAM,GAAG,EAAE,EAAE;IACpC;AAGF"}