@visactor/vseed 0.1.29 → 0.1.30
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 +864 -0
- package/dist/esm/pipeline/advanced/table/pipes/default/defaultMeasureName.js +4 -3
- package/dist/esm/pipeline/advanced/table/pipes/default/defaultMeasureName.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPoint.js +6 -12
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPoint.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotColumnDimensions.js +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotColumnDimensions.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.js +9 -7
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.js.map +1 -1
- package/dist/esm/theme/common/table.d.ts +3 -1
- package/dist/esm/theme/common/table.js +11 -1
- package/dist/esm/theme/common/table.js.map +1 -1
- package/dist/esm/theme/dark/dark.js +37 -19
- package/dist/esm/theme/dark/dark.js.map +1 -1
- package/dist/esm/theme/light/light.js +37 -19
- package/dist/esm/theme/light/light.js.map +1 -1
- package/dist/esm/types/advancedVSeed.d.ts +288 -0
- package/dist/esm/types/properties/config/config.d.ts +297 -0
- package/dist/esm/types/properties/config/config.js +25 -9
- package/dist/esm/types/properties/config/config.js.map +1 -1
- package/dist/esm/types/properties/theme/customTheme.d.ts +288 -0
- package/dist/umd/index.js +126 -66
- package/dist/umd/index.js.map +1 -1
- package/package.json +1 -1
@@ -1,14 +1,15 @@
|
|
1
1
|
import { MeasureName } from "../../../../../dataReshape/index.js";
|
2
2
|
import { intl } from "../../../../../i18n/index.js";
|
3
|
+
import { findAllMeasures } from "../../../../utils/measures/find.js";
|
3
4
|
const defaultMeasureName = (advancedVSeed)=>{
|
4
5
|
const result = {
|
5
6
|
...advancedVSeed
|
6
7
|
};
|
7
|
-
const
|
8
|
+
const measures = findAllMeasures(advancedVSeed.measures);
|
9
|
+
if (measures.length > 1 && !result.dimensions?.some((dim)=>dim.id === MeasureName)) result.dimensions?.push({
|
8
10
|
id: MeasureName,
|
9
11
|
alias: intl.i18n`指标名称`
|
10
|
-
};
|
11
|
-
if (!result.dimensions?.some((dim)=>dim.id === MeasureName)) result.dimensions?.push(MeaName);
|
12
|
+
});
|
12
13
|
return result;
|
13
14
|
};
|
14
15
|
export { defaultMeasureName };
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pipeline/advanced/table/pipes/default/defaultMeasureName.js","sources":["webpack://@visactor/vseed/./src/pipeline/advanced/table/pipes/default/defaultMeasureName.ts"],"sourcesContent":["import { MeasureName } from 'src/dataReshape'\nimport { intl } from 'src/i18n'\nimport type { AdvancedPipe, Dimension } from 'src/types'\n\nexport const defaultMeasureName: AdvancedPipe = (advancedVSeed) => {\n const result = { ...advancedVSeed }\n
|
1
|
+
{"version":3,"file":"pipeline/advanced/table/pipes/default/defaultMeasureName.js","sources":["webpack://@visactor/vseed/./src/pipeline/advanced/table/pipes/default/defaultMeasureName.ts"],"sourcesContent":["import { MeasureName } from 'src/dataReshape'\nimport { intl } from 'src/i18n'\nimport { findAllMeasures } from 'src/pipeline/utils/measures/find'\nimport type { AdvancedPipe, Dimension, DimensionTree } from 'src/types'\n\nexport const defaultMeasureName: AdvancedPipe = (advancedVSeed) => {\n const result = { ...advancedVSeed }\n const measures = findAllMeasures(advancedVSeed.measures as DimensionTree)\n\n // 如果没有指标名称维度,则默认添加指标名称维度\n if (measures.length > 1 && !result.dimensions?.some((dim) => dim.id === MeasureName)) {\n result.dimensions?.push({\n id: MeasureName,\n alias: intl.i18n`指标名称`,\n } as Dimension)\n }\n\n return result\n}\n"],"names":["defaultMeasureName","advancedVSeed","result","measures","findAllMeasures","dim","MeasureName","intl"],"mappings":";;;AAKO,MAAMA,qBAAmC,CAACC;IAC/C,MAAMC,SAAS;QAAE,GAAGD,aAAa;IAAC;IAClC,MAAME,WAAWC,gBAAgBH,cAAc,QAAQ;IAGvD,IAAIE,SAAS,MAAM,GAAG,KAAK,CAACD,OAAO,UAAU,EAAE,KAAK,CAACG,MAAQA,IAAI,EAAE,KAAKC,cACtEJ,OAAO,UAAU,EAAE,KAAK;QACtB,IAAII;QACJ,OAAOC,KAAK,IAAI,CAAC,IAAI,CAAC;IACxB;IAGF,OAAOL;AACT"}
|
@@ -16,22 +16,14 @@ const annotationPoint_annotationPoint = (spec, context)=>{
|
|
16
16
|
return selectedData.map((datum)=>({
|
17
17
|
zIndex: ANNOTATION_Z_INDEX,
|
18
18
|
regionRelative: true,
|
19
|
-
|
20
|
-
const targetDatum = data.find((item)=>isSubset(datum, item));
|
21
|
-
if (targetDatum) {
|
22
|
-
const { x, y } = context.dataToPosition(targetDatum);
|
23
|
-
return {
|
24
|
-
x,
|
25
|
-
y
|
26
|
-
};
|
27
|
-
}
|
28
|
-
},
|
19
|
+
coordinate: (data)=>data.find((item)=>isSubset(datum, item)),
|
29
20
|
itemLine: {
|
30
21
|
visible: false
|
31
22
|
},
|
32
23
|
itemContent: {
|
33
24
|
offsetY,
|
34
25
|
offsetX,
|
26
|
+
confine: true,
|
35
27
|
text: {
|
36
28
|
text: text,
|
37
29
|
style: {
|
@@ -43,7 +35,8 @@ const annotationPoint_annotationPoint = (spec, context)=>{
|
|
43
35
|
lineWidth: 1,
|
44
36
|
fontSize: textFontSize,
|
45
37
|
fontWeight: textFontWeight,
|
46
|
-
dy: textFontSize
|
38
|
+
dy: textFontSize,
|
39
|
+
dx: -10
|
47
40
|
},
|
48
41
|
labelBackground: {
|
49
42
|
visible: textBackgroundVisible,
|
@@ -53,7 +46,8 @@ const annotationPoint_annotationPoint = (spec, context)=>{
|
|
53
46
|
fill: textBackgroundColor,
|
54
47
|
stroke: textBackgroundBorderColor,
|
55
48
|
lineWidth: textBackgroundBorderWidth,
|
56
|
-
dy: textFontSize
|
49
|
+
dy: textFontSize,
|
50
|
+
dx: -10
|
57
51
|
}
|
58
52
|
}
|
59
53
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/annotation/annotationPoint.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/annotation/annotationPoint.ts"],"sourcesContent":["import type {
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/annotation/annotationPoint.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/annotation/annotationPoint.ts"],"sourcesContent":["import type { ILineChartSpec } from '@visactor/vchart'\nimport { selector } from '../../../../../dataSelector'\nimport type { Datum, SpecPipe } from 'src/types'\nimport { isSubset } from './utils'\nimport { ANNOTATION_Z_INDEX } from '../../../../utils/constant'\n\nexport const annotationPoint: SpecPipe = (spec, context) => {\n const { advancedVSeed } = context\n const { annotation } = advancedVSeed\n\n if (!annotation || !annotation.annotationPoint) {\n return spec\n }\n\n const { annotationPoint } = annotation\n const annotationPointList = Array.isArray(annotationPoint) ? annotationPoint : [annotationPoint]\n\n const markPoint = annotationPointList.flatMap((annotationPoint) => {\n const {\n selector: selectorPoint,\n text = '',\n textColor = '#ffffff',\n textFontSize = 12,\n textFontWeight = 400,\n textAlign = 'center',\n textBaseline = 'top',\n textBackgroundBorderColor,\n textBackgroundBorderRadius = 4,\n textBackgroundBorderWidth = 1,\n textBackgroundColor = '#212121',\n textBackgroundPadding = 2,\n textBackgroundVisible = true,\n offsetX = 0,\n offsetY = 0,\n } = annotationPoint\n\n const dataset = advancedVSeed.dataset.flat()\n const selectedData = selectorPoint ? dataset.filter((datum) => selector(datum, selectorPoint)) : []\n\n return selectedData.map((datum) => {\n return {\n zIndex: ANNOTATION_Z_INDEX,\n regionRelative: true,\n coordinate: (data: Datum[]) => {\n return data.find((item) => isSubset(datum, item))\n },\n\n itemLine: {\n visible: false,\n },\n itemContent: {\n offsetY,\n offsetX,\n confine: true,\n text: {\n text: text,\n style: {\n visible: true,\n textAlign: textAlign,\n textBaseline: textBaseline,\n fill: textColor,\n stroke: textBackgroundColor,\n lineWidth: 1,\n fontSize: textFontSize,\n fontWeight: textFontWeight,\n dy: textFontSize,\n dx: -10, // 由于vchart tag实现问题,需要设置这个强制偏移量\n },\n labelBackground: {\n visible: textBackgroundVisible,\n padding: textBackgroundPadding,\n style: {\n cornerRadius: textBackgroundBorderRadius ?? 4,\n fill: textBackgroundColor,\n stroke: textBackgroundBorderColor,\n lineWidth: textBackgroundBorderWidth,\n dy: textFontSize,\n dx: -10, // 由于vchart tag实现问题,需要设置这个强制偏移量\n },\n },\n },\n },\n }\n })\n }) as ILineChartSpec['markPoint']\n\n return {\n ...spec,\n markPoint,\n }\n}\n"],"names":["annotationPoint","spec","context","advancedVSeed","annotation","annotationPointList","Array","markPoint","selectorPoint","text","textColor","textFontSize","textFontWeight","textAlign","textBaseline","textBackgroundBorderColor","textBackgroundBorderRadius","textBackgroundBorderWidth","textBackgroundColor","textBackgroundPadding","textBackgroundVisible","offsetX","offsetY","dataset","selectedData","datum","selector","ANNOTATION_Z_INDEX","data","item","isSubset"],"mappings":";;;AAMO,MAAMA,kCAA4B,CAACC,MAAMC;IAC9C,MAAM,EAAEC,aAAa,EAAE,GAAGD;IAC1B,MAAM,EAAEE,UAAU,EAAE,GAAGD;IAEvB,IAAI,CAACC,cAAc,CAACA,WAAW,eAAe,EAC5C,OAAOH;IAGT,MAAM,EAAED,eAAe,EAAE,GAAGI;IAC5B,MAAMC,sBAAsBC,MAAM,OAAO,CAACN,mBAAmBA,kBAAkB;QAACA;KAAgB;IAEhG,MAAMO,YAAYF,oBAAoB,OAAO,CAAC,CAACL;QAC7C,MAAM,EACJ,UAAUQ,aAAa,EACvBC,OAAO,EAAE,EACTC,YAAY,SAAS,EACrBC,eAAe,EAAE,EACjBC,iBAAiB,GAAG,EACpBC,YAAY,QAAQ,EACpBC,eAAe,KAAK,EACpBC,yBAAyB,EACzBC,6BAA6B,CAAC,EAC9BC,4BAA4B,CAAC,EAC7BC,sBAAsB,SAAS,EAC/BC,wBAAwB,CAAC,EACzBC,wBAAwB,IAAI,EAC5BC,UAAU,CAAC,EACXC,UAAU,CAAC,EACZ,GAAGtB;QAEJ,MAAMuB,UAAUpB,cAAc,OAAO,CAAC,IAAI;QAC1C,MAAMqB,eAAehB,gBAAgBe,QAAQ,MAAM,CAAC,CAACE,QAAUC,SAASD,OAAOjB,kBAAkB,EAAE;QAEnG,OAAOgB,aAAa,GAAG,CAAC,CAACC,QAChB;gBACL,QAAQE;gBACR,gBAAgB;gBAChB,YAAY,CAACC,OACJA,KAAK,IAAI,CAAC,CAACC,OAASC,SAASL,OAAOI;gBAG7C,UAAU;oBACR,SAAS;gBACX;gBACA,aAAa;oBACXP;oBACAD;oBACA,SAAS;oBACT,MAAM;wBACJ,MAAMZ;wBACN,OAAO;4BACL,SAAS;4BACT,WAAWI;4BACX,cAAcC;4BACd,MAAMJ;4BACN,QAAQQ;4BACR,WAAW;4BACX,UAAUP;4BACV,YAAYC;4BACZ,IAAID;4BACJ,IAAI;wBACN;wBACA,iBAAiB;4BACf,SAASS;4BACT,SAASD;4BACT,OAAO;gCACL,cAAcH,8BAA8B;gCAC5C,MAAME;gCACN,QAAQH;gCACR,WAAWE;gCACX,IAAIN;gCACJ,IAAI;4BACN;wBACF;oBACF;gBACF;YACF;IAEJ;IAEA,OAAO;QACL,GAAGV,IAAI;QACPM;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 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;
|
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 console.log('Pivot Column Dimensions:', columns)\n return {\n ...result,\n columns: columns,\n }\n}\n"],"names":["pivotColumnDimensions","spec","context","result","advancedVSeed","dimensions","columnDimensions","dim","columns","console"],"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;IAEAE,QAAQ,GAAG,CAAC,4BAA4BD;IACxC,OAAO;QACL,GAAGL,MAAM;QACT,SAASK;IACX;AACF"}
|
@@ -1,17 +1,19 @@
|
|
1
1
|
import { isCombination, isPivot } from "../../../../utils/index.js";
|
2
2
|
const pivotGridStyle = (spec, context)=>{
|
3
|
-
const { vseed } = context;
|
3
|
+
const { vseed, advancedVSeed } = context;
|
4
|
+
const { config, chartType } = advancedVSeed;
|
5
|
+
const themConfig = config?.[chartType]?.pivotGrid ?? {};
|
4
6
|
const onlyCombination = !isPivot(vseed) && isCombination(vseed);
|
5
7
|
const result = {
|
6
8
|
...spec
|
7
9
|
};
|
8
10
|
const transparent = 'rgba(0,0,0,0)';
|
9
|
-
const borderColor = '#e3e5eb';
|
10
|
-
const bodyFontColor = '#141414';
|
11
|
-
const headerFontColor = '#21252c';
|
12
|
-
const headerBackgroundColor = 'rgba(0,0,0,0)';
|
13
|
-
const hoverHeaderBackgroundColor = onlyCombination ? transparent : '#D9DDE4';
|
14
|
-
const hoverHeaderInlineBackgroundColor = onlyCombination ? transparent : '#D9DDE455';
|
11
|
+
const borderColor = themConfig.borderColor ?? '#e3e5eb';
|
12
|
+
const bodyFontColor = themConfig.bodyFontColor ?? '#141414';
|
13
|
+
const headerFontColor = themConfig.headerFontColor ?? '#21252c';
|
14
|
+
const headerBackgroundColor = themConfig.headerBackgroundColor ?? 'rgba(0,0,0,0)';
|
15
|
+
const hoverHeaderBackgroundColor = onlyCombination ? transparent : themConfig.hoverHeaderBackgroundColor ?? '#D9DDE4';
|
16
|
+
const hoverHeaderInlineBackgroundColor = onlyCombination ? transparent : themConfig.hoverHeaderInlineBackgroundColor ?? '#D9DDE455';
|
15
17
|
return {
|
16
18
|
...result,
|
17
19
|
theme: {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.ts"],"sourcesContent":["import type { PivotChartConstructorOptions } from '@visactor/vtable'\nimport { isCombination, isPivot } from 'src/pipeline/utils'\nimport type { 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
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.ts"],"sourcesContent":["import type { PivotChartConstructorOptions } from '@visactor/vtable'\nimport { isCombination, isPivot } from 'src/pipeline/utils'\nimport type { Config, SpecPipe } from 'src/types'\n\nexport const pivotGridStyle: SpecPipe = (spec, context) => {\n const { vseed, advancedVSeed } = context\n const { config, chartType } = advancedVSeed\n const themConfig = (config?.[chartType] as Config['line'])?.pivotGrid ?? {}\n\n const onlyCombination = !isPivot(vseed) && isCombination(vseed)\n\n const result = { ...spec } as PivotChartConstructorOptions\n const transparent = 'rgba(0,0,0,0)'\n\n const borderColor = themConfig.borderColor ?? '#e3e5eb'\n const bodyFontColor = themConfig.bodyFontColor ?? '#141414'\n const headerFontColor = themConfig.headerFontColor ?? '#21252c'\n const headerBackgroundColor = themConfig.headerBackgroundColor ?? 'rgba(0,0,0,0)'\n const hoverHeaderBackgroundColor = onlyCombination\n ? transparent\n : (themConfig.hoverHeaderBackgroundColor ?? '#D9DDE4')\n const hoverHeaderInlineBackgroundColor = onlyCombination\n ? transparent\n : (themConfig.hoverHeaderInlineBackgroundColor ?? '#D9DDE455')\n\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","advancedVSeed","config","chartType","themConfig","onlyCombination","isPivot","isCombination","result","transparent","borderColor","bodyFontColor","headerFontColor","headerBackgroundColor","hoverHeaderBackgroundColor","hoverHeaderInlineBackgroundColor","undefined"],"mappings":";AAIO,MAAMA,iBAA2B,CAACC,MAAMC;IAC7C,MAAM,EAAEC,KAAK,EAAEC,aAAa,EAAE,GAAGF;IACjC,MAAM,EAAEG,MAAM,EAAEC,SAAS,EAAE,GAAGF;IAC9B,MAAMG,aAAcF,QAA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A,yBAAyB;gBACvBN;gBACA,iBAAiB;gBACjB,YAAY;oBACVA;oBACA,iBAAiB;wBAAC;wBAAG;wBAAG;wBAAG;qBAAE;gBAC/B;gBACA,SAASG;gBACT,OAAO;oBACL,aAAaC;gBACf;YACF;YACA,2BAA2B;gBACzBJ;gBACA,iBAAiB;oBAAC;oBAAG;oBAAG;oBAAG;iBAAE;gBAC7B,SAASG;gBACT,YAAY;oBACVH;oBACA,iBAAiB;wBAAC;wBAAG;wBAAG;wBAAG;qBAAE;gBAC/B;gBACA,OAAO;oBACL,aAAaI;gBACf;YACF;YACA,4BAA4B;gBAC1BJ;gBACA,iBAAiB;gBACjB,SAASG;gBACT,YAAY;oBACVH;oBACA,iBAAiB;wBAAC;wBAAG;wBAAG;wBAAG;qBAAE;gBAC/B;gBACA,OAAO;oBACL,aAAaI;gBACf;YACF;YACA,kBAAkB;gBAChBJ;gBACA,iBAAiB;gBACjB,SAASG;gBACT,OAAO;oBACL,aAAaC;gBACf;YACF;YACA,mBAAmB;gBACjBJ;gBACA,iBAAiB;gBACjB,SAASG;gBACT,OAAO;oBACL,aAAaC;gBACf;YACF;YACA,gBAAgB;gBACd,aAAa;gBACb,iBAAiB;YACnB;YACA,YAAY;gBACVJ;gBACA,cAAc;YAChB;QACF;IACF;AACF"}
|
@@ -1,3 +1,5 @@
|
|
1
|
-
import type { TableConfig } from '../../types';
|
1
|
+
import type { PivotChartGridConfig, TableConfig } from '../../types';
|
2
2
|
export declare const getLightTableConfig: () => TableConfig;
|
3
3
|
export declare const getDarkTableConfig: () => TableConfig;
|
4
|
+
export declare const getLightPivotChartGridConfig: () => PivotChartGridConfig;
|
5
|
+
export declare const getDarkPivotChartGridConfig: () => PivotChartGridConfig;
|
@@ -29,6 +29,16 @@ const getDarkTableConfig = ()=>({
|
|
29
29
|
selectedBorderColor: '#3073f2',
|
30
30
|
selectedBackgroundColor: '#4284ff33'
|
31
31
|
});
|
32
|
-
|
32
|
+
const pickPivotChartGridConfig = (tableConfig)=>({
|
33
|
+
borderColor: tableConfig.borderColor,
|
34
|
+
bodyFontColor: tableConfig.bodyFontColor,
|
35
|
+
headerFontColor: tableConfig.headerFontColor,
|
36
|
+
headerBackgroundColor: tableConfig.headerBackgroundColor,
|
37
|
+
hoverHeaderBackgroundColor: tableConfig.hoverHeaderBackgroundColor,
|
38
|
+
hoverHeaderInlineBackgroundColor: tableConfig.hoverHeaderInlineBackgroundColor
|
39
|
+
});
|
40
|
+
const getLightPivotChartGridConfig = ()=>pickPivotChartGridConfig(getLightTableConfig());
|
41
|
+
const getDarkPivotChartGridConfig = ()=>pickPivotChartGridConfig(getDarkTableConfig());
|
42
|
+
export { getDarkPivotChartGridConfig, getDarkTableConfig, getLightPivotChartGridConfig, getLightTableConfig };
|
33
43
|
|
34
44
|
//# sourceMappingURL=table.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"theme/common/table.js","sources":["webpack://@visactor/vseed/./src/theme/common/table.ts"],"sourcesContent":["import type { TableConfig } from 'src/types'\n\nexport const getLightTableConfig = (): TableConfig => ({\n borderColor: '#e3e5eb',\n\n bodyFontSize: 12,\n bodyFontColor: '#141414',\n bodyBackgroundColor: 'transparent',\n\n headerFontSize: 12,\n headerFontColor: '#21252c',\n headerBackgroundColor: '#f6f7f9',\n\n hoverBodyBackgroundColor: '#bedaff',\n hoverBodyInlineBackgroundColor: '#bedaff33',\n hoverHeaderBackgroundColor: '#D9DDE4',\n hoverHeaderInlineBackgroundColor: '#D9DDE455',\n\n selectedBorderColor: '#4080ff',\n selectedBackgroundColor: '#bedaff33',\n\n backgroundColor: 'transparent',\n})\n\nexport const getDarkTableConfig = (): TableConfig => ({\n borderColor: '#4b4e53',\n\n bodyFontSize: 12,\n bodyFontColor: '#fdfdfd',\n bodyBackgroundColor: 'transparent',\n\n headerFontSize: 12,\n headerFontColor: '#fdfdfd',\n headerBackgroundColor: '#36393e',\n\n hoverBodyBackgroundColor: '#4284ff66',\n hoverBodyInlineBackgroundColor: '#4284ff10',\n hoverHeaderBackgroundColor: '#6f7984cc',\n hoverHeaderInlineBackgroundColor: '#4b4f54',\n\n selectedBorderColor: '#3073f2',\n selectedBackgroundColor: '#4284ff33',\n})\n"],"names":["getLightTableConfig","getDarkTableConfig"],"mappings":"AAEO,MAAMA,sBAAsB,IAAoB;QACrD,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,IAAoB;QACpD,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"}
|
1
|
+
{"version":3,"file":"theme/common/table.js","sources":["webpack://@visactor/vseed/./src/theme/common/table.ts"],"sourcesContent":["import type { PivotChartGridConfig, TableConfig } from 'src/types'\n\nexport const getLightTableConfig = (): TableConfig => ({\n borderColor: '#e3e5eb',\n\n bodyFontSize: 12,\n bodyFontColor: '#141414',\n bodyBackgroundColor: 'transparent',\n\n headerFontSize: 12,\n headerFontColor: '#21252c',\n headerBackgroundColor: '#f6f7f9',\n\n hoverBodyBackgroundColor: '#bedaff',\n hoverBodyInlineBackgroundColor: '#bedaff33',\n hoverHeaderBackgroundColor: '#D9DDE4',\n hoverHeaderInlineBackgroundColor: '#D9DDE455',\n\n selectedBorderColor: '#4080ff',\n selectedBackgroundColor: '#bedaff33',\n\n backgroundColor: 'transparent',\n})\n\nexport const getDarkTableConfig = (): TableConfig => ({\n borderColor: '#4b4e53',\n\n bodyFontSize: 12,\n bodyFontColor: '#fdfdfd',\n bodyBackgroundColor: 'transparent',\n\n headerFontSize: 12,\n headerFontColor: '#fdfdfd',\n headerBackgroundColor: '#36393e',\n\n hoverBodyBackgroundColor: '#4284ff66',\n hoverBodyInlineBackgroundColor: '#4284ff10',\n hoverHeaderBackgroundColor: '#6f7984cc',\n hoverHeaderInlineBackgroundColor: '#4b4f54',\n\n selectedBorderColor: '#3073f2',\n selectedBackgroundColor: '#4284ff33',\n})\n\nconst pickPivotChartGridConfig = (tableConfig: TableConfig) => {\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 = (): PivotChartGridConfig => {\n return pickPivotChartGridConfig(getLightTableConfig())\n}\n\nexport const getDarkPivotChartGridConfig = (): PivotChartGridConfig => {\n return pickPivotChartGridConfig(getDarkTableConfig())\n}\n"],"names":["getLightTableConfig","getDarkTableConfig","pickPivotChartGridConfig","tableConfig","getLightPivotChartGridConfig","getDarkPivotChartGridConfig"],"mappings":"AAEO,MAAMA,sBAAsB,IAAoB;QACrD,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,IAAoB;QACpD,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"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { getDarkColor, getDarkCrosshairLine, getDarkCrosshairRect, getDarkTableConfig, getDefaultLabel, getDefaultLegend } from "../common/index.js";
|
1
|
+
import { getDarkColor, getDarkCrosshairLine, getDarkCrosshairRect, getDarkPivotChartGridConfig, getDarkTableConfig, getDefaultLabel, getDefaultLegend } from "../common/index.js";
|
2
2
|
import { getDefaultTooltip } from "../common/tooltip.js";
|
3
3
|
import { getDarkBandAxis, getDarkLinearAxis } from "../common/axes.js";
|
4
4
|
const darkTheme = ()=>{
|
@@ -35,7 +35,8 @@ const darkTheme = ()=>{
|
|
35
35
|
...baseConfig,
|
36
36
|
xAxis: bandAxis,
|
37
37
|
yAxis: linearAxis,
|
38
|
-
crosshairLine: crosshairLine
|
38
|
+
crosshairLine: crosshairLine,
|
39
|
+
pivotGrid: getDarkPivotChartGridConfig()
|
39
40
|
},
|
40
41
|
column: {
|
41
42
|
...baseConfig,
|
@@ -47,7 +48,8 @@ const darkTheme = ()=>{
|
|
47
48
|
4,
|
48
49
|
0,
|
49
50
|
0
|
50
|
-
]
|
51
|
+
],
|
52
|
+
pivotGrid: getDarkPivotChartGridConfig()
|
51
53
|
},
|
52
54
|
columnParallel: {
|
53
55
|
...baseConfig,
|
@@ -59,7 +61,8 @@ const darkTheme = ()=>{
|
|
59
61
|
4,
|
60
62
|
0,
|
61
63
|
0
|
62
|
-
]
|
64
|
+
],
|
65
|
+
pivotGrid: getDarkPivotChartGridConfig()
|
63
66
|
},
|
64
67
|
columnPercent: {
|
65
68
|
...baseConfig,
|
@@ -71,7 +74,8 @@ const darkTheme = ()=>{
|
|
71
74
|
4,
|
72
75
|
0,
|
73
76
|
0
|
74
|
-
]
|
77
|
+
],
|
78
|
+
pivotGrid: getDarkPivotChartGridConfig()
|
75
79
|
},
|
76
80
|
bar: {
|
77
81
|
...baseConfig,
|
@@ -83,7 +87,8 @@ const darkTheme = ()=>{
|
|
83
87
|
4,
|
84
88
|
4,
|
85
89
|
0
|
86
|
-
]
|
90
|
+
],
|
91
|
+
pivotGrid: getDarkPivotChartGridConfig()
|
87
92
|
},
|
88
93
|
barParallel: {
|
89
94
|
...baseConfig,
|
@@ -95,7 +100,8 @@ const darkTheme = ()=>{
|
|
95
100
|
4,
|
96
101
|
4,
|
97
102
|
0
|
98
|
-
]
|
103
|
+
],
|
104
|
+
pivotGrid: getDarkPivotChartGridConfig()
|
99
105
|
},
|
100
106
|
barPercent: {
|
101
107
|
...baseConfig,
|
@@ -107,19 +113,22 @@ const darkTheme = ()=>{
|
|
107
113
|
4,
|
108
114
|
4,
|
109
115
|
0
|
110
|
-
]
|
116
|
+
],
|
117
|
+
pivotGrid: getDarkPivotChartGridConfig()
|
111
118
|
},
|
112
119
|
area: {
|
113
120
|
...baseConfig,
|
114
121
|
xAxis: bandAxis,
|
115
122
|
yAxis: linearAxis,
|
116
|
-
crosshairLine: crosshairLine
|
123
|
+
crosshairLine: crosshairLine,
|
124
|
+
pivotGrid: getDarkPivotChartGridConfig()
|
117
125
|
},
|
118
126
|
areaPercent: {
|
119
127
|
...baseConfig,
|
120
128
|
xAxis: bandAxis,
|
121
129
|
yAxis: linearAxis,
|
122
|
-
crosshairLine: crosshairLine
|
130
|
+
crosshairLine: crosshairLine,
|
131
|
+
pivotGrid: getDarkPivotChartGridConfig()
|
123
132
|
},
|
124
133
|
scatter: {
|
125
134
|
...baseConfig,
|
@@ -146,7 +155,8 @@ const darkTheme = ()=>{
|
|
146
155
|
...baseConfig.label,
|
147
156
|
showValue: false,
|
148
157
|
showValuePercent: false
|
149
|
-
}
|
158
|
+
},
|
159
|
+
pivotGrid: getDarkPivotChartGridConfig()
|
150
160
|
},
|
151
161
|
dualAxis: {
|
152
162
|
...baseConfig,
|
@@ -162,7 +172,8 @@ const darkTheme = ()=>{
|
|
162
172
|
primary: 'column',
|
163
173
|
secondary: 'line'
|
164
174
|
},
|
165
|
-
crosshairRect
|
175
|
+
crosshairRect,
|
176
|
+
pivotGrid: getDarkPivotChartGridConfig()
|
166
177
|
},
|
167
178
|
pie: {
|
168
179
|
...baseConfig,
|
@@ -171,7 +182,8 @@ const darkTheme = ()=>{
|
|
171
182
|
showValuePercent: true,
|
172
183
|
labelLayout: 'labelLine',
|
173
184
|
showDimension: true
|
174
|
-
}
|
185
|
+
},
|
186
|
+
pivotGrid: getDarkPivotChartGridConfig()
|
175
187
|
},
|
176
188
|
donut: {
|
177
189
|
...baseConfig,
|
@@ -180,10 +192,12 @@ const darkTheme = ()=>{
|
|
180
192
|
showValuePercent: true,
|
181
193
|
labelLayout: 'labelLine',
|
182
194
|
showDimension: true
|
183
|
-
}
|
195
|
+
},
|
196
|
+
pivotGrid: getDarkPivotChartGridConfig()
|
184
197
|
},
|
185
198
|
radar: {
|
186
|
-
...baseConfig
|
199
|
+
...baseConfig,
|
200
|
+
pivotGrid: getDarkPivotChartGridConfig()
|
187
201
|
},
|
188
202
|
rose: {
|
189
203
|
...baseConfig,
|
@@ -191,7 +205,8 @@ const darkTheme = ()=>{
|
|
191
205
|
...baseConfig.label,
|
192
206
|
showValuePercent: true,
|
193
207
|
showDimension: true
|
194
|
-
}
|
208
|
+
},
|
209
|
+
pivotGrid: getDarkPivotChartGridConfig()
|
195
210
|
},
|
196
211
|
roseParallel: {
|
197
212
|
...baseConfig,
|
@@ -199,17 +214,20 @@ const darkTheme = ()=>{
|
|
199
214
|
...baseConfig.label,
|
200
215
|
showValuePercent: true,
|
201
216
|
showDimension: true
|
202
|
-
}
|
217
|
+
},
|
218
|
+
pivotGrid: getDarkPivotChartGridConfig()
|
203
219
|
},
|
204
220
|
funnel: {
|
205
|
-
...baseConfig
|
221
|
+
...baseConfig,
|
222
|
+
pivotGrid: getDarkPivotChartGridConfig()
|
206
223
|
},
|
207
224
|
heatmap: {
|
208
225
|
...baseConfig,
|
209
226
|
label: {
|
210
227
|
...baseConfig.label,
|
211
228
|
labelColorSmartInvert: true
|
212
|
-
}
|
229
|
+
},
|
230
|
+
pivotGrid: getDarkPivotChartGridConfig()
|
213
231
|
}
|
214
232
|
}
|
215
233
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"theme/dark/dark.js","sources":["webpack://@visactor/vseed/./src/theme/dark/dark.ts"],"sourcesContent":["import type { CustomThemeConfig, YBandAxis } from 'src/types'\nimport {\n getDarkColor,\n getDarkCrosshairLine,\n getDarkCrosshairRect,\n getDarkTableConfig,\n getDefaultLabel,\n getDefaultLegend,\n} from '../common'\nimport { getDefaultTooltip } from '../common/tooltip'\nimport { getDarkBandAxis, getDarkLinearAxis } from '../common/axes'\n\nexport const darkTheme = (): CustomThemeConfig => {\n const linearAxis = getDarkLinearAxis()\n const bandAxis = getDarkBandAxis()\n const barBandAxis: YBandAxis = {\n ...bandAxis,\n labelAutoHide: false,\n labelAutoHideGap: 1,\n labelAutoLimit: false,\n labelAutoLimitLength: undefined,\n labelAutoRotate: false,\n labelAutoRotateAngleRange: [0, -45, -90],\n }\n const crosshairLine = getDarkCrosshairLine()\n const crosshairRect = getDarkCrosshairRect()\n\n const baseConfig = {\n backgroundColor: 'transparent',\n color: getDarkColor(),\n label: getDefaultLabel(),\n legend: getDefaultLegend(),\n tooltip: getDefaultTooltip(),\n }\n\n const tableConfig = getDarkTableConfig()\n\n return {\n config: {\n table: tableConfig,\n pivotTable: tableConfig,\n\n // cartesian\n line: {\n ...baseConfig,\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairLine: crosshairLine,\n },\n column: {\n ...baseConfig,\n\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairRect: crosshairRect,\n stackCornerRadius: [4, 4, 0, 0],\n },\n columnParallel: {\n ...baseConfig,\n\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairRect: crosshairRect,\n stackCornerRadius: [4, 4, 0, 0],\n },\n columnPercent: {\n ...baseConfig,\n\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairRect: crosshairRect,\n stackCornerRadius: [4, 4, 0, 0],\n },\n bar: {\n ...baseConfig,\n\n xAxis: linearAxis,\n yAxis: barBandAxis,\n crosshairRect: crosshairRect,\n stackCornerRadius: [0, 4, 4, 0],\n },\n barParallel: {\n ...baseConfig,\n\n xAxis: linearAxis,\n yAxis: barBandAxis,\n crosshairRect: crosshairRect,\n stackCornerRadius: [0, 4, 4, 0],\n },\n barPercent: {\n ...baseConfig,\n\n xAxis: linearAxis,\n yAxis: barBandAxis,\n crosshairRect: crosshairRect,\n stackCornerRadius: [0, 4, 4, 0],\n },\n area: {\n ...baseConfig,\n\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairLine: crosshairLine,\n },\n areaPercent: {\n ...baseConfig,\n\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairLine: crosshairLine,\n },\n scatter: {\n ...baseConfig,\n crosshairLine,\n sizeRange: [8, 24],\n xAxis: {\n ...linearAxis,\n line: {\n ...linearAxis.line,\n visible: true,\n },\n },\n yAxis: {\n ...linearAxis,\n line: {\n ...linearAxis.line,\n visible: true,\n },\n },\n label: {\n ...baseConfig.label,\n showValue: false,\n showValuePercent: false,\n },\n },\n dualAxis: {\n ...baseConfig,\n xAxis: bandAxis,\n primaryYAxis: linearAxis,\n secondaryYAxis: { ...linearAxis, grid: { visible: false } },\n dualChartType: {\n primary: 'column',\n secondary: 'line',\n },\n crosshairRect,\n },\n // polar\n pie: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n labelLayout: 'labelLine',\n showDimension: true,\n },\n },\n donut: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n labelLayout: 'labelLine',\n showDimension: true,\n },\n },\n radar: {\n ...baseConfig,\n },\n rose: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n showDimension: true,\n },\n },\n roseParallel: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n showDimension: true,\n },\n },\n // other\n funnel: {\n ...baseConfig,\n },\n heatmap: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n labelColorSmartInvert: true,\n },\n },\n },\n }\n}\n"],"names":["darkTheme","linearAxis","getDarkLinearAxis","bandAxis","getDarkBandAxis","barBandAxis","undefined","crosshairLine","getDarkCrosshairLine","crosshairRect","getDarkCrosshairRect","baseConfig","getDarkColor","getDefaultLabel","getDefaultLegend","getDefaultTooltip","tableConfig","getDarkTableConfig"],"mappings":";;;
|
1
|
+
{"version":3,"file":"theme/dark/dark.js","sources":["webpack://@visactor/vseed/./src/theme/dark/dark.ts"],"sourcesContent":["import type { CustomThemeConfig, YBandAxis } from 'src/types'\nimport {\n getDarkColor,\n getDarkCrosshairLine,\n getDarkCrosshairRect,\n getDarkTableConfig,\n getDefaultLabel,\n getDefaultLegend,\n getDarkPivotChartGridConfig,\n} from '../common'\nimport { getDefaultTooltip } from '../common/tooltip'\nimport { getDarkBandAxis, getDarkLinearAxis } from '../common/axes'\n\nexport const darkTheme = (): CustomThemeConfig => {\n const linearAxis = getDarkLinearAxis()\n const bandAxis = getDarkBandAxis()\n const barBandAxis: YBandAxis = {\n ...bandAxis,\n labelAutoHide: false,\n labelAutoHideGap: 1,\n labelAutoLimit: false,\n labelAutoLimitLength: undefined,\n labelAutoRotate: false,\n labelAutoRotateAngleRange: [0, -45, -90],\n }\n const crosshairLine = getDarkCrosshairLine()\n const crosshairRect = getDarkCrosshairRect()\n\n const baseConfig = {\n backgroundColor: 'transparent',\n color: getDarkColor(),\n label: getDefaultLabel(),\n legend: getDefaultLegend(),\n tooltip: getDefaultTooltip(),\n }\n\n const tableConfig = getDarkTableConfig()\n\n return {\n config: {\n table: tableConfig,\n pivotTable: tableConfig,\n\n // cartesian\n line: {\n ...baseConfig,\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairLine: crosshairLine,\n pivotGrid: getDarkPivotChartGridConfig(),\n },\n column: {\n ...baseConfig,\n\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairRect: crosshairRect,\n stackCornerRadius: [4, 4, 0, 0],\n pivotGrid: getDarkPivotChartGridConfig(),\n },\n columnParallel: {\n ...baseConfig,\n\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairRect: crosshairRect,\n stackCornerRadius: [4, 4, 0, 0],\n pivotGrid: getDarkPivotChartGridConfig(),\n },\n columnPercent: {\n ...baseConfig,\n\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairRect: crosshairRect,\n stackCornerRadius: [4, 4, 0, 0],\n pivotGrid: getDarkPivotChartGridConfig(),\n },\n bar: {\n ...baseConfig,\n\n xAxis: linearAxis,\n yAxis: barBandAxis,\n crosshairRect: crosshairRect,\n stackCornerRadius: [0, 4, 4, 0],\n pivotGrid: getDarkPivotChartGridConfig(),\n },\n barParallel: {\n ...baseConfig,\n\n xAxis: linearAxis,\n yAxis: barBandAxis,\n crosshairRect: crosshairRect,\n stackCornerRadius: [0, 4, 4, 0],\n pivotGrid: getDarkPivotChartGridConfig(),\n },\n barPercent: {\n ...baseConfig,\n\n xAxis: linearAxis,\n yAxis: barBandAxis,\n crosshairRect: crosshairRect,\n stackCornerRadius: [0, 4, 4, 0],\n pivotGrid: getDarkPivotChartGridConfig(),\n },\n area: {\n ...baseConfig,\n\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairLine: crosshairLine,\n pivotGrid: getDarkPivotChartGridConfig(),\n },\n areaPercent: {\n ...baseConfig,\n\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairLine: crosshairLine,\n pivotGrid: getDarkPivotChartGridConfig(),\n },\n scatter: {\n ...baseConfig,\n crosshairLine,\n sizeRange: [8, 24],\n xAxis: {\n ...linearAxis,\n line: {\n ...linearAxis.line,\n visible: true,\n },\n },\n yAxis: {\n ...linearAxis,\n line: {\n ...linearAxis.line,\n visible: true,\n },\n },\n label: {\n ...baseConfig.label,\n showValue: false,\n showValuePercent: false,\n },\n pivotGrid: getDarkPivotChartGridConfig(),\n },\n dualAxis: {\n ...baseConfig,\n xAxis: bandAxis,\n primaryYAxis: linearAxis,\n secondaryYAxis: { ...linearAxis, grid: { visible: false } },\n dualChartType: {\n primary: 'column',\n secondary: 'line',\n },\n crosshairRect,\n pivotGrid: getDarkPivotChartGridConfig(),\n },\n // polar\n pie: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n labelLayout: 'labelLine',\n showDimension: true,\n },\n pivotGrid: getDarkPivotChartGridConfig(),\n },\n donut: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n labelLayout: 'labelLine',\n showDimension: true,\n },\n pivotGrid: getDarkPivotChartGridConfig(),\n },\n radar: {\n ...baseConfig,\n pivotGrid: getDarkPivotChartGridConfig(),\n },\n rose: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n showDimension: true,\n },\n pivotGrid: getDarkPivotChartGridConfig(),\n },\n roseParallel: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n showDimension: true,\n },\n\n pivotGrid: getDarkPivotChartGridConfig(),\n },\n // other\n funnel: {\n ...baseConfig,\n\n pivotGrid: getDarkPivotChartGridConfig(),\n },\n heatmap: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n labelColorSmartInvert: true,\n },\n\n pivotGrid: getDarkPivotChartGridConfig(),\n },\n },\n }\n}\n"],"names":["darkTheme","linearAxis","getDarkLinearAxis","bandAxis","getDarkBandAxis","barBandAxis","undefined","crosshairLine","getDarkCrosshairLine","crosshairRect","getDarkCrosshairRect","baseConfig","getDarkColor","getDefaultLabel","getDefaultLegend","getDefaultTooltip","tableConfig","getDarkTableConfig","getDarkPivotChartGridConfig"],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BACb,OAAO;oBACL,GAAGA,WAAW,KAAK;oBACnB,kBAAkB;oBAClB,eAAe;gBACjB;gBACA,WAAWO;YACb;YACA,cAAc;gBACZ,GAAGP,UAAU;gBACb,OAAO;oBACL,GAAGA,WAAW,KAAK;oBACnB,kBAAkB;oBAClB,eAAe;gBACjB;gBAEA,WAAWO;YACb;YAEA,QAAQ;gBACN,GAAGP,UAAU;gBAEb,WAAWO;YACb;YACA,SAAS;gBACP,GAAGP,UAAU;gBACb,OAAO;oBACL,GAAGA,WAAW,KAAK;oBACnB,uBAAuB;gBACzB;gBAEA,WAAWO;YACb;QACF;IACF;AACF"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { getDefaultLabel, getDefaultLegend, getLightColor, getLightCrosshairLine, getLightCrosshairRect, getLightTableConfig } from "../common/index.js";
|
1
|
+
import { getDefaultLabel, getDefaultLegend, getLightColor, getLightCrosshairLine, getLightCrosshairRect, getLightPivotChartGridConfig, getLightTableConfig } from "../common/index.js";
|
2
2
|
import { getDefaultTooltip } from "../common/tooltip.js";
|
3
3
|
import { getLightBandAxis, getLightLinearAxis } from "../common/axes.js";
|
4
4
|
const lightTheme = ()=>{
|
@@ -35,7 +35,8 @@ const lightTheme = ()=>{
|
|
35
35
|
...baseConfig,
|
36
36
|
xAxis: bandAxis,
|
37
37
|
yAxis: linearAxis,
|
38
|
-
crosshairLine
|
38
|
+
crosshairLine,
|
39
|
+
pivotGrid: getLightPivotChartGridConfig()
|
39
40
|
},
|
40
41
|
column: {
|
41
42
|
...baseConfig,
|
@@ -47,7 +48,8 @@ const lightTheme = ()=>{
|
|
47
48
|
4,
|
48
49
|
0,
|
49
50
|
0
|
50
|
-
]
|
51
|
+
],
|
52
|
+
pivotGrid: getLightPivotChartGridConfig()
|
51
53
|
},
|
52
54
|
columnParallel: {
|
53
55
|
...baseConfig,
|
@@ -59,7 +61,8 @@ const lightTheme = ()=>{
|
|
59
61
|
4,
|
60
62
|
0,
|
61
63
|
0
|
62
|
-
]
|
64
|
+
],
|
65
|
+
pivotGrid: getLightPivotChartGridConfig()
|
63
66
|
},
|
64
67
|
columnPercent: {
|
65
68
|
...baseConfig,
|
@@ -73,7 +76,8 @@ const lightTheme = ()=>{
|
|
73
76
|
4,
|
74
77
|
0,
|
75
78
|
0
|
76
|
-
]
|
79
|
+
],
|
80
|
+
pivotGrid: getLightPivotChartGridConfig()
|
77
81
|
},
|
78
82
|
bar: {
|
79
83
|
...baseConfig,
|
@@ -85,7 +89,8 @@ const lightTheme = ()=>{
|
|
85
89
|
4,
|
86
90
|
4,
|
87
91
|
0
|
88
|
-
]
|
92
|
+
],
|
93
|
+
pivotGrid: getLightPivotChartGridConfig()
|
89
94
|
},
|
90
95
|
barParallel: {
|
91
96
|
...baseConfig,
|
@@ -97,7 +102,8 @@ const lightTheme = ()=>{
|
|
97
102
|
4,
|
98
103
|
4,
|
99
104
|
0
|
100
|
-
]
|
105
|
+
],
|
106
|
+
pivotGrid: getLightPivotChartGridConfig()
|
101
107
|
},
|
102
108
|
barPercent: {
|
103
109
|
...baseConfig,
|
@@ -111,13 +117,15 @@ const lightTheme = ()=>{
|
|
111
117
|
4,
|
112
118
|
4,
|
113
119
|
0
|
114
|
-
]
|
120
|
+
],
|
121
|
+
pivotGrid: getLightPivotChartGridConfig()
|
115
122
|
},
|
116
123
|
area: {
|
117
124
|
...baseConfig,
|
118
125
|
xAxis: bandAxis,
|
119
126
|
yAxis: linearAxis,
|
120
|
-
crosshairLine
|
127
|
+
crosshairLine,
|
128
|
+
pivotGrid: getLightPivotChartGridConfig()
|
121
129
|
},
|
122
130
|
areaPercent: {
|
123
131
|
...baseConfig,
|
@@ -125,7 +133,8 @@ const lightTheme = ()=>{
|
|
125
133
|
yAxis: {
|
126
134
|
...linearAxis
|
127
135
|
},
|
128
|
-
crosshairLine
|
136
|
+
crosshairLine,
|
137
|
+
pivotGrid: getLightPivotChartGridConfig()
|
129
138
|
},
|
130
139
|
scatter: {
|
131
140
|
...baseConfig,
|
@@ -152,7 +161,8 @@ const lightTheme = ()=>{
|
|
152
161
|
...baseConfig.label,
|
153
162
|
showValue: false,
|
154
163
|
showValuePercent: false
|
155
|
-
}
|
164
|
+
},
|
165
|
+
pivotGrid: getLightPivotChartGridConfig()
|
156
166
|
},
|
157
167
|
dualAxis: {
|
158
168
|
...baseConfig,
|
@@ -168,7 +178,8 @@ const lightTheme = ()=>{
|
|
168
178
|
primary: 'column',
|
169
179
|
secondary: 'line'
|
170
180
|
},
|
171
|
-
crosshairRect
|
181
|
+
crosshairRect,
|
182
|
+
pivotGrid: getLightPivotChartGridConfig()
|
172
183
|
},
|
173
184
|
pie: {
|
174
185
|
...baseConfig,
|
@@ -177,7 +188,8 @@ const lightTheme = ()=>{
|
|
177
188
|
showValuePercent: true,
|
178
189
|
labelLayout: 'labelLine',
|
179
190
|
showDimension: true
|
180
|
-
}
|
191
|
+
},
|
192
|
+
pivotGrid: getLightPivotChartGridConfig()
|
181
193
|
},
|
182
194
|
donut: {
|
183
195
|
...baseConfig,
|
@@ -186,10 +198,12 @@ const lightTheme = ()=>{
|
|
186
198
|
showValuePercent: true,
|
187
199
|
labelLayout: 'labelLine',
|
188
200
|
showDimension: true
|
189
|
-
}
|
201
|
+
},
|
202
|
+
pivotGrid: getLightPivotChartGridConfig()
|
190
203
|
},
|
191
204
|
radar: {
|
192
|
-
...baseConfig
|
205
|
+
...baseConfig,
|
206
|
+
pivotGrid: getLightPivotChartGridConfig()
|
193
207
|
},
|
194
208
|
rose: {
|
195
209
|
...baseConfig,
|
@@ -197,7 +211,8 @@ const lightTheme = ()=>{
|
|
197
211
|
...baseConfig.label,
|
198
212
|
showValuePercent: true,
|
199
213
|
showDimension: true
|
200
|
-
}
|
214
|
+
},
|
215
|
+
pivotGrid: getLightPivotChartGridConfig()
|
201
216
|
},
|
202
217
|
roseParallel: {
|
203
218
|
...baseConfig,
|
@@ -205,17 +220,20 @@ const lightTheme = ()=>{
|
|
205
220
|
...baseConfig.label,
|
206
221
|
showValuePercent: true,
|
207
222
|
showDimension: true
|
208
|
-
}
|
223
|
+
},
|
224
|
+
pivotGrid: getLightPivotChartGridConfig()
|
209
225
|
},
|
210
226
|
funnel: {
|
211
|
-
...baseConfig
|
227
|
+
...baseConfig,
|
228
|
+
pivotGrid: getLightPivotChartGridConfig()
|
212
229
|
},
|
213
230
|
heatmap: {
|
214
231
|
...baseConfig,
|
215
232
|
label: {
|
216
233
|
...baseConfig.label,
|
217
234
|
labelColorSmartInvert: true
|
218
|
-
}
|
235
|
+
},
|
236
|
+
pivotGrid: getLightPivotChartGridConfig()
|
219
237
|
}
|
220
238
|
}
|
221
239
|
};
|