@visactor/vseed 0.1.21 → 0.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +2 -2
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/builder/builder/builder.d.ts +12 -0
- package/dist/esm/pipeline/advanced/chart/pipeline/area.js +2 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/area.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/areaPercent.js +2 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/areaPercent.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/bar.js +2 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/bar.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/barParallel.js +2 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/barParallel.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/barPercent.js +2 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/barPercent.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/column.js +2 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/column.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/columnParallel.js +2 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/columnParallel.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/columnPercent.js +2 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/columnPercent.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/donut.js +2 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/donut.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/dualAxis.js +2 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/dualAxis.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/funnel.js +2 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/funnel.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/heatmap.js +2 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/heatmap.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/line.js +2 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/line.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/pie.js +2 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/pie.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/radar.js +2 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/radar.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/rose.js +2 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/rose.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/roseParallel.js +2 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/roseParallel.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithDualEncoding.js +2 -2
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithDualEncoding.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithEncoding.js +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithEncoding.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithScatterEncoding.js +2 -2
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithScatterEncoding.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithDualEncoding.js +2 -2
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithDualEncoding.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithEncoding.js +2 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithEncoding.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithScatterEncoding.js +2 -2
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithScatterEncoding.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/donut.js +2 -1
- package/dist/esm/pipeline/spec/chart/pipeline/donut.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/funnel.js +2 -1
- package/dist/esm/pipeline/spec/chart/pipeline/funnel.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/pie.js +2 -1
- package/dist/esm/pipeline/spec/chart/pipeline/pie.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/radar.js +2 -1
- package/dist/esm/pipeline/spec/chart/pipeline/radar.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/rose.js +2 -1
- package/dist/esm/pipeline/spec/chart/pipeline/rose.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/roseParallel.js +2 -1
- package/dist/esm/pipeline/spec/chart/pipeline/roseParallel.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/axes/xLinear.js +9 -3
- package/dist/esm/pipeline/spec/chart/pipes/axes/xLinear.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/axes/yLinear.js +9 -3
- package/dist/esm/pipeline/spec/chart/pipes/axes/yLinear.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/color/colorAdapter.d.ts +3 -3
- package/dist/esm/pipeline/spec/chart/pipes/color/colorAdapter.js +8 -6
- package/dist/esm/pipeline/spec/chart/pipes/color/colorAdapter.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/color/colorAreaStyleFill.js +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/color/colorAreaStyleFill.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/color/colorBarStyleFill.js +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/color/colorBarStyleFill.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/color/colorCellStyleFill.js +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/color/colorCellStyleFill.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/color/colorFunnelStyleFill.js +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/color/colorFunnelStyleFill.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/color/colorLineStyleFill.js +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/color/colorLineStyleFill.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/color/colorPieStyleFill.js +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/color/colorPieStyleFill.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/color/colorPointStyleFill.js +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/color/colorPointStyleFill.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/color/colorRoseStyleFill.js +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/color/colorRoseStyleFill.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/init/area.js +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/init/area.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/init/dualAxis.js +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/init/dualAxis.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/init/line.js +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/init/line.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/init/radar.js +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/init/radar.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/areaStyle.js +9 -1
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/areaStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/curve/curve.d.ts +3 -0
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/curve/curve.js +12 -0
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/curve/curve.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/curve/index.d.ts +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/curve/index.js +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/lineStyle.js +4 -1
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/lineStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/index.d.ts +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/index.js +2 -1
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.js +7 -4
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotHideIndicatorName.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotHideIndicatorName.js +7 -0
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotHideIndicatorName.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/size/scatterSize.js +2 -1
- package/dist/esm/pipeline/spec/chart/pipes/size/scatterSize.js.map +1 -1
- package/dist/esm/pipeline/utils/chatType.d.ts +20 -1
- package/dist/esm/pipeline/utils/chatType.js +18 -10
- package/dist/esm/pipeline/utils/chatType.js.map +1 -1
- package/dist/esm/pipeline/utils/constant.d.ts +22 -0
- package/dist/esm/pipeline/utils/constant.js +23 -1
- package/dist/esm/pipeline/utils/constant.js.map +1 -1
- package/dist/esm/pipeline/utils/format/createNumFormatter.js +2 -1
- package/dist/esm/pipeline/utils/format/createNumFormatter.js.map +1 -1
- package/dist/esm/pipeline/utils/index.d.ts +1 -0
- package/dist/esm/pipeline/utils/index.js +1 -0
- package/dist/esm/theme/dark.js +5 -1
- package/dist/esm/theme/dark.js.map +1 -1
- package/dist/esm/theme/light.js +8 -13
- package/dist/esm/theme/light.js.map +1 -1
- package/dist/esm/types/advancedVSeed.d.ts +4 -0
- package/dist/esm/types/chartType/funnel/funnel.d.ts +2 -2
- package/dist/esm/types/chartType/heatmap/heatmap.d.ts +2 -2
- package/dist/esm/types/properties/chartType/chartType.d.ts +0 -22
- package/dist/esm/types/properties/chartType/chartType.js +1 -23
- package/dist/esm/types/properties/chartType/chartType.js.map +1 -1
- package/dist/esm/types/properties/config/color/color.d.ts +0 -8
- package/dist/esm/types/properties/config/color/color.js.map +1 -1
- package/dist/esm/types/properties/config/config.d.ts +4 -0
- package/dist/esm/types/properties/config/config.js +3 -1
- package/dist/esm/types/properties/config/config.js.map +1 -1
- package/dist/esm/types/properties/theme/customTheme.d.ts +4 -0
- package/dist/umd/index.js +321 -214
- package/dist/umd/index.js.map +1 -1
- package/package.json +3 -3
@@ -1,10 +1,10 @@
|
|
1
1
|
import { isLinearColor } from "./colorAdapter.js";
|
2
2
|
const colorCellStyleFill = (stylePipe)=>(spec, context)=>{
|
3
3
|
const result = stylePipe(spec, context);
|
4
|
-
const { advancedVSeed } = context;
|
4
|
+
const { advancedVSeed, vseed } = context;
|
5
5
|
const { datasetReshapeInfo } = advancedVSeed;
|
6
6
|
const { unfoldInfo } = datasetReshapeInfo[0];
|
7
|
-
if (isLinearColor(advancedVSeed)) {
|
7
|
+
if (isLinearColor(advancedVSeed, vseed)) {
|
8
8
|
if (result?.cell?.style) result.cell.style.fill = {
|
9
9
|
field: unfoldInfo.encodingColor,
|
10
10
|
scale: 'color'
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/color/colorCellStyleFill.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/color/colorCellStyleFill.ts"],"sourcesContent":["import type { IHeatmapChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\nimport { isLinearColor } from './colorAdapter'\n\nexport const colorCellStyleFill = (stylePipe: SpecPipe): SpecPipe => {\n return (spec, context) => {\n const result = stylePipe(spec, context) as IHeatmapChartSpec\n\n const { advancedVSeed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { unfoldInfo } = datasetReshapeInfo[0]\n\n if (isLinearColor(advancedVSeed)) {\n if (result?.cell?.style) {\n result.cell.style.fill = {\n field: unfoldInfo.encodingColor,\n scale: 'color',\n }\n }\n }\n\n return result\n }\n}\n"],"names":["colorCellStyleFill","stylePipe","spec","context","result","advancedVSeed","datasetReshapeInfo","unfoldInfo","isLinearColor"],"mappings":";AAIO,MAAMA,qBAAqB,CAACC,YAC1B,CAACC,MAAMC;QACZ,MAAMC,SAASH,UAAUC,MAAMC;QAE/B,MAAM,EAAEE,aAAa,EAAE,
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/color/colorCellStyleFill.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/color/colorCellStyleFill.ts"],"sourcesContent":["import type { IHeatmapChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\nimport { isLinearColor } from './colorAdapter'\n\nexport const colorCellStyleFill = (stylePipe: SpecPipe): SpecPipe => {\n return (spec, context) => {\n const result = stylePipe(spec, context) as IHeatmapChartSpec\n\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { unfoldInfo } = datasetReshapeInfo[0]\n\n if (isLinearColor(advancedVSeed, vseed)) {\n if (result?.cell?.style) {\n result.cell.style.fill = {\n field: unfoldInfo.encodingColor,\n scale: 'color',\n }\n }\n }\n\n return result\n }\n}\n"],"names":["colorCellStyleFill","stylePipe","spec","context","result","advancedVSeed","vseed","datasetReshapeInfo","unfoldInfo","isLinearColor"],"mappings":";AAIO,MAAMA,qBAAqB,CAACC,YAC1B,CAACC,MAAMC;QACZ,MAAMC,SAASH,UAAUC,MAAMC;QAE/B,MAAM,EAAEE,aAAa,EAAEC,KAAK,EAAE,GAAGH;QACjC,MAAM,EAAEI,kBAAkB,EAAE,GAAGF;QAC/B,MAAM,EAAEG,UAAU,EAAE,GAAGD,kBAAkB,CAAC,EAAE;QAE5C,IAAIE,cAAcJ,eAAeC,QAC/B;YAAA,IAAIF,QAAQ,MAAM,OAChBA,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG;gBACvB,OAAOI,WAAW,aAAa;gBAC/B,OAAO;YACT;QACF;QAGF,OAAOJ;IACT"}
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import { isLinearColor } from "./colorAdapter.js";
|
2
2
|
const colorFunnelStyleFill = (stylePipe)=>(spec, context)=>{
|
3
3
|
const result = stylePipe(spec, context);
|
4
|
-
const { advancedVSeed } = context;
|
4
|
+
const { advancedVSeed, vseed } = context;
|
5
5
|
const { datasetReshapeInfo } = advancedVSeed;
|
6
6
|
const { unfoldInfo } = datasetReshapeInfo[0];
|
7
|
-
if (isLinearColor(advancedVSeed)) {
|
7
|
+
if (isLinearColor(advancedVSeed, vseed)) {
|
8
8
|
if (result?.funnel?.style) result.funnel.style.fill = {
|
9
9
|
field: unfoldInfo.encodingColor,
|
10
10
|
scale: 'color'
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/color/colorFunnelStyleFill.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/color/colorFunnelStyleFill.ts"],"sourcesContent":["import type { IFunnelChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\nimport { isLinearColor } from './colorAdapter'\n\nexport const colorFunnelStyleFill = (stylePipe: SpecPipe): SpecPipe => {\n return (spec, context) => {\n const result = stylePipe(spec, context) as IFunnelChartSpec\n\n const { advancedVSeed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { unfoldInfo } = datasetReshapeInfo[0]\n\n if (isLinearColor(advancedVSeed)) {\n if (result?.funnel?.style) {\n result.funnel.style.fill = {\n field: unfoldInfo.encodingColor,\n scale: 'color',\n }\n }\n }\n\n return result\n }\n}\n"],"names":["colorFunnelStyleFill","stylePipe","spec","context","result","advancedVSeed","datasetReshapeInfo","unfoldInfo","isLinearColor"],"mappings":";AAIO,MAAMA,uBAAuB,CAACC,YAC5B,CAACC,MAAMC;QACZ,MAAMC,SAASH,UAAUC,MAAMC;QAE/B,MAAM,EAAEE,aAAa,EAAE,
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/color/colorFunnelStyleFill.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/color/colorFunnelStyleFill.ts"],"sourcesContent":["import type { IFunnelChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\nimport { isLinearColor } from './colorAdapter'\n\nexport const colorFunnelStyleFill = (stylePipe: SpecPipe): SpecPipe => {\n return (spec, context) => {\n const result = stylePipe(spec, context) as IFunnelChartSpec\n\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { unfoldInfo } = datasetReshapeInfo[0]\n\n if (isLinearColor(advancedVSeed, vseed)) {\n if (result?.funnel?.style) {\n result.funnel.style.fill = {\n field: unfoldInfo.encodingColor,\n scale: 'color',\n }\n }\n }\n\n return result\n }\n}\n"],"names":["colorFunnelStyleFill","stylePipe","spec","context","result","advancedVSeed","vseed","datasetReshapeInfo","unfoldInfo","isLinearColor"],"mappings":";AAIO,MAAMA,uBAAuB,CAACC,YAC5B,CAACC,MAAMC;QACZ,MAAMC,SAASH,UAAUC,MAAMC;QAE/B,MAAM,EAAEE,aAAa,EAAEC,KAAK,EAAE,GAAGH;QACjC,MAAM,EAAEI,kBAAkB,EAAE,GAAGF;QAC/B,MAAM,EAAEG,UAAU,EAAE,GAAGD,kBAAkB,CAAC,EAAE;QAE5C,IAAIE,cAAcJ,eAAeC,QAC/B;YAAA,IAAIF,QAAQ,QAAQ,OAClBA,OAAO,MAAM,CAAC,KAAK,CAAC,IAAI,GAAG;gBACzB,OAAOI,WAAW,aAAa;gBAC/B,OAAO;YACT;QACF;QAGF,OAAOJ;IACT"}
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import { isLinearColor } from "./colorAdapter.js";
|
2
2
|
const colorLineStyleFill = (stylePipe)=>(spec, context)=>{
|
3
3
|
const result = stylePipe(spec, context);
|
4
|
-
const { advancedVSeed } = context;
|
4
|
+
const { advancedVSeed, vseed } = context;
|
5
5
|
const { datasetReshapeInfo } = advancedVSeed;
|
6
6
|
const { unfoldInfo } = datasetReshapeInfo[0];
|
7
|
-
if (isLinearColor(advancedVSeed)) {
|
7
|
+
if (isLinearColor(advancedVSeed, vseed)) {
|
8
8
|
if (result?.line?.style) result.line.style.stroke = {
|
9
9
|
field: unfoldInfo.encodingColor,
|
10
10
|
scale: 'color'
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/color/colorLineStyleFill.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/color/colorLineStyleFill.ts"],"sourcesContent":["import type { ILineChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\nimport { isLinearColor } from './colorAdapter'\n\nexport const colorLineStyleFill = (stylePipe: SpecPipe): SpecPipe => {\n return (spec, context) => {\n const result = stylePipe(spec, context) as ILineChartSpec\n\n const { advancedVSeed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { unfoldInfo } = datasetReshapeInfo[0]\n\n if (isLinearColor(advancedVSeed)) {\n if (result?.line?.style) {\n result.line.style.stroke = {\n field: unfoldInfo.encodingColor,\n scale: 'color',\n }\n }\n }\n\n return result\n }\n}\n"],"names":["colorLineStyleFill","stylePipe","spec","context","result","advancedVSeed","datasetReshapeInfo","unfoldInfo","isLinearColor"],"mappings":";AAIO,MAAMA,qBAAqB,CAACC,YAC1B,CAACC,MAAMC;QACZ,MAAMC,SAASH,UAAUC,MAAMC;QAE/B,MAAM,EAAEE,aAAa,EAAE,
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/color/colorLineStyleFill.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/color/colorLineStyleFill.ts"],"sourcesContent":["import type { ILineChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\nimport { isLinearColor } from './colorAdapter'\n\nexport const colorLineStyleFill = (stylePipe: SpecPipe): SpecPipe => {\n return (spec, context) => {\n const result = stylePipe(spec, context) as ILineChartSpec\n\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { unfoldInfo } = datasetReshapeInfo[0]\n\n if (isLinearColor(advancedVSeed, vseed)) {\n if (result?.line?.style) {\n result.line.style.stroke = {\n field: unfoldInfo.encodingColor,\n scale: 'color',\n }\n }\n }\n\n return result\n }\n}\n"],"names":["colorLineStyleFill","stylePipe","spec","context","result","advancedVSeed","vseed","datasetReshapeInfo","unfoldInfo","isLinearColor"],"mappings":";AAIO,MAAMA,qBAAqB,CAACC,YAC1B,CAACC,MAAMC;QACZ,MAAMC,SAASH,UAAUC,MAAMC;QAE/B,MAAM,EAAEE,aAAa,EAAEC,KAAK,EAAE,GAAGH;QACjC,MAAM,EAAEI,kBAAkB,EAAE,GAAGF;QAC/B,MAAM,EAAEG,UAAU,EAAE,GAAGD,kBAAkB,CAAC,EAAE;QAE5C,IAAIE,cAAcJ,eAAeC,QAC/B;YAAA,IAAIF,QAAQ,MAAM,OAChBA,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG;gBACzB,OAAOI,WAAW,aAAa;gBAC/B,OAAO;YACT;QACF;QAGF,OAAOJ;IACT"}
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import { isLinearColor } from "./colorAdapter.js";
|
2
2
|
const colorPieStyleFill = (stylePipe)=>(spec, context)=>{
|
3
3
|
const result = stylePipe(spec, context);
|
4
|
-
const { advancedVSeed } = context;
|
4
|
+
const { advancedVSeed, vseed } = context;
|
5
5
|
const { datasetReshapeInfo } = advancedVSeed;
|
6
6
|
const { unfoldInfo } = datasetReshapeInfo[0];
|
7
|
-
if (isLinearColor(advancedVSeed)) {
|
7
|
+
if (isLinearColor(advancedVSeed, vseed)) {
|
8
8
|
if (result?.pie?.style) result.pie.style.fill = {
|
9
9
|
field: unfoldInfo.encodingColor,
|
10
10
|
scale: 'color'
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/color/colorPieStyleFill.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/color/colorPieStyleFill.ts"],"sourcesContent":["import type { IPieChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\nimport { isLinearColor } from './colorAdapter'\n\nexport const colorPieStyleFill = (stylePipe: SpecPipe): SpecPipe => {\n return (spec, context) => {\n const result = stylePipe(spec, context) as IPieChartSpec\n\n const { advancedVSeed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { unfoldInfo } = datasetReshapeInfo[0]\n\n if (isLinearColor(advancedVSeed)) {\n if (result?.pie?.style) {\n result.pie.style.fill = {\n field: unfoldInfo.encodingColor,\n scale: 'color',\n }\n }\n }\n\n return result\n }\n}\n"],"names":["colorPieStyleFill","stylePipe","spec","context","result","advancedVSeed","datasetReshapeInfo","unfoldInfo","isLinearColor"],"mappings":";AAIO,MAAMA,oBAAoB,CAACC,YACzB,CAACC,MAAMC;QACZ,MAAMC,SAASH,UAAUC,MAAMC;QAE/B,MAAM,EAAEE,aAAa,EAAE,
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/color/colorPieStyleFill.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/color/colorPieStyleFill.ts"],"sourcesContent":["import type { IPieChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\nimport { isLinearColor } from './colorAdapter'\n\nexport const colorPieStyleFill = (stylePipe: SpecPipe): SpecPipe => {\n return (spec, context) => {\n const result = stylePipe(spec, context) as IPieChartSpec\n\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { unfoldInfo } = datasetReshapeInfo[0]\n\n if (isLinearColor(advancedVSeed, vseed)) {\n if (result?.pie?.style) {\n result.pie.style.fill = {\n field: unfoldInfo.encodingColor,\n scale: 'color',\n }\n }\n }\n\n return result\n }\n}\n"],"names":["colorPieStyleFill","stylePipe","spec","context","result","advancedVSeed","vseed","datasetReshapeInfo","unfoldInfo","isLinearColor"],"mappings":";AAIO,MAAMA,oBAAoB,CAACC,YACzB,CAACC,MAAMC;QACZ,MAAMC,SAASH,UAAUC,MAAMC;QAE/B,MAAM,EAAEE,aAAa,EAAEC,KAAK,EAAE,GAAGH;QACjC,MAAM,EAAEI,kBAAkB,EAAE,GAAGF;QAC/B,MAAM,EAAEG,UAAU,EAAE,GAAGD,kBAAkB,CAAC,EAAE;QAE5C,IAAIE,cAAcJ,eAAeC,QAC/B;YAAA,IAAIF,QAAQ,KAAK,OACfA,OAAO,GAAG,CAAC,KAAK,CAAC,IAAI,GAAG;gBACtB,OAAOI,WAAW,aAAa;gBAC/B,OAAO;YACT;QACF;QAGF,OAAOJ;IACT"}
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import { isLinearColor } from "./colorAdapter.js";
|
2
2
|
const colorPointStyleFill = (stylePipe)=>(spec, context)=>{
|
3
3
|
const result = stylePipe(spec, context);
|
4
|
-
const { advancedVSeed } = context;
|
4
|
+
const { advancedVSeed, vseed } = context;
|
5
5
|
const { datasetReshapeInfo } = advancedVSeed;
|
6
6
|
const { unfoldInfo } = datasetReshapeInfo[0];
|
7
|
-
if (isLinearColor(advancedVSeed)) {
|
7
|
+
if (isLinearColor(advancedVSeed, vseed)) {
|
8
8
|
if (result?.point?.style) result.point.style.fill = {
|
9
9
|
field: unfoldInfo.encodingColor,
|
10
10
|
scale: 'color'
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/color/colorPointStyleFill.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/color/colorPointStyleFill.ts"],"sourcesContent":["import type { ILineChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\nimport { isLinearColor } from './colorAdapter'\n\nexport const colorPointStyleFill = (stylePipe: SpecPipe): SpecPipe => {\n return (spec, context) => {\n const result = stylePipe(spec, context) as ILineChartSpec\n\n const { advancedVSeed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { unfoldInfo } = datasetReshapeInfo[0]\n\n if (isLinearColor(advancedVSeed)) {\n if (result?.point?.style) {\n result.point.style.fill = {\n field: unfoldInfo.encodingColor,\n scale: 'color',\n }\n }\n }\n\n return result\n }\n}\n"],"names":["colorPointStyleFill","stylePipe","spec","context","result","advancedVSeed","datasetReshapeInfo","unfoldInfo","isLinearColor"],"mappings":";AAIO,MAAMA,sBAAsB,CAACC,YAC3B,CAACC,MAAMC;QACZ,MAAMC,SAASH,UAAUC,MAAMC;QAE/B,MAAM,EAAEE,aAAa,EAAE,
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/color/colorPointStyleFill.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/color/colorPointStyleFill.ts"],"sourcesContent":["import type { ILineChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\nimport { isLinearColor } from './colorAdapter'\n\nexport const colorPointStyleFill = (stylePipe: SpecPipe): SpecPipe => {\n return (spec, context) => {\n const result = stylePipe(spec, context) as ILineChartSpec\n\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { unfoldInfo } = datasetReshapeInfo[0]\n\n if (isLinearColor(advancedVSeed, vseed)) {\n if (result?.point?.style) {\n result.point.style.fill = {\n field: unfoldInfo.encodingColor,\n scale: 'color',\n }\n }\n }\n\n return result\n }\n}\n"],"names":["colorPointStyleFill","stylePipe","spec","context","result","advancedVSeed","vseed","datasetReshapeInfo","unfoldInfo","isLinearColor"],"mappings":";AAIO,MAAMA,sBAAsB,CAACC,YAC3B,CAACC,MAAMC;QACZ,MAAMC,SAASH,UAAUC,MAAMC;QAE/B,MAAM,EAAEE,aAAa,EAAEC,KAAK,EAAE,GAAGH;QACjC,MAAM,EAAEI,kBAAkB,EAAE,GAAGF;QAC/B,MAAM,EAAEG,UAAU,EAAE,GAAGD,kBAAkB,CAAC,EAAE;QAE5C,IAAIE,cAAcJ,eAAeC,QAC/B;YAAA,IAAIF,QAAQ,OAAO,OACjBA,OAAO,KAAK,CAAC,KAAK,CAAC,IAAI,GAAG;gBACxB,OAAOI,WAAW,aAAa;gBAC/B,OAAO;YACT;QACF;QAGF,OAAOJ;IACT"}
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import { isLinearColor } from "./colorAdapter.js";
|
2
2
|
const colorRoseStyleFill = (stylePipe)=>(spec, context)=>{
|
3
3
|
const result = stylePipe(spec, context);
|
4
|
-
const { advancedVSeed } = context;
|
4
|
+
const { advancedVSeed, vseed } = context;
|
5
5
|
const { datasetReshapeInfo } = advancedVSeed;
|
6
6
|
const { unfoldInfo } = datasetReshapeInfo[0];
|
7
|
-
if (isLinearColor(advancedVSeed)) {
|
7
|
+
if (isLinearColor(advancedVSeed, vseed)) {
|
8
8
|
if (result?.rose?.style) result.rose.style.fill = {
|
9
9
|
field: unfoldInfo.encodingColor,
|
10
10
|
scale: 'color'
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/color/colorRoseStyleFill.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/color/colorRoseStyleFill.ts"],"sourcesContent":["import type { IRoseChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\nimport { isLinearColor } from './colorAdapter'\n\nexport const colorRoseStyleFill = (stylePipe: SpecPipe): SpecPipe => {\n return (spec, context) => {\n const result = stylePipe(spec, context) as IRoseChartSpec\n\n const { advancedVSeed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { unfoldInfo } = datasetReshapeInfo[0]\n\n if (isLinearColor(advancedVSeed)) {\n if (result?.rose?.style) {\n result.rose.style.fill = {\n field: unfoldInfo.encodingColor,\n scale: 'color',\n }\n }\n }\n\n return result\n }\n}\n"],"names":["colorRoseStyleFill","stylePipe","spec","context","result","advancedVSeed","datasetReshapeInfo","unfoldInfo","isLinearColor"],"mappings":";AAIO,MAAMA,qBAAqB,CAACC,YAC1B,CAACC,MAAMC;QACZ,MAAMC,SAASH,UAAUC,MAAMC;QAE/B,MAAM,EAAEE,aAAa,EAAE,
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/color/colorRoseStyleFill.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/color/colorRoseStyleFill.ts"],"sourcesContent":["import type { IRoseChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\nimport { isLinearColor } from './colorAdapter'\n\nexport const colorRoseStyleFill = (stylePipe: SpecPipe): SpecPipe => {\n return (spec, context) => {\n const result = stylePipe(spec, context) as IRoseChartSpec\n\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { unfoldInfo } = datasetReshapeInfo[0]\n\n if (isLinearColor(advancedVSeed, vseed)) {\n if (result?.rose?.style) {\n result.rose.style.fill = {\n field: unfoldInfo.encodingColor,\n scale: 'color',\n }\n }\n }\n\n return result\n }\n}\n"],"names":["colorRoseStyleFill","stylePipe","spec","context","result","advancedVSeed","vseed","datasetReshapeInfo","unfoldInfo","isLinearColor"],"mappings":";AAIO,MAAMA,qBAAqB,CAACC,YAC1B,CAACC,MAAMC;QACZ,MAAMC,SAASH,UAAUC,MAAMC;QAE/B,MAAM,EAAEE,aAAa,EAAEC,KAAK,EAAE,GAAGH;QACjC,MAAM,EAAEI,kBAAkB,EAAE,GAAGF;QAC/B,MAAM,EAAEG,UAAU,EAAE,GAAGD,kBAAkB,CAAC,EAAE;QAE5C,IAAIE,cAAcJ,eAAeC,QAC/B;YAAA,IAAIF,QAAQ,MAAM,OAChBA,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG;gBACvB,OAAOI,WAAW,aAAa;gBAC/B,OAAO;YACT;QACF;QAGF,OAAOJ;IACT"}
|
@@ -3,14 +3,14 @@ const initArea = (spec, context)=>{
|
|
3
3
|
const result = {
|
4
4
|
...spec
|
5
5
|
};
|
6
|
-
const { advancedVSeed } = context;
|
6
|
+
const { advancedVSeed, vseed } = context;
|
7
7
|
const { datasetReshapeInfo } = advancedVSeed;
|
8
8
|
const { unfoldInfo, foldInfo } = datasetReshapeInfo[0];
|
9
9
|
result.type = 'area';
|
10
10
|
result.direction = 'vertical';
|
11
11
|
result.yField = foldInfo.measureValue;
|
12
12
|
result.xField = unfoldInfo.encodingX;
|
13
|
-
result.seriesField = isLinearColor(advancedVSeed) ? unfoldInfo.encodingDetail : unfoldInfo.encodingColorId;
|
13
|
+
result.seriesField = isLinearColor(advancedVSeed, vseed) ? unfoldInfo.encodingDetail : unfoldInfo.encodingColorId;
|
14
14
|
result.padding = 0;
|
15
15
|
result.region = [
|
16
16
|
{
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/init/area.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/init/area.ts"],"sourcesContent":["import type { IAreaChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\nimport { isLinearColor } from '../color/colorAdapter'\n\nexport const initArea: SpecPipe = (spec, context) => {\n const result = { ...spec } as IAreaChartSpec\n const { advancedVSeed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { unfoldInfo, foldInfo } = datasetReshapeInfo[0]\n\n result.type = 'area'\n result.direction = 'vertical'\n result.yField = foldInfo.measureValue\n\n result.xField = unfoldInfo.encodingX\n result.seriesField = isLinearColor(advancedVSeed) ? unfoldInfo.encodingDetail : unfoldInfo.encodingColorId\n result.padding = 0\n result.region = [\n {\n clip: true,\n },\n ]\n result.animation = true\n return result\n}\n"],"names":["initArea","spec","context","result","advancedVSeed","datasetReshapeInfo","unfoldInfo","foldInfo","isLinearColor"],"mappings":";AAIO,MAAMA,WAAqB,CAACC,MAAMC;IACvC,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/init/area.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/init/area.ts"],"sourcesContent":["import type { IAreaChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\nimport { isLinearColor } from '../color/colorAdapter'\n\nexport const initArea: SpecPipe = (spec, context) => {\n const result = { ...spec } as IAreaChartSpec\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { unfoldInfo, foldInfo } = datasetReshapeInfo[0]\n\n result.type = 'area'\n result.direction = 'vertical'\n result.yField = foldInfo.measureValue\n\n result.xField = unfoldInfo.encodingX\n result.seriesField = isLinearColor(advancedVSeed, vseed) ? unfoldInfo.encodingDetail : unfoldInfo.encodingColorId\n result.padding = 0\n result.region = [\n {\n clip: true,\n },\n ]\n result.animation = true\n return result\n}\n"],"names":["initArea","spec","context","result","advancedVSeed","vseed","datasetReshapeInfo","unfoldInfo","foldInfo","isLinearColor"],"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,UAAU,EAAEC,QAAQ,EAAE,GAAGF,kBAAkB,CAAC,EAAE;IAEtDH,OAAO,IAAI,GAAG;IACdA,OAAO,SAAS,GAAG;IACnBA,OAAO,MAAM,GAAGK,SAAS,YAAY;IAErCL,OAAO,MAAM,GAAGI,WAAW,SAAS;IACpCJ,OAAO,WAAW,GAAGM,cAAcL,eAAeC,SAASE,WAAW,cAAc,GAAGA,WAAW,eAAe;IACjHJ,OAAO,OAAO,GAAG;IACjBA,OAAO,MAAM,GAAG;QACd;YACE,MAAM;QACR;KACD;IACDA,OAAO,SAAS,GAAG;IACnB,OAAOA;AACT"}
|
@@ -19,7 +19,7 @@ const initDualAxisSecondary = (spec, context)=>{
|
|
19
19
|
const result = {
|
20
20
|
...spec
|
21
21
|
};
|
22
|
-
const { advancedVSeed } = context;
|
22
|
+
const { advancedVSeed, vseed } = context;
|
23
23
|
const { datasetReshapeInfo } = advancedVSeed;
|
24
24
|
const { unfoldInfo, foldInfoList, id } = datasetReshapeInfo[0];
|
25
25
|
result.id = `${id}-secondary-series`;
|
@@ -27,7 +27,7 @@ const initDualAxisSecondary = (spec, context)=>{
|
|
27
27
|
result.direction = 'vertical';
|
28
28
|
result.xField = unfoldInfo.encodingX;
|
29
29
|
if (foldInfoList?.[1]) result.yField = foldInfoList[1].measureValue;
|
30
|
-
result.seriesField = isLinearColor(advancedVSeed) ? unfoldInfo.encodingDetail : unfoldInfo.encodingColorId;
|
30
|
+
result.seriesField = isLinearColor(advancedVSeed, vseed) ? unfoldInfo.encodingDetail : unfoldInfo.encodingColorId;
|
31
31
|
result.animation = true;
|
32
32
|
return result;
|
33
33
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/init/dualAxis.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/init/dualAxis.ts"],"sourcesContent":["import type { IBarSeriesSpec, ILineSeriesSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\nimport { isLinearColor } from '../color/colorAdapter'\n\nexport const initDualAxisPrimary: SpecPipe = (spec, context) => {\n const result = { ...spec } as IBarSeriesSpec\n const { advancedVSeed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { unfoldInfo, foldInfoList, id } = datasetReshapeInfo[0]\n\n result.id = `${id}-primary-series`\n result.type = 'bar'\n result.direction = 'vertical'\n result.xField = unfoldInfo.encodingX\n result.seriesField = unfoldInfo.encodingColorId\n\n result.yField = foldInfoList?.[0].measureValue\n result.animation = true\n\n return result\n}\n\nexport const initDualAxisSecondary: SpecPipe = (spec, context) => {\n const result = { ...spec } as ILineSeriesSpec\n const { advancedVSeed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { unfoldInfo, foldInfoList, id } = datasetReshapeInfo[0]\n\n result.id = `${id}-secondary-series`\n result.type = 'line'\n result.direction = 'vertical'\n result.xField = unfoldInfo.encodingX\n if (foldInfoList?.[1]) {\n result.yField = foldInfoList[1].measureValue\n }\n\n result.seriesField = isLinearColor(advancedVSeed) ? unfoldInfo.encodingDetail : unfoldInfo.encodingColorId\n\n result.animation = true\n\n return result\n}\n"],"names":["initDualAxisPrimary","spec","context","result","advancedVSeed","datasetReshapeInfo","unfoldInfo","foldInfoList","id","initDualAxisSecondary","isLinearColor"],"mappings":";AAIO,MAAMA,sBAAgC,CAACC,MAAMC;IAClD,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,kBAAkB,EAAE,GAAGD;IAC/B,MAAM,EAAEE,UAAU,EAAEC,YAAY,EAAEC,EAAE,EAAE,GAAGH,kBAAkB,CAAC,EAAE;IAE9DF,OAAO,EAAE,GAAG,GAAGK,GAAG,eAAe,CAAC;IAClCL,OAAO,IAAI,GAAG;IACdA,OAAO,SAAS,GAAG;IACnBA,OAAO,MAAM,GAAGG,WAAW,SAAS;IACpCH,OAAO,WAAW,GAAGG,WAAW,eAAe;IAE/CH,OAAO,MAAM,GAAGI,cAAc,CAAC,EAAE,CAAC;IAClCJ,OAAO,SAAS,GAAG;IAEnB,OAAOA;AACT;AAEO,MAAMM,wBAAkC,CAACR,MAAMC;IACpD,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/init/dualAxis.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/init/dualAxis.ts"],"sourcesContent":["import type { IBarSeriesSpec, ILineSeriesSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\nimport { isLinearColor } from '../color/colorAdapter'\n\nexport const initDualAxisPrimary: SpecPipe = (spec, context) => {\n const result = { ...spec } as IBarSeriesSpec\n const { advancedVSeed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { unfoldInfo, foldInfoList, id } = datasetReshapeInfo[0]\n\n result.id = `${id}-primary-series`\n result.type = 'bar'\n result.direction = 'vertical'\n result.xField = unfoldInfo.encodingX\n result.seriesField = unfoldInfo.encodingColorId\n\n result.yField = foldInfoList?.[0].measureValue\n result.animation = true\n\n return result\n}\n\nexport const initDualAxisSecondary: SpecPipe = (spec, context) => {\n const result = { ...spec } as ILineSeriesSpec\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { unfoldInfo, foldInfoList, id } = datasetReshapeInfo[0]\n\n result.id = `${id}-secondary-series`\n result.type = 'line'\n result.direction = 'vertical'\n result.xField = unfoldInfo.encodingX\n if (foldInfoList?.[1]) {\n result.yField = foldInfoList[1].measureValue\n }\n\n result.seriesField = isLinearColor(advancedVSeed, vseed) ? unfoldInfo.encodingDetail : unfoldInfo.encodingColorId\n\n result.animation = true\n\n return result\n}\n"],"names":["initDualAxisPrimary","spec","context","result","advancedVSeed","datasetReshapeInfo","unfoldInfo","foldInfoList","id","initDualAxisSecondary","vseed","isLinearColor"],"mappings":";AAIO,MAAMA,sBAAgC,CAACC,MAAMC;IAClD,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,kBAAkB,EAAE,GAAGD;IAC/B,MAAM,EAAEE,UAAU,EAAEC,YAAY,EAAEC,EAAE,EAAE,GAAGH,kBAAkB,CAAC,EAAE;IAE9DF,OAAO,EAAE,GAAG,GAAGK,GAAG,eAAe,CAAC;IAClCL,OAAO,IAAI,GAAG;IACdA,OAAO,SAAS,GAAG;IACnBA,OAAO,MAAM,GAAGG,WAAW,SAAS;IACpCH,OAAO,WAAW,GAAGG,WAAW,eAAe;IAE/CH,OAAO,MAAM,GAAGI,cAAc,CAAC,EAAE,CAAC;IAClCJ,OAAO,SAAS,GAAG;IAEnB,OAAOA;AACT;AAEO,MAAMM,wBAAkC,CAACR,MAAMC;IACpD,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAEM,KAAK,EAAE,GAAGR;IACjC,MAAM,EAAEG,kBAAkB,EAAE,GAAGD;IAC/B,MAAM,EAAEE,UAAU,EAAEC,YAAY,EAAEC,EAAE,EAAE,GAAGH,kBAAkB,CAAC,EAAE;IAE9DF,OAAO,EAAE,GAAG,GAAGK,GAAG,iBAAiB,CAAC;IACpCL,OAAO,IAAI,GAAG;IACdA,OAAO,SAAS,GAAG;IACnBA,OAAO,MAAM,GAAGG,WAAW,SAAS;IACpC,IAAIC,cAAc,CAAC,EAAE,EACnBJ,OAAO,MAAM,GAAGI,YAAY,CAAC,EAAE,CAAC,YAAY;IAG9CJ,OAAO,WAAW,GAAGQ,cAAcP,eAAeM,SAASJ,WAAW,cAAc,GAAGA,WAAW,eAAe;IAEjHH,OAAO,SAAS,GAAG;IAEnB,OAAOA;AACT"}
|
@@ -3,14 +3,14 @@ const initLine = (spec, context)=>{
|
|
3
3
|
const result = {
|
4
4
|
...spec
|
5
5
|
};
|
6
|
-
const { advancedVSeed } = context;
|
6
|
+
const { advancedVSeed, vseed } = context;
|
7
7
|
const { datasetReshapeInfo } = advancedVSeed;
|
8
8
|
const { foldInfo, unfoldInfo } = datasetReshapeInfo[0];
|
9
9
|
result.type = 'line';
|
10
10
|
result.direction = 'vertical';
|
11
11
|
result.xField = unfoldInfo.encodingX;
|
12
12
|
result.yField = foldInfo.measureValue;
|
13
|
-
result.seriesField = isLinearColor(advancedVSeed) ? unfoldInfo.encodingDetail : unfoldInfo.encodingColorId;
|
13
|
+
result.seriesField = isLinearColor(advancedVSeed, vseed) ? unfoldInfo.encodingDetail : unfoldInfo.encodingColorId;
|
14
14
|
result.padding = 0;
|
15
15
|
result.region = [
|
16
16
|
{
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/init/line.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/init/line.ts"],"sourcesContent":["import type { ILineChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\nimport { isLinearColor } from '../color/colorAdapter'\n\nexport const initLine: SpecPipe = (spec, context) => {\n const result = { ...spec } as ILineChartSpec\n const { advancedVSeed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { foldInfo, unfoldInfo } = datasetReshapeInfo[0]\n\n result.type = 'line'\n result.direction = 'vertical'\n result.xField = unfoldInfo.encodingX\n result.yField = foldInfo.measureValue\n result.seriesField = isLinearColor(advancedVSeed) ? unfoldInfo.encodingDetail : unfoldInfo.encodingColorId\n result.padding = 0\n result.region = [\n {\n clip: true,\n },\n ]\n result.animation = true\n\n return result\n}\n"],"names":["initLine","spec","context","result","advancedVSeed","datasetReshapeInfo","foldInfo","unfoldInfo","isLinearColor"],"mappings":";AAIO,MAAMA,WAAqB,CAACC,MAAMC;IACvC,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/init/line.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/init/line.ts"],"sourcesContent":["import type { ILineChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\nimport { isLinearColor } from '../color/colorAdapter'\n\nexport const initLine: SpecPipe = (spec, context) => {\n const result = { ...spec } as ILineChartSpec\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { foldInfo, unfoldInfo } = datasetReshapeInfo[0]\n\n result.type = 'line'\n result.direction = 'vertical'\n result.xField = unfoldInfo.encodingX\n result.yField = foldInfo.measureValue\n result.seriesField = isLinearColor(advancedVSeed, vseed) ? unfoldInfo.encodingDetail : unfoldInfo.encodingColorId\n result.padding = 0\n result.region = [\n {\n clip: true,\n },\n ]\n result.animation = true\n\n return result\n}\n"],"names":["initLine","spec","context","result","advancedVSeed","vseed","datasetReshapeInfo","foldInfo","unfoldInfo","isLinearColor"],"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,QAAQ,EAAEC,UAAU,EAAE,GAAGF,kBAAkB,CAAC,EAAE;IAEtDH,OAAO,IAAI,GAAG;IACdA,OAAO,SAAS,GAAG;IACnBA,OAAO,MAAM,GAAGK,WAAW,SAAS;IACpCL,OAAO,MAAM,GAAGI,SAAS,YAAY;IACrCJ,OAAO,WAAW,GAAGM,cAAcL,eAAeC,SAASG,WAAW,cAAc,GAAGA,WAAW,eAAe;IACjHL,OAAO,OAAO,GAAG;IACjBA,OAAO,MAAM,GAAG;QACd;YACE,MAAM;QACR;KACD;IACDA,OAAO,SAAS,GAAG;IAEnB,OAAOA;AACT"}
|
@@ -3,13 +3,13 @@ const initRadar = (spec, context)=>{
|
|
3
3
|
const result = {
|
4
4
|
...spec
|
5
5
|
};
|
6
|
-
const { advancedVSeed } = context;
|
6
|
+
const { advancedVSeed, vseed } = context;
|
7
7
|
const { datasetReshapeInfo } = advancedVSeed;
|
8
8
|
const { unfoldInfo, foldInfo } = datasetReshapeInfo[0];
|
9
9
|
result.type = 'radar';
|
10
10
|
result.angleField = unfoldInfo.encodingAngle;
|
11
11
|
result.radiusField = foldInfo.measureValue;
|
12
|
-
result.seriesField = isLinearColor(advancedVSeed) ? unfoldInfo.encodingDetail : unfoldInfo.encodingColorId;
|
12
|
+
result.seriesField = isLinearColor(advancedVSeed, vseed) ? unfoldInfo.encodingDetail : unfoldInfo.encodingColorId;
|
13
13
|
result.padding = 0;
|
14
14
|
result.region = [
|
15
15
|
{
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/init/radar.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/init/radar.ts"],"sourcesContent":["import type { IRadarChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\nimport { isLinearColor } from '../color/colorAdapter'\n\nexport const initRadar: SpecPipe = (spec, context) => {\n const result = { ...spec } as IRadarChartSpec\n const { advancedVSeed } = context\n const { datasetReshapeInfo } = advancedVSeed\n\n const { unfoldInfo, foldInfo } = datasetReshapeInfo[0]\n\n result.type = 'radar'\n result.angleField = unfoldInfo.encodingAngle\n result.radiusField = foldInfo.measureValue\n result.seriesField = isLinearColor(advancedVSeed) ? unfoldInfo.encodingDetail : unfoldInfo.encodingColorId\n\n result.padding = 0\n result.region = [\n {\n clip: true,\n },\n ]\n result.animation = true\n return result\n}\n"],"names":["initRadar","spec","context","result","advancedVSeed","datasetReshapeInfo","unfoldInfo","foldInfo","isLinearColor"],"mappings":";AAIO,MAAMA,YAAsB,CAACC,MAAMC;IACxC,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/init/radar.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/init/radar.ts"],"sourcesContent":["import type { IRadarChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\nimport { isLinearColor } from '../color/colorAdapter'\n\nexport const initRadar: SpecPipe = (spec, context) => {\n const result = { ...spec } as IRadarChartSpec\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo } = advancedVSeed\n\n const { unfoldInfo, foldInfo } = datasetReshapeInfo[0]\n\n result.type = 'radar'\n result.angleField = unfoldInfo.encodingAngle\n result.radiusField = foldInfo.measureValue\n result.seriesField = isLinearColor(advancedVSeed, vseed) ? unfoldInfo.encodingDetail : unfoldInfo.encodingColorId\n\n result.padding = 0\n result.region = [\n {\n clip: true,\n },\n ]\n result.animation = true\n return result\n}\n"],"names":["initRadar","spec","context","result","advancedVSeed","vseed","datasetReshapeInfo","unfoldInfo","foldInfo","isLinearColor"],"mappings":";AAIO,MAAMA,YAAsB,CAACC,MAAMC;IACxC,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEI,kBAAkB,EAAE,GAAGF;IAE/B,MAAM,EAAEG,UAAU,EAAEC,QAAQ,EAAE,GAAGF,kBAAkB,CAAC,EAAE;IAEtDH,OAAO,IAAI,GAAG;IACdA,OAAO,UAAU,GAAGI,WAAW,aAAa;IAC5CJ,OAAO,WAAW,GAAGK,SAAS,YAAY;IAC1CL,OAAO,WAAW,GAAGM,cAAcL,eAAeC,SAASE,WAAW,cAAc,GAAGA,WAAW,eAAe;IAEjHJ,OAAO,OAAO,GAAG;IACjBA,OAAO,MAAM,GAAG;QACd;YACE,MAAM;QACR;KACD;IACDA,OAAO,SAAS,GAAG;IACnB,OAAOA;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":"
|
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,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';
|
@@ -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
|
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
|
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'\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
|
-
|
6
|
+
import { pivotHideIndicatorName } from "./pivotHideIndicatorName.js";
|
7
|
+
export { pivotAdapter, pivotColumnDimensions, pivotGridStyle, pivotHideIndicatorName, pivotIndicators, pivotIndicatorsAsCol, pivotIndicatorsAsRow, pivotRowDimensions };
|
@@ -1,4 +1,7 @@
|
|
1
|
-
|
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
|
-
|
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,
|
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,MAAMM,mCAAmCV,kBAAkBI,cAAc;IAEzE,OAAO;QACL,GAAGD,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"}
|
@@ -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
|
-
|
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 (!
|
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,25 @@
|
|
1
|
-
import type
|
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;
|
5
|
+
export declare const isAreaPercent: (vseed: VSeed) => vseed is import("../../types").AreaPercent;
|
6
|
+
export declare const isColumnPercent: (vseed: VSeed) => vseed is import("../../types").ColumnPercent;
|
7
|
+
export declare const isBarPercent: (vseed: VSeed) => vseed is import("../../types").BarPercent;
|
4
8
|
export declare const isVTable: (vseed: VSeed) => boolean;
|
5
9
|
export declare const isVChart: (vseed: VSeed) => boolean;
|
10
|
+
/**
|
11
|
+
* @description 透视图表或组合图
|
12
|
+
* - 透视图表定义: 存在 column 或 row的 encoding
|
13
|
+
* - 组合图表定义: 存在多组指标的情况
|
14
|
+
* - 透视组合图表: 存在 column 或 row的 encoding 且 存在多组指标的情况
|
15
|
+
* 上述三者都只能使用 VTable.PivotChart 绘制
|
16
|
+
*/
|
6
17
|
export declare const isPivotChart: (vseed: VSeed) => boolean | undefined;
|
18
|
+
/**
|
19
|
+
* @description 存在column 或 row的encoding
|
20
|
+
*/
|
21
|
+
export declare const isPivot: (vseed: VSeed) => boolean;
|
22
|
+
/**
|
23
|
+
* @description 不存在column 或 row的encoding, 但是有多组指标的情况
|
24
|
+
*/
|
25
|
+
export declare const isCombination: (vseed: VSeed) => boolean | undefined;
|