@visactor/vseed 0.1.34 → 0.1.35
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 +31 -1069
- package/dist/esm/pipeline/advanced/chart/pipes/config/column.d.ts +2 -0
- package/dist/esm/pipeline/advanced/chart/pipes/config/column.js +31 -0
- package/dist/esm/pipeline/advanced/chart/pipes/config/column.js.map +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/config/index.d.ts +19 -3
- package/dist/esm/pipeline/advanced/chart/pipes/config/index.js +21 -3
- package/dist/esm/pipeline/advanced/chart/pipes/config/index.js.map +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/config/line.d.ts +2 -0
- package/dist/esm/pipeline/advanced/chart/pipes/config/line.js +30 -0
- package/dist/esm/pipeline/advanced/chart/pipes/config/line.js.map +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/config/pie.d.ts +2 -0
- package/dist/esm/pipeline/advanced/chart/pipes/config/pie.js +27 -0
- package/dist/esm/pipeline/advanced/chart/pipes/config/pie.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipeline/heatmap.js +2 -2
- package/dist/esm/pipeline/spec/chart/pipeline/heatmap.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/label/label.js +5 -4
- package/dist/esm/pipeline/spec/chart/pipes/label/label.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/legend/discreteLegend.js +26 -11
- package/dist/esm/pipeline/spec/chart/pipes/legend/discreteLegend.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/legend/heatmapColorLegend.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/legend/heatmapColorLegend.js +19 -0
- package/dist/esm/pipeline/spec/chart/pipes/legend/heatmapColorLegend.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/legend/index.d.ts +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/legend/index.js +2 -1
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/cellStyle.js +8 -3
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/cellStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotColumnDimensions.js +0 -1
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotColumnDimensions.js.map +1 -1
- package/dist/esm/pipeline/utils/constant.d.ts +1 -0
- package/dist/esm/pipeline/utils/constant.js +2 -1
- package/dist/esm/pipeline/utils/constant.js.map +1 -1
- package/dist/esm/theme/common/heatmapCell.d.ts +3 -0
- package/dist/esm/theme/common/heatmapCell.js +9 -0
- package/dist/esm/theme/common/heatmapCell.js.map +1 -0
- package/dist/esm/theme/common/table.d.ts +47 -5
- package/dist/esm/theme/common/table.js.map +1 -1
- package/dist/esm/theme/dark/dark.js +2 -0
- package/dist/esm/theme/dark/dark.js.map +1 -1
- package/dist/esm/theme/light/light.js +2 -0
- package/dist/esm/theme/light/light.js.map +1 -1
- package/dist/esm/types/advancedVSeed.d.ts +8 -406
- package/dist/esm/types/properties/config/annotation/zAnnotaion.d.ts +1 -1
- package/dist/esm/types/properties/config/annotation/zAnnotaion.js +2 -2
- package/dist/esm/types/properties/config/annotation/zAnnotaion.js.map +1 -1
- package/dist/esm/types/properties/config/area.d.ts +647 -0
- package/dist/esm/types/properties/config/area.js +26 -0
- package/dist/esm/types/properties/config/area.js.map +1 -0
- package/dist/esm/types/properties/config/axes/bandAxis.d.ts +149 -1
- package/dist/esm/types/properties/config/axes/linearAxis.d.ts +151 -1
- package/dist/esm/types/properties/config/bar.d.ts +970 -0
- package/dist/esm/types/properties/config/bar.js +29 -0
- package/dist/esm/types/properties/config/bar.js.map +1 -0
- package/dist/esm/types/properties/config/column.d.ts +970 -0
- package/dist/esm/types/properties/config/column.js +29 -0
- package/dist/esm/types/properties/config/column.js.map +1 -0
- package/dist/esm/types/properties/config/config.d.ts +4 -5133
- package/dist/esm/types/properties/config/config.js +13 -151
- package/dist/esm/types/properties/config/config.js.map +1 -1
- package/dist/esm/types/properties/config/dualAxis.d.ts +566 -0
- package/dist/esm/types/properties/config/dualAxis.js +29 -0
- package/dist/esm/types/properties/config/dualAxis.js.map +1 -0
- package/dist/esm/types/properties/config/funnel.d.ts +124 -0
- package/dist/esm/types/properties/config/funnel.js +20 -0
- package/dist/esm/types/properties/config/funnel.js.map +1 -0
- package/dist/esm/types/properties/config/funnelTransform/index.d.ts +1 -1
- package/dist/esm/types/properties/config/heatmap/heatmap.d.ts +17 -0
- package/dist/esm/types/properties/config/heatmap/heatmap.js +0 -0
- package/dist/esm/types/properties/config/heatmap/index.d.ts +2 -0
- package/dist/esm/types/properties/config/heatmap/index.js +1 -0
- package/dist/esm/types/properties/config/heatmap/zHeatmap.d.ts +6 -0
- package/dist/esm/types/properties/config/heatmap/zHeatmap.js +9 -0
- package/dist/esm/types/properties/config/heatmap/zHeatmap.js.map +1 -0
- package/dist/esm/types/properties/config/heatmap.d.ts +125 -0
- package/dist/esm/types/properties/config/heatmap.js +20 -0
- package/dist/esm/types/properties/config/heatmap.js.map +1 -0
- package/dist/esm/types/properties/config/index.d.ts +17 -2
- package/dist/esm/types/properties/config/index.js +17 -2
- package/dist/esm/types/properties/config/line.d.ts +324 -0
- package/dist/esm/types/properties/config/line.js +25 -0
- package/dist/esm/types/properties/config/line.js.map +1 -0
- package/dist/esm/types/properties/config/pie.d.ts +364 -0
- package/dist/esm/types/properties/config/pie.js +21 -0
- package/dist/esm/types/properties/config/pie.js.map +1 -0
- package/dist/esm/types/properties/config/pivotGrid/index.d.ts +2 -0
- package/dist/esm/types/properties/config/pivotGrid/index.js +2 -0
- package/dist/esm/types/properties/config/pivotGrid/pivotGrid.d.ts +10 -0
- package/dist/esm/types/properties/config/pivotGrid/pivotGrid.js +12 -0
- package/dist/esm/types/properties/config/pivotGrid/pivotGrid.js.map +1 -0
- package/dist/esm/types/properties/config/pivotTable.d.ts +18 -0
- package/dist/esm/types/properties/config/pivotTable.js +5 -0
- package/dist/esm/types/properties/config/pivotTable.js.map +1 -0
- package/dist/esm/types/properties/config/rose.d.ts +241 -0
- package/dist/esm/types/properties/config/rose.js +19 -0
- package/dist/esm/types/properties/config/rose.js.map +1 -0
- package/dist/esm/types/properties/config/scatter.d.ts +357 -0
- package/dist/esm/types/properties/config/scatter.js +27 -0
- package/dist/esm/types/properties/config/scatter.js.map +1 -0
- package/dist/esm/types/properties/config/table.d.ts +18 -0
- package/dist/esm/types/properties/config/table.js +21 -0
- package/dist/esm/types/properties/config/table.js.map +1 -0
- package/dist/esm/types/properties/theme/customTheme.d.ts +8 -406
- package/dist/umd/index.js +202 -138
- package/dist/umd/index.js.map +1 -1
- package/package.json +3 -3
- package/dist/esm/pipeline/advanced/chart/pipes/config/config.d.ts +0 -17
- package/dist/esm/pipeline/advanced/chart/pipes/config/config.js +0 -89
- package/dist/esm/pipeline/advanced/chart/pipes/config/config.js.map +0 -1
- /package/dist/esm/types/properties/config/funnelTransform/{funntlTransform.d.ts → funnelTransform.d.ts} +0 -0
- /package/dist/esm/types/properties/config/funnelTransform/{funntlTransform.js → funnelTransform.js} +0 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { pick } from "remeda";
|
|
2
|
+
import { replaceNullToUndefined } from "../../../../utils/index.js";
|
|
3
|
+
const columnConfig = (advancedVSeed, context)=>{
|
|
4
|
+
const { vseed } = context;
|
|
5
|
+
const { chartType } = vseed;
|
|
6
|
+
const result = {
|
|
7
|
+
...advancedVSeed
|
|
8
|
+
};
|
|
9
|
+
const pickedConfig = pick(vseed, [
|
|
10
|
+
'backgroundColor',
|
|
11
|
+
'color',
|
|
12
|
+
'label',
|
|
13
|
+
'legend',
|
|
14
|
+
'tooltip',
|
|
15
|
+
'xAxis',
|
|
16
|
+
'yAxis',
|
|
17
|
+
'crosshairRect',
|
|
18
|
+
'stackCornerRadius'
|
|
19
|
+
]);
|
|
20
|
+
const config = replaceNullToUndefined(pickedConfig);
|
|
21
|
+
result.config = {
|
|
22
|
+
...result.config || {},
|
|
23
|
+
[chartType]: {
|
|
24
|
+
...config
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
return result;
|
|
28
|
+
};
|
|
29
|
+
export { columnConfig };
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=column.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipeline/advanced/chart/pipes/config/column.js","sources":["webpack://@visactor/vseed/./src/pipeline/advanced/chart/pipes/config/column.ts"],"sourcesContent":["import { pick } from 'remeda'\nimport { replaceNullToUndefined } from 'src/pipeline/utils'\nimport type { AdvancedPipe, AdvancedVSeed, Config } from 'src/types'\n\nexport const columnConfig: AdvancedPipe = (advancedVSeed, context) => {\n const { vseed } = context\n const { chartType } = vseed\n const result = {\n ...advancedVSeed,\n }\n\n const pickedConfig = pick(vseed, [\n 'backgroundColor',\n 'color',\n 'label',\n 'legend',\n 'tooltip',\n 'xAxis',\n 'yAxis',\n 'crosshairRect',\n 'stackCornerRadius',\n ]) as Config['column']\n\n const config = replaceNullToUndefined(pickedConfig)\n\n result.config = {\n ...(result.config || {}),\n [chartType]: {\n ...config,\n },\n }\n\n return result as AdvancedVSeed\n}\n"],"names":["columnConfig","advancedVSeed","context","vseed","chartType","result","pickedConfig","pick","config","replaceNullToUndefined"],"mappings":";;AAIO,MAAMA,eAA6B,CAACC,eAAeC;IACxD,MAAM,EAAEC,KAAK,EAAE,GAAGD;IAClB,MAAM,EAAEE,SAAS,EAAE,GAAGD;IACtB,MAAME,SAAS;QACb,GAAGJ,aAAa;IAClB;IAEA,MAAMK,eAAeC,KAAKJ,OAAO;QAC/B;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;KACD;IAED,MAAMK,SAASC,uBAAuBH;IAEtCD,OAAO,MAAM,GAAG;QACd,GAAIA,OAAO,MAAM,IAAI,CAAC,CAAC;QACvB,CAACD,UAAU,EAAE;YACX,GAAGI,MAAM;QACX;IACF;IAEA,OAAOH;AACT"}
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { lineConfig } from './line';
|
|
2
|
+
import { columnConfig } from './column';
|
|
3
|
+
import { pieConfig } from './pie';
|
|
4
|
+
import { dualAxisConfig } from './dualAxis';
|
|
5
|
+
import { scatterConfig } from './scatter';
|
|
6
|
+
export { lineConfig, columnConfig, pieConfig, dualAxisConfig, scatterConfig };
|
|
7
|
+
export declare const areaConfig: import("../../../../..").AdvancedPipe;
|
|
8
|
+
export declare const areaPercentConfig: import("../../../../..").AdvancedPipe;
|
|
9
|
+
export declare const barConfig: import("../../../../..").AdvancedPipe;
|
|
10
|
+
export declare const barParallelConfig: import("../../../../..").AdvancedPipe;
|
|
11
|
+
export declare const barPercentConfig: import("../../../../..").AdvancedPipe;
|
|
12
|
+
export declare const columnParallelConfig: import("../../../../..").AdvancedPipe;
|
|
13
|
+
export declare const columnPercentConfig: import("../../../../..").AdvancedPipe;
|
|
14
|
+
export declare const donutConfig: import("../../../../..").AdvancedPipe;
|
|
15
|
+
export declare const roseConfig: import("../../../../..").AdvancedPipe;
|
|
16
|
+
export declare const roseParallelConfig: import("../../../../..").AdvancedPipe;
|
|
17
|
+
export declare const radarConfig: import("../../../../..").AdvancedPipe;
|
|
18
|
+
export declare const funnelConfig: import("../../../../..").AdvancedPipe;
|
|
19
|
+
export declare const heatmapConfig: import("../../../../..").AdvancedPipe;
|
|
@@ -1,3 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { lineConfig } from "./line.js";
|
|
2
|
+
import { columnConfig } from "./column.js";
|
|
3
|
+
import { pieConfig } from "./pie.js";
|
|
4
|
+
import { dualAxisConfig } from "./dualAxis.js";
|
|
5
|
+
import { scatterConfig } from "./scatter.js";
|
|
6
|
+
const areaConfig = lineConfig;
|
|
7
|
+
const areaPercentConfig = lineConfig;
|
|
8
|
+
const barConfig = columnConfig;
|
|
9
|
+
const barParallelConfig = columnConfig;
|
|
10
|
+
const barPercentConfig = columnConfig;
|
|
11
|
+
const columnParallelConfig = columnConfig;
|
|
12
|
+
const columnPercentConfig = columnConfig;
|
|
13
|
+
const donutConfig = pieConfig;
|
|
14
|
+
const roseConfig = pieConfig;
|
|
15
|
+
const roseParallelConfig = pieConfig;
|
|
16
|
+
const radarConfig = pieConfig;
|
|
17
|
+
const funnelConfig = pieConfig;
|
|
18
|
+
const heatmapConfig = pieConfig;
|
|
19
|
+
export { areaConfig, areaPercentConfig, barConfig, barParallelConfig, barPercentConfig, columnConfig, columnParallelConfig, columnPercentConfig, donutConfig, dualAxisConfig, funnelConfig, heatmapConfig, lineConfig, pieConfig, radarConfig, roseConfig, roseParallelConfig, scatterConfig };
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipeline/advanced/chart/pipes/config/index.js","sources":["webpack://@visactor/vseed/./src/pipeline/advanced/chart/pipes/config/index.ts"],"sourcesContent":["import { lineConfig } from './line'\nimport { columnConfig } from './column'\nimport { pieConfig } from './pie'\nimport { dualAxisConfig } from './dualAxis'\nimport { scatterConfig } from './scatter'\n\nexport { lineConfig, columnConfig, pieConfig, dualAxisConfig, scatterConfig }\n\n// area\nexport const areaConfig = lineConfig\nexport const areaPercentConfig = lineConfig\n\n// bar\nexport const barConfig = columnConfig\nexport const barParallelConfig = columnConfig\nexport const barPercentConfig = columnConfig\n\n// column\nexport const columnParallelConfig = columnConfig\nexport const columnPercentConfig = columnConfig\n\n// donut, rose\nexport const donutConfig = pieConfig\nexport const roseConfig = pieConfig\nexport const roseParallelConfig = pieConfig\nexport const radarConfig = pieConfig\n\n// funnel, heatmap\nexport const funnelConfig = pieConfig\nexport const heatmapConfig = pieConfig\n"],"names":["areaConfig","lineConfig","areaPercentConfig","barConfig","columnConfig","barParallelConfig","barPercentConfig","columnParallelConfig","columnPercentConfig","donutConfig","pieConfig","roseConfig","roseParallelConfig","radarConfig","funnelConfig","heatmapConfig"],"mappings":";;;;;AASO,MAAMA,aAAaC;AACnB,MAAMC,oBAAoBD;AAG1B,MAAME,YAAYC;AAClB,MAAMC,oBAAoBD;AAC1B,MAAME,mBAAmBF;AAGzB,MAAMG,uBAAuBH;AAC7B,MAAMI,sBAAsBJ;AAG5B,MAAMK,cAAcC;AACpB,MAAMC,aAAaD;AACnB,MAAME,qBAAqBF;AAC3B,MAAMG,cAAcH;AAGpB,MAAMI,eAAeJ;AACrB,MAAMK,gBAAgBL"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { pick } from "remeda";
|
|
2
|
+
import { replaceNullToUndefined } from "../../../../utils/index.js";
|
|
3
|
+
const lineConfig = (advancedVSeed, context)=>{
|
|
4
|
+
const { vseed } = context;
|
|
5
|
+
const { chartType } = vseed;
|
|
6
|
+
const result = {
|
|
7
|
+
...advancedVSeed
|
|
8
|
+
};
|
|
9
|
+
const pickedConfig = pick(vseed, [
|
|
10
|
+
'backgroundColor',
|
|
11
|
+
'color',
|
|
12
|
+
'label',
|
|
13
|
+
'legend',
|
|
14
|
+
'tooltip',
|
|
15
|
+
'xAxis',
|
|
16
|
+
'yAxis',
|
|
17
|
+
'crosshairLine'
|
|
18
|
+
]);
|
|
19
|
+
const config = replaceNullToUndefined(pickedConfig);
|
|
20
|
+
result.config = {
|
|
21
|
+
...result.config || {},
|
|
22
|
+
[chartType]: {
|
|
23
|
+
...config
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
export { lineConfig };
|
|
29
|
+
|
|
30
|
+
//# sourceMappingURL=line.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipeline/advanced/chart/pipes/config/line.js","sources":["webpack://@visactor/vseed/./src/pipeline/advanced/chart/pipes/config/line.ts"],"sourcesContent":["import { pick } from 'remeda'\nimport { replaceNullToUndefined } from 'src/pipeline/utils'\nimport type { AdvancedPipe, AdvancedVSeed, Config } from 'src/types'\n\nexport const lineConfig: AdvancedPipe = (advancedVSeed, context) => {\n const { vseed } = context\n const { chartType } = vseed\n const result = {\n ...advancedVSeed,\n }\n\n const pickedConfig = pick(vseed, [\n 'backgroundColor',\n 'color',\n 'label',\n 'legend',\n 'tooltip',\n 'xAxis',\n 'yAxis',\n 'crosshairLine',\n ]) as Config['line']\n\n const config = replaceNullToUndefined(pickedConfig)\n\n result.config = {\n ...(result.config || {}),\n [chartType]: {\n ...config,\n },\n }\n\n return result as AdvancedVSeed\n}\n"],"names":["lineConfig","advancedVSeed","context","vseed","chartType","result","pickedConfig","pick","config","replaceNullToUndefined"],"mappings":";;AAIO,MAAMA,aAA2B,CAACC,eAAeC;IACtD,MAAM,EAAEC,KAAK,EAAE,GAAGD;IAClB,MAAM,EAAEE,SAAS,EAAE,GAAGD;IACtB,MAAME,SAAS;QACb,GAAGJ,aAAa;IAClB;IAEA,MAAMK,eAAeC,KAAKJ,OAAO;QAC/B;QACA;QACA;QACA;QACA;QACA;QACA;QACA;KACD;IAED,MAAMK,SAASC,uBAAuBH;IAEtCD,OAAO,MAAM,GAAG;QACd,GAAIA,OAAO,MAAM,IAAI,CAAC,CAAC;QACvB,CAACD,UAAU,EAAE;YACX,GAAGI,MAAM;QACX;IACF;IAEA,OAAOH;AACT"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { pick } from "remeda";
|
|
2
|
+
import { replaceNullToUndefined } from "../../../../utils/index.js";
|
|
3
|
+
const pieConfig = (advancedVSeed, context)=>{
|
|
4
|
+
const { vseed } = context;
|
|
5
|
+
const { chartType } = vseed;
|
|
6
|
+
const result = {
|
|
7
|
+
...advancedVSeed
|
|
8
|
+
};
|
|
9
|
+
const pickedConfig = pick(vseed, [
|
|
10
|
+
'backgroundColor',
|
|
11
|
+
'color',
|
|
12
|
+
'label',
|
|
13
|
+
'legend',
|
|
14
|
+
'tooltip'
|
|
15
|
+
]);
|
|
16
|
+
const config = replaceNullToUndefined(pickedConfig);
|
|
17
|
+
result.config = {
|
|
18
|
+
...result.config || {},
|
|
19
|
+
[chartType]: {
|
|
20
|
+
...config
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
export { pieConfig };
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=pie.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipeline/advanced/chart/pipes/config/pie.js","sources":["webpack://@visactor/vseed/./src/pipeline/advanced/chart/pipes/config/pie.ts"],"sourcesContent":["import { pick } from 'remeda'\nimport { replaceNullToUndefined } from 'src/pipeline/utils'\nimport type { AdvancedPipe, AdvancedVSeed, Config } from 'src/types'\n\nexport const pieConfig: AdvancedPipe = (advancedVSeed, context) => {\n const { vseed } = context\n const { chartType } = vseed\n const result = {\n ...advancedVSeed,\n }\n\n const pickedConfig = pick(vseed, ['backgroundColor', 'color', 'label', 'legend', 'tooltip']) as Config['pie']\n\n const config = replaceNullToUndefined(pickedConfig)\n\n result.config = {\n ...(result.config || {}),\n [chartType]: {\n ...config,\n },\n }\n\n return result as AdvancedVSeed\n}\n"],"names":["pieConfig","advancedVSeed","context","vseed","chartType","result","pickedConfig","pick","config","replaceNullToUndefined"],"mappings":";;AAIO,MAAMA,YAA0B,CAACC,eAAeC;IACrD,MAAM,EAAEC,KAAK,EAAE,GAAGD;IAClB,MAAM,EAAEE,SAAS,EAAE,GAAGD;IACtB,MAAME,SAAS;QACb,GAAGJ,aAAa;IAClB;IAEA,MAAMK,eAAeC,KAAKJ,OAAO;QAAC;QAAmB;QAAS;QAAS;QAAU;KAAU;IAE3F,MAAMK,SAASC,uBAAuBH;IAEtCD,OAAO,MAAM,GAAG;QACd,GAAIA,OAAO,MAAM,IAAI,CAAC,CAAC;QACvB,CAACD,UAAU,EAAE;YACX,GAAGI,MAAM;QACX;IACF;IAEA,OAAOH;AACT"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { annotationArea, annotationHorizontalLine, annotationPoint, annotationVerticalLine, backgroundColor, cellStyle, color, colorAdapter, colorCellStyleFill,
|
|
1
|
+
import { annotationArea, annotationHorizontalLine, annotationPoint, annotationVerticalLine, backgroundColor, cellStyle, color, colorAdapter, colorCellStyleFill, datasetPivot, datasetXY, discreteLegend, heatmapColorLegend, initPivot, label, linearColor, pivotAdapter, pivotColorLegend, pivotColumnDimensions, pivotDiscreteLegend, pivotGridStyle, pivotIndicators, pivotIndicatorsAsRow, pivotRowDimensions, tooltipHeatmap } from "../pipes/index.js";
|
|
2
2
|
import { initHeatmap } from "../pipes/init/heatmap.js";
|
|
3
3
|
const heatmap = [
|
|
4
4
|
initHeatmap,
|
|
@@ -6,7 +6,7 @@ const heatmap = [
|
|
|
6
6
|
datasetXY,
|
|
7
7
|
colorAdapter(color, linearColor),
|
|
8
8
|
label,
|
|
9
|
-
colorAdapter(discreteLegend,
|
|
9
|
+
colorAdapter(discreteLegend, heatmapColorLegend),
|
|
10
10
|
colorCellStyleFill(cellStyle),
|
|
11
11
|
tooltipHeatmap,
|
|
12
12
|
annotationPoint,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipeline/heatmap.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/heatmap.ts"],"sourcesContent":["import type { SpecPipeline } from 'src/types'\nimport {\n datasetXY,\n backgroundColor,\n label,\n tooltipHeatmap,\n initPivot,\n datasetPivot,\n pivotIndicators,\n pivotAdapter,\n pivotIndicatorsAsRow,\n pivotGridStyle,\n pivotColumnDimensions,\n pivotRowDimensions,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n discreteLegend,\n color,\n colorAdapter,\n linearColor,\n
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipeline/heatmap.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipeline/heatmap.ts"],"sourcesContent":["import type { SpecPipeline } from 'src/types'\nimport {\n datasetXY,\n backgroundColor,\n label,\n tooltipHeatmap,\n initPivot,\n datasetPivot,\n pivotIndicators,\n pivotAdapter,\n pivotIndicatorsAsRow,\n pivotGridStyle,\n pivotColumnDimensions,\n pivotRowDimensions,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n discreteLegend,\n color,\n colorAdapter,\n linearColor,\n heatmapColorLegend,\n cellStyle,\n colorCellStyleFill,\n pivotDiscreteLegend,\n pivotColorLegend,\n} from '../pipes'\nimport { initHeatmap } from '../pipes/init/heatmap'\n\nconst heatmap: SpecPipeline = [\n initHeatmap,\n backgroundColor,\n datasetXY,\n colorAdapter(color, linearColor),\n label,\n colorAdapter(discreteLegend, heatmapColorLegend),\n colorCellStyleFill(cellStyle),\n tooltipHeatmap,\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n]\n\nconst pivotHeatmap: SpecPipeline = [\n initPivot,\n pivotGridStyle,\n pivotIndicatorsAsRow,\n datasetPivot,\n pivotIndicators([\n initHeatmap,\n backgroundColor,\n datasetXY,\n colorAdapter(color, linearColor),\n label,\n tooltipHeatmap,\n colorCellStyleFill(cellStyle),\n annotationPoint,\n annotationVerticalLine,\n annotationHorizontalLine,\n annotationArea,\n ]),\n pivotRowDimensions,\n pivotColumnDimensions,\n colorAdapter(pivotDiscreteLegend, pivotColorLegend),\n]\n\nexport const heatmapSpecPipeline: SpecPipeline = [pivotAdapter(heatmap, pivotHeatmap)]\n"],"names":["heatmap","initHeatmap","backgroundColor","datasetXY","colorAdapter","color","linearColor","label","discreteLegend","heatmapColorLegend","colorCellStyleFill","cellStyle","tooltipHeatmap","annotationPoint","annotationVerticalLine","annotationHorizontalLine","annotationArea","pivotHeatmap","initPivot","pivotGridStyle","pivotIndicatorsAsRow","datasetPivot","pivotIndicators","pivotRowDimensions","pivotColumnDimensions","pivotDiscreteLegend","pivotColorLegend","heatmapSpecPipeline","pivotAdapter"],"mappings":";;AA8BA,MAAMA,UAAwB;IAC5BC;IACAC;IACAC;IACAC,aAAaC,OAAOC;IACpBC;IACAH,aAAaI,gBAAgBC;IAC7BC,mBAAmBC;IACnBC;IACAC;IACAC;IACAC;IACAC;CACD;AAED,MAAMC,eAA6B;IACjCC;IACAC;IACAC;IACAC;IACAC,gBAAgB;QACdrB;QACAC;QACAC;QACAC,aAAaC,OAAOC;QACpBC;QACAK;QACAF,mBAAmBC;QACnBE;QACAC;QACAC;QACAC;KACD;IACDO;IACAC;IACApB,aAAaqB,qBAAqBC;CACnC;AAEM,MAAMC,sBAAoC;IAACC,aAAa5B,SAASiB;CAAc"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { createFormatter, createFormatterByMeasure, findMeasureById } from "../../../../utils/index.js";
|
|
2
|
-
import { merge, uniqueBy } from "remeda";
|
|
3
|
-
import { MeasureName } from "../../../../../dataReshape/
|
|
1
|
+
import { DATUM_HIDE_KEY, createFormatter, createFormatterByMeasure, findMeasureById } from "../../../../utils/index.js";
|
|
2
|
+
import { isNumber, merge, uniqueBy } from "remeda";
|
|
3
|
+
import { MeasureName } from "../../../../../dataReshape/constant.js";
|
|
4
4
|
const label_label = (spec, context)=>{
|
|
5
5
|
const result = {
|
|
6
6
|
...spec
|
|
@@ -44,6 +44,7 @@ const buildLabel = (label, vseedMeasures = [], vseedDimensions = [], advancedVSe
|
|
|
44
44
|
const percentFormatter = createFormatter(percentFormat);
|
|
45
45
|
const result = {
|
|
46
46
|
visible: enable,
|
|
47
|
+
dataFilter: (data)=>data.filter((entry)=>entry.data?.[DATUM_HIDE_KEY] !== true),
|
|
47
48
|
formatMethod: (_, datum)=>{
|
|
48
49
|
const result = [];
|
|
49
50
|
const dimLabels = labelDims.map((item)=>{
|
|
@@ -57,7 +58,7 @@ const buildLabel = (label, vseedMeasures = [], vseedDimensions = [], advancedVSe
|
|
|
57
58
|
const measure = findMeasureById(advancedVSeedMeasures, datum[measureId]);
|
|
58
59
|
if (measure) {
|
|
59
60
|
const measureValueLabel = generateMeasureValue(datum[measureValue], measure, autoFormat, numFormat);
|
|
60
|
-
const measurePercentLabel = generateMeasurePercent(datum[measureValue], statistics.sum, percentFormatter);
|
|
61
|
+
const measurePercentLabel = isNumber(datum['__VCHART_ARC_RATIO']) ? generateMeasurePercent(datum['__VCHART_ARC_RATIO'], 1, percentFormatter) : generateMeasurePercent(datum[measureValue], statistics.sum, percentFormatter);
|
|
61
62
|
if (showValue) result.push(measureValueLabel);
|
|
62
63
|
if (showValuePercent) result.push(measurePercentLabel);
|
|
63
64
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/label/label.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/label/label.ts"],"sourcesContent":["import type { IArcLabelSpec, ILineChartSpec } from '@visactor/vchart'\nimport type { ILineLikeLabelSpec } from '@visactor/vchart/esm/series/mixin/interface'\nimport { createFormatter, createFormatterByMeasure, findMeasureById } from '../../../../utils'\nimport type {\n Datum,\n Dimensions,\n Encoding,\n FoldInfo,\n Formatter,\n Label,\n Measure,\n Measures,\n NumFormat,\n SpecPipe,\n} from 'src/types'\nimport { merge, uniqueBy } from 'remeda'\nimport { MeasureName } from 'src/dataReshape'\n\nexport const label: SpecPipe = (spec, context) => {\n const result = { ...spec } as ILineChartSpec\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { chartType, encoding } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { label: Label }\n const foldInfo = datasetReshapeInfo[0].foldInfo as FoldInfo\n\n const { label } = baseConfig\n\n result.label = buildLabel<ILineLikeLabelSpec>(\n label,\n vseed.measures,\n vseed.dimensions,\n advancedVSeed.dimensions,\n advancedVSeed.measures,\n encoding as Encoding,\n [foldInfo],\n )\n\n return result\n}\n\nexport const generateMeasureValue = (\n value: number | string,\n measure: Measure,\n labelAutoFormat?: boolean,\n numFormat: NumFormat = {},\n) => {\n const format = merge(numFormat, measure.numFormat || measure.format)\n const mergedMeasure = { ...measure, numFormat: format, autoFormat: labelAutoFormat || measure.autoFormat }\n\n const formatter = createFormatterByMeasure(mergedMeasure)\n return formatter(value)\n}\n\nexport const generateMeasurePercent = (value: number | string, sum: number, formatter: Formatter) => {\n if (value === undefined || value === null) return String(value)\n const num = Number(value)\n if (Number.isNaN(num)) return String(value)\n\n const percentValue = num / sum\n return formatter(percentValue)\n}\n\nexport const buildLabel = <T extends ILineLikeLabelSpec | IArcLabelSpec>(\n label: Label,\n vseedMeasures: Measures = [],\n vseedDimensions: Dimensions = [],\n advancedVSeedDimensions: Dimensions,\n advancedVSeedMeasures: Measures,\n encoding: Encoding,\n foldInfoList: FoldInfo[],\n): T => {\n const {\n enable,\n wrap,\n showValue,\n showValuePercent,\n showDimension,\n labelOverlap,\n labelColorSmartInvert,\n labelColor,\n labelFontSize,\n labelFontWeight,\n labelBackgroundColor,\n labelPosition,\n autoFormat,\n numFormat = {},\n } = label\n\n const hasDimLabelEncoding = vseedDimensions.some((item) => encoding.label?.includes(item.id))\n\n const labelDims = uniqueBy(\n hasDimLabelEncoding\n ? vseedDimensions.filter((item) => encoding.label?.includes(item.id))\n : showDimension\n ? advancedVSeedDimensions.filter((d) => d.id !== MeasureName)\n : [],\n (item) => item.id,\n )\n\n const labelMeas = uniqueBy(\n vseedMeasures.filter((item) => encoding.label?.includes(item.id)),\n (item) => item.id,\n )\n\n const percentFormat: NumFormat = merge(numFormat, {\n type: 'percent',\n } as NumFormat)\n\n const percentFormatter = createFormatter(percentFormat)\n\n const result = {\n visible: enable,\n formatMethod: (_, datum: Datum) => {\n const result = []\n\n const dimLabels = labelDims.map((item) => {\n const id = item.id\n return datum[id] as number | string\n })\n\n const meaLabels = labelMeas.map((item) =>\n generateMeasureValue(datum[item.id] as number | string, item, autoFormat, numFormat),\n )\n\n result.push(...dimLabels)\n\n foldInfoList.forEach((foldInfo) => {\n const { measureId, measureValue, statistics } = foldInfo\n const measure = findMeasureById(advancedVSeedMeasures, datum[measureId] as string)\n if (measure) {\n const measureValueLabel = generateMeasureValue(\n datum[measureValue] as number | string,\n measure,\n autoFormat,\n numFormat,\n )\n const measurePercentLabel = generateMeasurePercent(\n datum[measureValue] as number | string
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/label/label.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/label/label.ts"],"sourcesContent":["import type { IArcLabelSpec, ILineChartSpec } from '@visactor/vchart'\nimport type { ILineLikeLabelSpec } from '@visactor/vchart/esm/series/mixin/interface'\nimport { createFormatter, createFormatterByMeasure, DATUM_HIDE_KEY, findMeasureById } from '../../../../utils'\nimport type {\n Datum,\n Dimensions,\n Encoding,\n FoldInfo,\n Formatter,\n Label,\n Measure,\n Measures,\n NumFormat,\n SpecPipe,\n} from 'src/types'\nimport { isNumber, merge, uniqueBy } from 'remeda'\nimport { MeasureName } from 'src/dataReshape/constant'\n\nexport const label: SpecPipe = (spec, context) => {\n const result = { ...spec } as ILineChartSpec\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { chartType, encoding } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { label: Label }\n const foldInfo = datasetReshapeInfo[0].foldInfo as FoldInfo\n\n const { label } = baseConfig\n\n result.label = buildLabel<ILineLikeLabelSpec>(\n label,\n vseed.measures,\n vseed.dimensions,\n advancedVSeed.dimensions,\n advancedVSeed.measures,\n encoding as Encoding,\n [foldInfo],\n )\n\n return result\n}\n\nexport const generateMeasureValue = (\n value: number | string,\n measure: Measure,\n labelAutoFormat?: boolean,\n numFormat: NumFormat = {},\n) => {\n const format = merge(numFormat, measure.numFormat || measure.format)\n const mergedMeasure = { ...measure, numFormat: format, autoFormat: labelAutoFormat || measure.autoFormat }\n\n const formatter = createFormatterByMeasure(mergedMeasure)\n return formatter(value)\n}\n\nexport const generateMeasurePercent = (value: number | string, sum: number, formatter: Formatter) => {\n if (value === undefined || value === null) return String(value)\n const num = Number(value)\n if (Number.isNaN(num)) return String(value)\n\n const percentValue = num / sum\n return formatter(percentValue)\n}\n\nexport const buildLabel = <T extends ILineLikeLabelSpec | IArcLabelSpec>(\n label: Label,\n vseedMeasures: Measures = [],\n vseedDimensions: Dimensions = [],\n advancedVSeedDimensions: Dimensions,\n advancedVSeedMeasures: Measures,\n encoding: Encoding,\n foldInfoList: FoldInfo[],\n): T => {\n const {\n enable,\n wrap,\n showValue,\n showValuePercent,\n showDimension,\n labelOverlap,\n labelColorSmartInvert,\n labelColor,\n labelFontSize,\n labelFontWeight,\n labelBackgroundColor,\n labelPosition,\n autoFormat,\n numFormat = {},\n } = label\n\n const hasDimLabelEncoding = vseedDimensions.some((item) => encoding.label?.includes(item.id))\n\n const labelDims = uniqueBy(\n hasDimLabelEncoding\n ? vseedDimensions.filter((item) => encoding.label?.includes(item.id))\n : showDimension\n ? advancedVSeedDimensions.filter((d) => d.id !== MeasureName)\n : [],\n (item) => item.id,\n )\n\n const labelMeas = uniqueBy(\n vseedMeasures.filter((item) => encoding.label?.includes(item.id)),\n (item) => item.id,\n )\n\n const percentFormat: NumFormat = merge(numFormat, {\n type: 'percent',\n } as NumFormat)\n\n const percentFormatter = createFormatter(percentFormat)\n\n const result = {\n visible: enable,\n dataFilter: (data) => {\n return data.filter((entry) => {\n return entry.data?.[DATUM_HIDE_KEY] !== true\n })\n },\n formatMethod: (_, datum: Datum) => {\n const result = []\n\n const dimLabels = labelDims.map((item) => {\n const id = item.id\n return datum[id] as number | string\n })\n\n const meaLabels = labelMeas.map((item) =>\n generateMeasureValue(datum[item.id] as number | string, item, autoFormat, numFormat),\n )\n\n result.push(...dimLabels)\n\n foldInfoList.forEach((foldInfo) => {\n const { measureId, measureValue, statistics } = foldInfo\n const measure = findMeasureById(advancedVSeedMeasures, datum[measureId] as string)\n if (measure) {\n const measureValueLabel = generateMeasureValue(\n datum[measureValue] as number | string,\n measure,\n autoFormat,\n numFormat,\n )\n // 饼图/环图需要使用实际占比数据\n const measurePercentLabel = isNumber(datum['__VCHART_ARC_RATIO'])\n ? generateMeasurePercent(datum['__VCHART_ARC_RATIO'], 1, percentFormatter)\n : generateMeasurePercent(datum[measureValue] as number | string, statistics.sum, percentFormatter)\n if (showValue) {\n result.push(measureValueLabel)\n }\n if (showValuePercent) {\n result.push(measurePercentLabel)\n }\n }\n })\n\n result.push(...meaLabels)\n\n if (wrap) {\n return result\n }\n return result.join(' ')\n },\n position: labelPosition,\n style: {\n fill: labelColor,\n fontSize: labelFontSize,\n fontWeight: labelFontWeight,\n background: labelBackgroundColor,\n },\n smartInvert: labelColorSmartInvert,\n } as T\n\n if (labelOverlap) {\n result.overlap = {\n hideOnHit: true,\n clampForce: true,\n }\n }\n\n return result\n}\n"],"names":["label","spec","context","result","advancedVSeed","vseed","datasetReshapeInfo","chartType","encoding","baseConfig","foldInfo","buildLabel","generateMeasureValue","value","measure","labelAutoFormat","numFormat","format","merge","mergedMeasure","formatter","createFormatterByMeasure","generateMeasurePercent","sum","String","num","Number","percentValue","vseedMeasures","vseedDimensions","advancedVSeedDimensions","advancedVSeedMeasures","foldInfoList","enable","wrap","showValue","showValuePercent","showDimension","labelOverlap","labelColorSmartInvert","labelColor","labelFontSize","labelFontWeight","labelBackgroundColor","labelPosition","autoFormat","hasDimLabelEncoding","item","labelDims","uniqueBy","d","MeasureName","labelMeas","percentFormat","percentFormatter","createFormatter","data","entry","DATUM_HIDE_KEY","_","datum","dimLabels","id","meaLabels","measureId","measureValue","statistics","findMeasureById","measureValueLabel","measurePercentLabel","isNumber"],"mappings":"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"}
|
|
@@ -55,14 +55,6 @@ const discreteLegend = (spec, context)=>{
|
|
|
55
55
|
autoPage: true,
|
|
56
56
|
orient,
|
|
57
57
|
position: legendPosition,
|
|
58
|
-
data: border ? (items)=>items.map((item)=>{
|
|
59
|
-
item.shape.outerBorder = {
|
|
60
|
-
stroke: item.shape.fill,
|
|
61
|
-
distance: 3,
|
|
62
|
-
lineWidth: 1
|
|
63
|
-
};
|
|
64
|
-
return item;
|
|
65
|
-
}) : void 0,
|
|
66
58
|
item: {
|
|
67
59
|
focus: true,
|
|
68
60
|
maxWidth: '30%',
|
|
@@ -73,9 +65,23 @@ const discreteLegend = (spec, context)=>{
|
|
|
73
65
|
},
|
|
74
66
|
shape: {
|
|
75
67
|
space: border ? 6 : 4,
|
|
76
|
-
style: {
|
|
77
|
-
|
|
78
|
-
|
|
68
|
+
style: (item)=>({
|
|
69
|
+
symbolType: shapeType,
|
|
70
|
+
size: border ? 8 : 10,
|
|
71
|
+
fillOpacity: 1,
|
|
72
|
+
opacity: 1,
|
|
73
|
+
stroke: false,
|
|
74
|
+
outerBorder: border ? {
|
|
75
|
+
stroke: item.shape.fill,
|
|
76
|
+
distance: 3,
|
|
77
|
+
lineWidth: 1
|
|
78
|
+
} : null
|
|
79
|
+
}),
|
|
80
|
+
state: {
|
|
81
|
+
unSelected: {
|
|
82
|
+
opacity: 0.2,
|
|
83
|
+
fillOpacity: 1
|
|
84
|
+
}
|
|
79
85
|
}
|
|
80
86
|
},
|
|
81
87
|
label: {
|
|
@@ -84,6 +90,12 @@ const discreteLegend = (spec, context)=>{
|
|
|
84
90
|
fontSize: labelFontSize,
|
|
85
91
|
fill: labelColor || labelFontColor,
|
|
86
92
|
fontWeight: labelFontWeight
|
|
93
|
+
},
|
|
94
|
+
state: {
|
|
95
|
+
unSelected: {
|
|
96
|
+
fill: labelColor || labelFontColor,
|
|
97
|
+
fillOpacity: 0.8
|
|
98
|
+
}
|
|
87
99
|
}
|
|
88
100
|
},
|
|
89
101
|
background: {
|
|
@@ -91,6 +103,9 @@ const discreteLegend = (spec, context)=>{
|
|
|
91
103
|
selectedHover: {
|
|
92
104
|
fill: labelColor || labelFontColor,
|
|
93
105
|
fillOpacity: 0.05
|
|
106
|
+
},
|
|
107
|
+
unSelectedHover: {
|
|
108
|
+
fill: null
|
|
94
109
|
}
|
|
95
110
|
}
|
|
96
111
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/legend/discreteLegend.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/legend/discreteLegend.ts"],"sourcesContent":["import type { Legend, SpecPipe } from 'src/types'\n\nexport const discreteLegend: SpecPipe = (spec, context) => {\n const result = { ...spec }\n const { advancedVSeed } = context\n const { datasetReshapeInfo, chartType } = advancedVSeed\n const { unfoldInfo } = datasetReshapeInfo[0]\n const baseConfig = advancedVSeed.config[chartType] as { legend: Legend }\n if (!baseConfig || !baseConfig.legend) {\n return result\n }\n\n const { legend } = baseConfig\n const {\n enable,\n position = 'bottom',\n labelFontColor,\n labelColor,\n labelFontSize = 12,\n labelFontWeight,\n maxSize = 1,\n border,\n shapeType = 'rectRound',\n } = legend || {}\n\n const orient = ['bottom', 'bottomLeft', 'bottomRight', 'bl', 'br'].includes(position)\n ? 'bottom'\n : ['top', 'topLeft', 'topRight', 'tl', 'tr'].includes(position)\n ? 'top'\n : ['left', 'leftTop', 'leftBottom', 'lt', 'lb'].includes(position)\n ? 'left'\n : 'right'\n\n const legendPosition = ['topLeft', 'bottomLeft', 'leftTop', 'rightTop', 'lt', 'rt', 'tl', 'bl'].includes(position)\n ? 'start'\n : ['topRight', 'bottomRight', 'leftBottom', 'rightBottom', 'lb', 'rb', 'rt', 'br'].includes(position)\n ? 'end'\n : 'middle'\n\n result.legends = {\n type: 'discrete',\n visible: enable,\n maxCol: Math.max(1, maxSize),\n maxRow: Math.max(1, maxSize),\n autoPage: true,\n orient,\n position: legendPosition,\n
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/legend/discreteLegend.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/legend/discreteLegend.ts"],"sourcesContent":["import type { Legend, SpecPipe } from 'src/types'\n\nexport const discreteLegend: SpecPipe = (spec, context) => {\n const result = { ...spec }\n const { advancedVSeed } = context\n const { datasetReshapeInfo, chartType } = advancedVSeed\n const { unfoldInfo } = datasetReshapeInfo[0]\n const baseConfig = advancedVSeed.config[chartType] as { legend: Legend }\n if (!baseConfig || !baseConfig.legend) {\n return result\n }\n\n const { legend } = baseConfig\n const {\n enable,\n position = 'bottom',\n labelFontColor,\n labelColor,\n labelFontSize = 12,\n labelFontWeight,\n maxSize = 1,\n border,\n shapeType = 'rectRound',\n } = legend || {}\n\n const orient = ['bottom', 'bottomLeft', 'bottomRight', 'bl', 'br'].includes(position)\n ? 'bottom'\n : ['top', 'topLeft', 'topRight', 'tl', 'tr'].includes(position)\n ? 'top'\n : ['left', 'leftTop', 'leftBottom', 'lt', 'lb'].includes(position)\n ? 'left'\n : 'right'\n\n const legendPosition = ['topLeft', 'bottomLeft', 'leftTop', 'rightTop', 'lt', 'rt', 'tl', 'bl'].includes(position)\n ? 'start'\n : ['topRight', 'bottomRight', 'leftBottom', 'rightBottom', 'lb', 'rb', 'rt', 'br'].includes(position)\n ? 'end'\n : 'middle'\n\n result.legends = {\n type: 'discrete',\n visible: enable,\n maxCol: Math.max(1, maxSize),\n maxRow: Math.max(1, maxSize),\n autoPage: true,\n orient,\n position: legendPosition,\n item: {\n focus: true,\n maxWidth: '30%',\n focusIconStyle: {\n size: labelFontSize + 2,\n fill: labelColor || labelFontColor,\n fontWeight: labelFontWeight,\n },\n shape: {\n space: border ? 6 : 4,\n style: (item) => {\n return {\n symbolType: shapeType,\n size: border ? 8 : 10,\n fillOpacity: 1,\n opacity: 1,\n stroke: false,\n outerBorder: border\n ? {\n stroke: item.shape.fill,\n distance: 3,\n lineWidth: 1,\n }\n : null,\n }\n },\n state: {\n unSelected: {\n opacity: 0.2,\n fillOpacity: 1, // 覆盖 vchart 里的默认值\n },\n },\n },\n label: {\n formatMethod: (value) => {\n return unfoldInfo.colorIdMap[String(value)] ?? value\n },\n style: {\n fontSize: labelFontSize,\n fill: labelColor || labelFontColor,\n fontWeight: labelFontWeight,\n },\n state: {\n unSelected: {\n fill: labelColor || labelFontColor, // 覆盖vchart里面的默认值\n fillOpacity: 0.8, // 覆盖 vchart 里的默认值\n },\n },\n },\n background: {\n state: {\n selectedHover: {\n fill: labelColor || labelFontColor,\n fillOpacity: 0.05,\n },\n unSelectedHover: {\n fill: null,\n },\n },\n },\n },\n padding: 0,\n }\n return result\n}\n"],"names":["discreteLegend","spec","context","result","advancedVSeed","datasetReshapeInfo","chartType","unfoldInfo","baseConfig","legend","enable","position","labelFontColor","labelColor","labelFontSize","labelFontWeight","maxSize","border","shapeType","orient","legendPosition","Math","item","value","String"],"mappings":"AAEO,MAAMA,iBAA2B,CAACC,MAAMC;IAC7C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,kBAAkB,EAAEC,SAAS,EAAE,GAAGF;IAC1C,MAAM,EAAEG,UAAU,EAAE,GAAGF,kBAAkB,CAAC,EAAE;IAC5C,MAAMG,aAAaJ,cAAc,MAAM,CAACE,UAAU;IAClD,IAAI,CAACE,cAAc,CAACA,WAAW,MAAM,EACnC,OAAOL;IAGT,MAAM,EAAEM,MAAM,EAAE,GAAGD;IACnB,MAAM,EACJE,MAAM,EACNC,WAAW,QAAQ,EACnBC,cAAc,EACdC,UAAU,EACVC,gBAAgB,EAAE,EAClBC,eAAe,EACfC,UAAU,CAAC,EACXC,MAAM,EACNC,YAAY,WAAW,EACxB,GAAGT,UAAU,CAAC;IAEf,MAAMU,SAAS;QAAC;QAAU;QAAc;QAAe;QAAM;KAAK,CAAC,QAAQ,CAACR,YACxE,WACA;QAAC;QAAO;QAAW;QAAY;QAAM;KAAK,CAAC,QAAQ,CAACA,YAClD,QACA;QAAC;QAAQ;QAAW;QAAc;QAAM;KAAK,CAAC,QAAQ,CAACA,YACrD,SACA;IAER,MAAMS,iBAAiB;QAAC;QAAW;QAAc;QAAW;QAAY;QAAM;QAAM;QAAM;KAAK,CAAC,QAAQ,CAACT,YACrG,UACA;QAAC;QAAY;QAAe;QAAc;QAAe;QAAM;QAAM;QAAM;KAAK,CAAC,QAAQ,CAACA,YACxF,QACA;IAENR,OAAO,OAAO,GAAG;QACf,MAAM;QACN,SAASO;QACT,QAAQW,KAAK,GAAG,CAAC,GAAGL;QACpB,QAAQK,KAAK,GAAG,CAAC,GAAGL;QACpB,UAAU;QACVG;QACA,UAAUC;QACV,MAAM;YACJ,OAAO;YACP,UAAU;YACV,gBAAgB;gBACd,MAAMN,gBAAgB;gBACtB,MAAMD,cAAcD;gBACpB,YAAYG;YACd;YACA,OAAO;gBACL,OAAOE,SAAS,IAAI;gBACpB,OAAO,CAACK,OACC;wBACL,YAAYJ;wBACZ,MAAMD,SAAS,IAAI;wBACnB,aAAa;wBACb,SAAS;wBACT,QAAQ;wBACR,aAAaA,SACT;4BACE,QAAQK,KAAK,KAAK,CAAC,IAAI;4BACvB,UAAU;4BACV,WAAW;wBACb,IACA;oBACN;gBAEF,OAAO;oBACL,YAAY;wBACV,SAAS;wBACT,aAAa;oBACf;gBACF;YACF;YACA,OAAO;gBACL,cAAc,CAACC,QACNhB,WAAW,UAAU,CAACiB,OAAOD,OAAO,IAAIA;gBAEjD,OAAO;oBACL,UAAUT;oBACV,MAAMD,cAAcD;oBACpB,YAAYG;gBACd;gBACA,OAAO;oBACL,YAAY;wBACV,MAAMF,cAAcD;wBACpB,aAAa;oBACf;gBACF;YACF;YACA,YAAY;gBACV,OAAO;oBACL,eAAe;wBACb,MAAMC,cAAcD;wBACpB,aAAa;oBACf;oBACA,iBAAiB;wBACf,MAAM;oBACR;gBACF;YACF;QACF;QACA,SAAS;IACX;IACA,OAAOT;AACT"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { colorLegend } from "./colorLegend.js";
|
|
2
|
+
import { DATUM_HIDE_KEY } from "../../../../utils/constant.js";
|
|
3
|
+
const heatmapColorLegend = (spec, context)=>{
|
|
4
|
+
const result = colorLegend(spec, context);
|
|
5
|
+
if (result.legends) result.legends.customFilter = (data, range, key)=>{
|
|
6
|
+
const min = Math.min(range[0], range[1]);
|
|
7
|
+
const max = Math.max(range[0], range[1]);
|
|
8
|
+
return (data ?? []).map((entry)=>{
|
|
9
|
+
const val = entry[key];
|
|
10
|
+
const isHide = val - min < -0.000001 || val - max > 1e-6;
|
|
11
|
+
entry[DATUM_HIDE_KEY] = isHide;
|
|
12
|
+
return entry;
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
return result;
|
|
16
|
+
};
|
|
17
|
+
export { heatmapColorLegend };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=heatmapColorLegend.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/legend/heatmapColorLegend.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/legend/heatmapColorLegend.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unsafe-assignment */\nimport type { SpecPipe } from 'src/types'\nimport { colorLegend } from './colorLegend'\nimport type { Datum, IHeatmapChartSpec } from '@visactor/vchart'\nimport { DATUM_HIDE_KEY } from 'src/pipeline/utils/constant'\n\nexport const heatmapColorLegend: SpecPipe = (spec, context) => {\n const result = colorLegend(spec, context) as IHeatmapChartSpec\n\n if (result.legends) {\n ;(result.legends as any).customFilter = (data: Datum[], range: number[], key: string) => {\n const min = Math.min(range[0], range[1])\n const max = Math.max(range[0], range[1])\n return (data ?? []).map((entry: Datum) => {\n const val = entry[key]\n const isHide = val - min < -1e-6 || val - max > 1e-6\n\n entry[DATUM_HIDE_KEY] = isHide\n\n return entry\n })\n }\n }\n\n return result\n}\n"],"names":["heatmapColorLegend","spec","context","result","colorLegend","data","range","key","min","Math","max","entry","val","isHide","DATUM_HIDE_KEY"],"mappings":";;AAMO,MAAMA,qBAA+B,CAACC,MAAMC;IACjD,MAAMC,SAASC,YAAYH,MAAMC;IAEjC,IAAIC,OAAO,OAAO,EACdA,OAAO,OAAO,CAAS,YAAY,GAAG,CAACE,MAAeC,OAAiBC;QACvE,MAAMC,MAAMC,KAAK,GAAG,CAACH,KAAK,CAAC,EAAE,EAAEA,KAAK,CAAC,EAAE;QACvC,MAAMI,MAAMD,KAAK,GAAG,CAACH,KAAK,CAAC,EAAE,EAAEA,KAAK,CAAC,EAAE;QACvC,OAAQD,AAAAA,CAAAA,QAAQ,EAAC,EAAG,GAAG,CAAC,CAACM;YACvB,MAAMC,MAAMD,KAAK,CAACJ,IAAI;YACtB,MAAMM,SAASD,MAAMJ,MAAM,aAASI,MAAMF,MAAM;YAEhDC,KAAK,CAACG,eAAe,GAAGD;YAExB,OAAOF;QACT;IACF;IAGF,OAAOR;AACT"}
|
|
@@ -2,3 +2,4 @@ export { discreteLegend } from './discreteLegend';
|
|
|
2
2
|
export { pivotDiscreteLegend } from './pivotDiscreteLegend';
|
|
3
3
|
export { colorLegend } from './colorLegend';
|
|
4
4
|
export { pivotColorLegend } from './pivotColorLegend';
|
|
5
|
+
export { heatmapColorLegend } from './heatmapColorLegend';
|
|
@@ -2,4 +2,5 @@ import { discreteLegend } from "./discreteLegend.js";
|
|
|
2
2
|
import { pivotDiscreteLegend } from "./pivotDiscreteLegend.js";
|
|
3
3
|
import { colorLegend } from "./colorLegend.js";
|
|
4
4
|
import { pivotColorLegend } from "./pivotColorLegend.js";
|
|
5
|
-
|
|
5
|
+
import { heatmapColorLegend } from "./heatmapColorLegend.js";
|
|
6
|
+
export { colorLegend, discreteLegend, heatmapColorLegend, pivotColorLegend, pivotDiscreteLegend };
|
|
@@ -1,17 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
import { DATUM_HIDE_KEY } from "../../../../utils/constant.js";
|
|
2
|
+
const cellStyle = (spec, context)=>{
|
|
2
3
|
const result = {
|
|
3
4
|
...spec,
|
|
4
5
|
cell: {
|
|
5
6
|
style: {}
|
|
6
7
|
}
|
|
7
8
|
};
|
|
9
|
+
const { advancedVSeed, vseed } = context;
|
|
10
|
+
const { chartType } = vseed;
|
|
11
|
+
const cell = advancedVSeed.config?.[chartType]?.cell;
|
|
8
12
|
return {
|
|
9
13
|
...result,
|
|
10
14
|
cell: {
|
|
11
15
|
style: {
|
|
16
|
+
visible: (datum)=>datum?.[DATUM_HIDE_KEY] !== true,
|
|
12
17
|
shape: 'rect',
|
|
13
|
-
stroke:
|
|
14
|
-
lineWidth: 1
|
|
18
|
+
stroke: cell?.stroke,
|
|
19
|
+
lineWidth: cell?.lineWidth ?? 1
|
|
15
20
|
}
|
|
16
21
|
}
|
|
17
22
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/markStyle/cellStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/markStyle/cellStyle.ts"],"sourcesContent":["import type { IHeatmapChartSpec } from '@visactor/vchart'\nimport type { SpecPipe } from 'src/types'\n\nexport const cellStyle: SpecPipe = (spec) => {\n const result = {\n ...spec,\n cell: {\n style: {},\n },\n } as IHeatmapChartSpec\n\n return {\n ...result,\n cell: {\n style: {\n shape: 'rect',\n stroke:
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/markStyle/cellStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/markStyle/cellStyle.ts"],"sourcesContent":["import type { IHeatmapChartSpec } from '@visactor/vchart'\nimport { DATUM_HIDE_KEY } from 'src/pipeline/utils/constant'\nimport type { SpecPipe } from 'src/types'\n\nexport const cellStyle: SpecPipe = (spec, context) => {\n const result = {\n ...spec,\n cell: {\n style: {},\n },\n } as IHeatmapChartSpec\n const { advancedVSeed, vseed } = context\n const { chartType } = vseed\n const cell = advancedVSeed.config?.[chartType as 'heatmap']?.cell\n\n return {\n ...result,\n cell: {\n style: {\n visible: (datum: any) => {\n return datum?.[DATUM_HIDE_KEY] !== true\n },\n shape: 'rect',\n stroke: cell?.stroke,\n lineWidth: cell?.lineWidth ?? 1,\n },\n },\n }\n}\n"],"names":["cellStyle","spec","context","result","advancedVSeed","vseed","chartType","cell","datum","DATUM_HIDE_KEY"],"mappings":";AAIO,MAAMA,YAAsB,CAACC,MAAMC;IACxC,MAAMC,SAAS;QACb,GAAGF,IAAI;QACP,MAAM;YACJ,OAAO,CAAC;QACV;IACF;IACA,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEI,SAAS,EAAE,GAAGD;IACtB,MAAME,OAAOH,cAAc,MAAM,EAAE,CAACE,UAAuB,EAAE;IAE7D,OAAO;QACL,GAAGH,MAAM;QACT,MAAM;YACJ,OAAO;gBACL,SAAS,CAACK,QACDA,OAAO,CAACC,eAAe,KAAK;gBAErC,OAAO;gBACP,QAAQF,MAAM;gBACd,WAAWA,MAAM,aAAa;YAChC;QACF;IACF;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/pivotChart/pivotColumnDimensions.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/pivotChart/pivotColumnDimensions.ts"],"sourcesContent":["import type { PivotChartConstructorOptions } from '@visactor/vtable'\nimport type { IBasicDimension } from '@visactor/vtable/es/ts-types/pivot-table/dimension/basic-dimension'\nimport type { Dimensions, SpecPipe } from 'src/types'\n\nexport const pivotColumnDimensions: SpecPipe = (spec, context) => {\n const result = { ...spec } as PivotChartConstructorOptions\n const { advancedVSeed } = context\n const dimensions = advancedVSeed.dimensions as Dimensions\n\n if (!dimensions) {\n return result\n }\n const columnDimensions = dimensions.filter((dim) => dim.encoding === 'column')\n const columns: IBasicDimension[] = columnDimensions.map((dim) => ({\n dimensionKey: dim.id,\n title: dim.alias || dim.id,\n }))\n\n
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/pivotChart/pivotColumnDimensions.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/pivotChart/pivotColumnDimensions.ts"],"sourcesContent":["import type { PivotChartConstructorOptions } from '@visactor/vtable'\nimport type { IBasicDimension } from '@visactor/vtable/es/ts-types/pivot-table/dimension/basic-dimension'\nimport type { Dimensions, SpecPipe } from 'src/types'\n\nexport const pivotColumnDimensions: SpecPipe = (spec, context) => {\n const result = { ...spec } as PivotChartConstructorOptions\n const { advancedVSeed } = context\n const dimensions = advancedVSeed.dimensions as Dimensions\n\n if (!dimensions) {\n return result\n }\n const columnDimensions = dimensions.filter((dim) => dim.encoding === 'column')\n const columns: IBasicDimension[] = columnDimensions.map((dim) => ({\n dimensionKey: dim.id,\n title: dim.alias || dim.id,\n }))\n\n return {\n ...result,\n columns: columns,\n }\n}\n"],"names":["pivotColumnDimensions","spec","context","result","advancedVSeed","dimensions","columnDimensions","dim","columns"],"mappings":"AAIO,MAAMA,wBAAkC,CAACC,MAAMC;IACpD,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAMG,aAAaD,cAAc,UAAU;IAE3C,IAAI,CAACC,YACH,OAAOF;IAET,MAAMG,mBAAmBD,WAAW,MAAM,CAAC,CAACE,MAAQA,AAAiB,aAAjBA,IAAI,QAAQ;IAChE,MAAMC,UAA6BF,iBAAiB,GAAG,CAAC,CAACC,MAAS;YAChE,cAAcA,IAAI,EAAE;YACpB,OAAOA,IAAI,KAAK,IAAIA,IAAI,EAAE;QAC5B;IAEA,OAAO;QACL,GAAGJ,MAAM;QACT,SAASK;IACX;AACF"}
|
|
@@ -26,6 +26,7 @@ const ChartTypeEnum = {
|
|
|
26
26
|
Funnel: 'funnel',
|
|
27
27
|
Heatmap: 'heatmap'
|
|
28
28
|
};
|
|
29
|
-
|
|
29
|
+
const DATUM_HIDE_KEY = '__VSEED_HideItem__';
|
|
30
|
+
export { ANNOTATION_Z_INDEX, ChartTypeEnum, DATUM_HIDE_KEY, DEFAULT_PARENT_ID, DUAL_AXIS_CHART_COLUMN_Z_INDEX, DUAL_AXIS_CHART_NON_COLUMN_Z_INDEX, DUAL_AXIS_LABEL_Z_INDEX, LINEAR_AXIS_INNER_OFFSET_TOP };
|
|
30
31
|
|
|
31
32
|
//# sourceMappingURL=constant.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/utils/constant.js","sources":["webpack://@visactor/vseed/./src/pipeline/utils/constant.ts"],"sourcesContent":["// 标注层 z-index\nexport const ANNOTATION_Z_INDEX = 1000\n// 线性轴 顶部空隙 预留5px\nexport const LINEAR_AXIS_INNER_OFFSET_TOP = 7\n// 双轴图 柱图 ZIndex\nexport const DUAL_AXIS_CHART_COLUMN_Z_INDEX = 1000\n// 双轴图 非柱图 ZIndex\nexport const DUAL_AXIS_CHART_NON_COLUMN_Z_INDEX = 1001\n// 双轴图 标注层 ZIndex\nexport const DUAL_AXIS_LABEL_Z_INDEX = 1002\n// 默认父级id\nexport const DEFAULT_PARENT_ID = '__DefaultParentId__'\n\n// 图表类型枚举\nexport const ChartTypeEnum = {\n Table: 'table',\n PivotTable: 'pivotTable',\n // cartesian\n Line: 'line',\n Column: 'column',\n ColumnPercent: 'columnPercent',\n ColumnParallel: 'columnParallel',\n Bar: 'bar',\n BarPercent: 'barPercent',\n BarParallel: 'barParallel',\n Area: 'area',\n AreaPercent: 'areaPercent',\n DualAxis: 'dualAxis',\n Scatter: 'scatter',\n // polar\n Rose: 'rose',\n RoseParallel: 'roseParallel',\n Pie: 'pie',\n Donut: 'donut',\n Radar: 'radar',\n // other\n Funnel: 'funnel',\n Heatmap: 'heatmap',\n} as const\n"],"names":["ANNOTATION_Z_INDEX","LINEAR_AXIS_INNER_OFFSET_TOP","DUAL_AXIS_CHART_COLUMN_Z_INDEX","DUAL_AXIS_CHART_NON_COLUMN_Z_INDEX","DUAL_AXIS_LABEL_Z_INDEX","DEFAULT_PARENT_ID","ChartTypeEnum"],"mappings":"AACO,MAAMA,qBAAqB;AAE3B,MAAMC,+BAA+B;AAErC,MAAMC,iCAAiC;AAEvC,MAAMC,qCAAqC;AAE3C,MAAMC,0BAA0B;AAEhC,MAAMC,oBAAoB;AAG1B,MAAMC,gBAAgB;IAC3B,OAAO;IACP,YAAY;IAEZ,MAAM;IACN,QAAQ;IACR,eAAe;IACf,gBAAgB;IAChB,KAAK;IACL,YAAY;IACZ,aAAa;IACb,MAAM;IACN,aAAa;IACb,UAAU;IACV,SAAS;IAET,MAAM;IACN,cAAc;IACd,KAAK;IACL,OAAO;IACP,OAAO;IAEP,QAAQ;IACR,SAAS;AACX"}
|
|
1
|
+
{"version":3,"file":"pipeline/utils/constant.js","sources":["webpack://@visactor/vseed/./src/pipeline/utils/constant.ts"],"sourcesContent":["// 标注层 z-index\nexport const ANNOTATION_Z_INDEX = 1000\n// 线性轴 顶部空隙 预留5px\nexport const LINEAR_AXIS_INNER_OFFSET_TOP = 7\n// 双轴图 柱图 ZIndex\nexport const DUAL_AXIS_CHART_COLUMN_Z_INDEX = 1000\n// 双轴图 非柱图 ZIndex\nexport const DUAL_AXIS_CHART_NON_COLUMN_Z_INDEX = 1001\n// 双轴图 标注层 ZIndex\nexport const DUAL_AXIS_LABEL_Z_INDEX = 1002\n// 默认父级id\nexport const DEFAULT_PARENT_ID = '__DefaultParentId__'\n\n// 图表类型枚举\nexport const ChartTypeEnum = {\n Table: 'table',\n PivotTable: 'pivotTable',\n // cartesian\n Line: 'line',\n Column: 'column',\n ColumnPercent: 'columnPercent',\n ColumnParallel: 'columnParallel',\n Bar: 'bar',\n BarPercent: 'barPercent',\n BarParallel: 'barParallel',\n Area: 'area',\n AreaPercent: 'areaPercent',\n DualAxis: 'dualAxis',\n Scatter: 'scatter',\n // polar\n Rose: 'rose',\n RoseParallel: 'roseParallel',\n Pie: 'pie',\n Donut: 'donut',\n Radar: 'radar',\n // other\n Funnel: 'funnel',\n Heatmap: 'heatmap',\n} as const\n\n// Heatmap hide cell\nexport const DATUM_HIDE_KEY = '__VSEED_HideItem__'\n"],"names":["ANNOTATION_Z_INDEX","LINEAR_AXIS_INNER_OFFSET_TOP","DUAL_AXIS_CHART_COLUMN_Z_INDEX","DUAL_AXIS_CHART_NON_COLUMN_Z_INDEX","DUAL_AXIS_LABEL_Z_INDEX","DEFAULT_PARENT_ID","ChartTypeEnum","DATUM_HIDE_KEY"],"mappings":"AACO,MAAMA,qBAAqB;AAE3B,MAAMC,+BAA+B;AAErC,MAAMC,iCAAiC;AAEvC,MAAMC,qCAAqC;AAE3C,MAAMC,0BAA0B;AAEhC,MAAMC,oBAAoB;AAG1B,MAAMC,gBAAgB;IAC3B,OAAO;IACP,YAAY;IAEZ,MAAM;IACN,QAAQ;IACR,eAAe;IACf,gBAAgB;IAChB,KAAK;IACL,YAAY;IACZ,aAAa;IACb,MAAM;IACN,aAAa;IACb,UAAU;IACV,SAAS;IAET,MAAM;IACN,cAAc;IACd,KAAK;IACL,OAAO;IACP,OAAO;IAEP,QAAQ;IACR,SAAS;AACX;AAGO,MAAMC,iBAAiB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme/common/heatmapCell.js","sources":["webpack://@visactor/vseed/./src/theme/common/heatmapCell.ts"],"sourcesContent":["import type { HeatmapCell } from 'src/types/properties/config/heatmap/heatmap'\n\nexport const getLightHeatmapCellTheme = (): HeatmapCell => {\n return {\n stroke: '#fff',\n }\n}\n\nexport const getDarkHeatmapCellTheme = (): HeatmapCell => {\n return {\n stroke: '#404349',\n }\n}\n"],"names":["getLightHeatmapCellTheme","getDarkHeatmapCellTheme"],"mappings":"AAEO,MAAMA,2BAA2B,IAC/B;QACL,QAAQ;IACV;AAGK,MAAMC,0BAA0B,IAC9B;QACL,QAAQ;IACV"}
|
|
@@ -1,5 +1,47 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
export declare const getLightTableConfig: () => {
|
|
2
|
+
borderColor: string;
|
|
3
|
+
bodyFontSize: number;
|
|
4
|
+
bodyFontColor: string;
|
|
5
|
+
bodyBackgroundColor: string;
|
|
6
|
+
headerFontSize: number;
|
|
7
|
+
headerFontColor: string;
|
|
8
|
+
headerBackgroundColor: string;
|
|
9
|
+
hoverBodyBackgroundColor: string;
|
|
10
|
+
hoverBodyInlineBackgroundColor: string;
|
|
11
|
+
hoverHeaderBackgroundColor: string;
|
|
12
|
+
hoverHeaderInlineBackgroundColor: string;
|
|
13
|
+
selectedBorderColor: string;
|
|
14
|
+
selectedBackgroundColor: string;
|
|
15
|
+
backgroundColor: string;
|
|
16
|
+
};
|
|
17
|
+
export declare const getDarkTableConfig: () => {
|
|
18
|
+
borderColor: string;
|
|
19
|
+
bodyFontSize: number;
|
|
20
|
+
bodyFontColor: string;
|
|
21
|
+
bodyBackgroundColor: string;
|
|
22
|
+
headerFontSize: number;
|
|
23
|
+
headerFontColor: string;
|
|
24
|
+
headerBackgroundColor: string;
|
|
25
|
+
hoverBodyBackgroundColor: string;
|
|
26
|
+
hoverBodyInlineBackgroundColor: string;
|
|
27
|
+
hoverHeaderBackgroundColor: string;
|
|
28
|
+
hoverHeaderInlineBackgroundColor: string;
|
|
29
|
+
selectedBorderColor: string;
|
|
30
|
+
selectedBackgroundColor: string;
|
|
31
|
+
};
|
|
32
|
+
export declare const getLightPivotChartGridConfig: () => {
|
|
33
|
+
borderColor: any;
|
|
34
|
+
bodyFontColor: any;
|
|
35
|
+
headerFontColor: any;
|
|
36
|
+
headerBackgroundColor: any;
|
|
37
|
+
hoverHeaderBackgroundColor: any;
|
|
38
|
+
hoverHeaderInlineBackgroundColor: any;
|
|
39
|
+
};
|
|
40
|
+
export declare const getDarkPivotChartGridConfig: () => {
|
|
41
|
+
borderColor: any;
|
|
42
|
+
bodyFontColor: any;
|
|
43
|
+
headerFontColor: any;
|
|
44
|
+
headerBackgroundColor: any;
|
|
45
|
+
hoverHeaderBackgroundColor: any;
|
|
46
|
+
hoverHeaderInlineBackgroundColor: any;
|
|
47
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme/common/table.js","sources":["webpack://@visactor/vseed/./src/theme/common/table.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"theme/common/table.js","sources":["webpack://@visactor/vseed/./src/theme/common/table.ts"],"sourcesContent":["export const getLightTableConfig = () => ({\n borderColor: '#e3e5eb',\n\n bodyFontSize: 12,\n bodyFontColor: '#141414',\n bodyBackgroundColor: 'transparent',\n\n headerFontSize: 12,\n headerFontColor: '#21252c',\n headerBackgroundColor: '#f6f7f9',\n\n hoverBodyBackgroundColor: '#bedaff',\n hoverBodyInlineBackgroundColor: '#bedaff33',\n hoverHeaderBackgroundColor: '#D9DDE4',\n hoverHeaderInlineBackgroundColor: '#D9DDE455',\n\n selectedBorderColor: '#4080ff',\n selectedBackgroundColor: '#bedaff33',\n\n backgroundColor: 'transparent',\n})\n\nexport const getDarkTableConfig = () => ({\n borderColor: '#4b4e53',\n\n bodyFontSize: 12,\n bodyFontColor: '#fdfdfd',\n bodyBackgroundColor: 'transparent',\n\n headerFontSize: 12,\n headerFontColor: '#fdfdfd',\n headerBackgroundColor: '#36393e',\n\n hoverBodyBackgroundColor: '#4284ff66',\n hoverBodyInlineBackgroundColor: '#4284ff10',\n hoverHeaderBackgroundColor: '#6f7984cc',\n hoverHeaderInlineBackgroundColor: '#4b4f54',\n\n selectedBorderColor: '#3073f2',\n selectedBackgroundColor: '#4284ff33',\n})\n\nconst pickPivotChartGridConfig = (tableConfig: any) => {\n return {\n borderColor: tableConfig.borderColor,\n bodyFontColor: tableConfig.bodyFontColor,\n headerFontColor: tableConfig.headerFontColor,\n headerBackgroundColor: tableConfig.headerBackgroundColor,\n hoverHeaderBackgroundColor: tableConfig.hoverHeaderBackgroundColor,\n hoverHeaderInlineBackgroundColor: tableConfig.hoverHeaderInlineBackgroundColor,\n }\n}\n\nexport const getLightPivotChartGridConfig = () => {\n return pickPivotChartGridConfig(getLightTableConfig())\n}\n\nexport const getDarkPivotChartGridConfig = () => {\n return pickPivotChartGridConfig(getDarkTableConfig())\n}\n"],"names":["getLightTableConfig","getDarkTableConfig","pickPivotChartGridConfig","tableConfig","getLightPivotChartGridConfig","getDarkPivotChartGridConfig"],"mappings":"AAAO,MAAMA,sBAAsB,IAAO;QACxC,aAAa;QAEb,cAAc;QACd,eAAe;QACf,qBAAqB;QAErB,gBAAgB;QAChB,iBAAiB;QACjB,uBAAuB;QAEvB,0BAA0B;QAC1B,gCAAgC;QAChC,4BAA4B;QAC5B,kCAAkC;QAElC,qBAAqB;QACrB,yBAAyB;QAEzB,iBAAiB;IACnB;AAEO,MAAMC,qBAAqB,IAAO;QACvC,aAAa;QAEb,cAAc;QACd,eAAe;QACf,qBAAqB;QAErB,gBAAgB;QAChB,iBAAiB;QACjB,uBAAuB;QAEvB,0BAA0B;QAC1B,gCAAgC;QAChC,4BAA4B;QAC5B,kCAAkC;QAElC,qBAAqB;QACrB,yBAAyB;IAC3B;AAEA,MAAMC,2BAA2B,CAACC,cACzB;QACL,aAAaA,YAAY,WAAW;QACpC,eAAeA,YAAY,aAAa;QACxC,iBAAiBA,YAAY,eAAe;QAC5C,uBAAuBA,YAAY,qBAAqB;QACxD,4BAA4BA,YAAY,0BAA0B;QAClE,kCAAkCA,YAAY,gCAAgC;IAChF;AAGK,MAAMC,+BAA+B,IACnCF,yBAAyBF;AAG3B,MAAMK,8BAA8B,IAClCH,yBAAyBD"}
|