@visactor/vseed 0.3.13 → 0.3.15
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 +1 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/builder/builder/builder.d.ts +3135 -25697
- package/dist/esm/builder/register/all.js +4 -1
- package/dist/esm/builder/register/all.js.map +1 -1
- package/dist/esm/builder/register/chartType/index.d.ts +3 -0
- package/dist/esm/builder/register/chartType/index.js +4 -1
- package/dist/esm/builder/register/chartType/raceBar.d.ts +5 -0
- package/dist/esm/builder/register/chartType/raceBar.js +9 -0
- package/dist/esm/builder/register/chartType/raceBar.js.map +1 -0
- package/dist/esm/builder/register/chartType/raceColumn.d.ts +5 -0
- package/dist/esm/builder/register/chartType/raceColumn.js +9 -0
- package/dist/esm/builder/register/chartType/raceColumn.js.map +1 -0
- package/dist/esm/builder/register/chartType/raceScatter.d.ts +5 -0
- package/dist/esm/builder/register/chartType/raceScatter.js +9 -0
- package/dist/esm/builder/register/chartType/raceScatter.js.map +1 -0
- package/dist/esm/pipeline/advanced/chart/pipeline/index.d.ts +3 -0
- package/dist/esm/pipeline/advanced/chart/pipeline/index.js +4 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/raceBar.d.ts +2 -0
- package/dist/esm/pipeline/advanced/chart/pipeline/raceBar.js +5 -0
- package/dist/esm/pipeline/advanced/chart/pipeline/raceBar.js.map +1 -0
- package/dist/esm/pipeline/advanced/chart/pipeline/raceColumn.d.ts +2 -0
- package/dist/esm/pipeline/advanced/chart/pipeline/raceColumn.js +5 -0
- package/dist/esm/pipeline/advanced/chart/pipeline/raceColumn.js.map +1 -0
- package/dist/esm/pipeline/advanced/chart/pipeline/raceScatter.d.ts +2 -0
- package/dist/esm/pipeline/advanced/chart/pipeline/raceScatter.js +5 -0
- package/dist/esm/pipeline/advanced/chart/pipeline/raceScatter.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/index.d.ts +1 -0
- package/dist/esm/pipeline/spec/chart/index.js +1 -0
- package/dist/esm/pipeline/spec/chart/pipeline/area.js +2 -2
- package/dist/esm/pipeline/spec/chart/pipeline/area.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/areaPercent.js +2 -2
- package/dist/esm/pipeline/spec/chart/pipeline/areaPercent.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/bar.js +2 -2
- package/dist/esm/pipeline/spec/chart/pipeline/bar.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/barParallel.js +2 -2
- package/dist/esm/pipeline/spec/chart/pipeline/barParallel.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/barPercent.js +2 -2
- package/dist/esm/pipeline/spec/chart/pipeline/barPercent.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/column.js +2 -2
- package/dist/esm/pipeline/spec/chart/pipeline/column.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/columnParallel.js +2 -2
- package/dist/esm/pipeline/spec/chart/pipeline/columnParallel.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/columnPercent.js +2 -2
- package/dist/esm/pipeline/spec/chart/pipeline/columnPercent.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/donut.js +2 -2
- package/dist/esm/pipeline/spec/chart/pipeline/donut.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/funnel.js +2 -2
- package/dist/esm/pipeline/spec/chart/pipeline/funnel.js.map +1 -1
- 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/pipeline/index.d.ts +3 -0
- package/dist/esm/pipeline/spec/chart/pipeline/index.js +4 -1
- package/dist/esm/pipeline/spec/chart/pipeline/line.js +2 -2
- package/dist/esm/pipeline/spec/chart/pipeline/line.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/pie.js +2 -2
- package/dist/esm/pipeline/spec/chart/pipeline/pie.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/raceBar.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipeline/raceBar.js +26 -0
- package/dist/esm/pipeline/spec/chart/pipeline/raceBar.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipeline/raceColumn.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipeline/raceColumn.js +26 -0
- package/dist/esm/pipeline/spec/chart/pipeline/raceColumn.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipeline/raceScatter.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipeline/raceScatter.js +24 -0
- package/dist/esm/pipeline/spec/chart/pipeline/raceScatter.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipeline/radar.js +2 -2
- package/dist/esm/pipeline/spec/chart/pipeline/radar.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/rose.js +2 -2
- package/dist/esm/pipeline/spec/chart/pipeline/rose.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/roseParallel.js +2 -2
- package/dist/esm/pipeline/spec/chart/pipeline/roseParallel.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/scatter.js +2 -2
- package/dist/esm/pipeline/spec/chart/pipeline/scatter.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/init/scatter.js +4 -0
- package/dist/esm/pipeline/spec/chart/pipes/init/scatter.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/player/index.d.ts +8 -1
- package/dist/esm/pipeline/spec/chart/pipes/player/index.js +8 -2
- package/dist/esm/pipeline/spec/chart/pipes/player/isPlayer.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/player/isPlayer.js +11 -0
- package/dist/esm/pipeline/spec/chart/pipes/player/isPlayer.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/player/playerXBand.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/player/playerXBand.js +10 -0
- package/dist/esm/pipeline/spec/chart/pipes/player/playerXBand.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/player/playerXLinear.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/player/playerXLinear.js +14 -0
- package/dist/esm/pipeline/spec/chart/pipes/player/playerXLinear.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/player/playerXY.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/player/playerXY.js +171 -0
- package/dist/esm/pipeline/spec/chart/pipes/player/playerXY.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/player/playerYBand.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/player/playerYBand.js +13 -0
- package/dist/esm/pipeline/spec/chart/pipes/player/playerYBand.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/player/playerYLinear.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/player/playerYLinear.js +14 -0
- package/dist/esm/pipeline/spec/chart/pipes/player/playerYLinear.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/player/playerYX.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/player/playerYX.js +157 -0
- package/dist/esm/pipeline/spec/chart/pipes/player/playerYX.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/player/playerYY.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/player/playerYY.js +173 -0
- package/dist/esm/pipeline/spec/chart/pipes/player/playerYY.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/utils/condition.d.ts +3 -0
- package/dist/esm/pipeline/spec/chart/utils/condition.js +7 -0
- package/dist/esm/pipeline/spec/chart/utils/condition.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/utils/index.d.ts +1 -0
- package/dist/esm/pipeline/spec/chart/utils/index.js +1 -0
- package/dist/esm/pipeline/utils/chatType.d.ts +1 -1
- package/dist/esm/pipeline/utils/chatType.js +4 -1
- package/dist/esm/pipeline/utils/chatType.js.map +1 -1
- package/dist/esm/pipeline/utils/constant.d.ts +3 -0
- package/dist/esm/pipeline/utils/constant.js +3 -0
- package/dist/esm/pipeline/utils/constant.js.map +1 -1
- package/dist/esm/theme/dark/dark.js +74 -29
- package/dist/esm/theme/dark/dark.js.map +1 -1
- package/dist/esm/theme/light/light.js +61 -15
- package/dist/esm/theme/light/light.js.map +1 -1
- package/dist/esm/types/advancedVSeed.d.ts +35 -18880
- package/dist/esm/types/advancedVSeed.js.map +1 -1
- package/dist/esm/types/chartType/area/area.d.ts +1 -5
- package/dist/esm/types/chartType/areaPercent/areaPercent.d.ts +1 -5
- package/dist/esm/types/chartType/bar/bar.d.ts +1 -5
- package/dist/esm/types/chartType/barParallel/barParallel.d.ts +1 -5
- package/dist/esm/types/chartType/barPercent/barPercent.d.ts +1 -5
- package/dist/esm/types/chartType/column/column.d.ts +1 -5
- package/dist/esm/types/chartType/columnParallel/columnParallel.d.ts +1 -5
- package/dist/esm/types/chartType/columnPercent/columnPercent.d.ts +1 -5
- package/dist/esm/types/chartType/donut/donut.d.ts +1 -5
- package/dist/esm/types/chartType/funnel/funnel.d.ts +1 -5
- package/dist/esm/types/chartType/heatmap/heatmap.d.ts +1 -6
- package/dist/esm/types/chartType/index.d.ts +3 -0
- package/dist/esm/types/chartType/index.js +3 -0
- package/dist/esm/types/chartType/line/line.d.ts +1 -5
- package/dist/esm/types/chartType/pie/pie.d.ts +1 -5
- package/dist/esm/types/chartType/raceBar/index.d.ts +2 -0
- package/dist/esm/types/chartType/raceBar/index.js +1 -0
- package/dist/esm/types/chartType/raceBar/raceBar.d.ts +118 -0
- package/dist/esm/types/chartType/raceBar/raceBar.js +0 -0
- package/dist/esm/types/chartType/raceBar/zRaceBar.d.ts +1217 -0
- package/dist/esm/types/chartType/raceBar/zRaceBar.js +36 -0
- package/dist/esm/types/chartType/raceBar/zRaceBar.js.map +1 -0
- package/dist/esm/types/chartType/raceColumn/index.d.ts +2 -0
- package/dist/esm/types/chartType/raceColumn/index.js +1 -0
- package/dist/esm/types/chartType/raceColumn/raceColumn.d.ts +31 -0
- package/dist/esm/types/chartType/raceColumn/raceColumn.js +0 -0
- package/dist/esm/types/chartType/raceColumn/zRaceColumn.d.ts +1217 -0
- package/dist/esm/types/chartType/raceColumn/zRaceColumn.js +36 -0
- package/dist/esm/types/chartType/raceColumn/zRaceColumn.js.map +1 -0
- package/dist/esm/types/chartType/raceScatter/index.d.ts +2 -0
- package/dist/esm/types/chartType/raceScatter/index.js +1 -0
- package/dist/esm/types/chartType/raceScatter/raceScatter.d.ts +27 -0
- package/dist/esm/types/chartType/raceScatter/raceScatter.js +0 -0
- package/dist/esm/types/chartType/raceScatter/zRaceScatter.d.ts +1416 -0
- package/dist/esm/types/chartType/raceScatter/zRaceScatter.js +33 -0
- package/dist/esm/types/chartType/raceScatter/zRaceScatter.js.map +1 -0
- package/dist/esm/types/chartType/radar/radar.d.ts +1 -5
- package/dist/esm/types/chartType/rose/rose.d.ts +1 -6
- package/dist/esm/types/chartType/roseParallel/roseParallel.d.ts +1 -6
- package/dist/esm/types/chartType/scatter/scatter.d.ts +1 -5
- package/dist/esm/types/properties/chartType/chartType.d.ts +2 -1
- package/dist/esm/types/properties/chartType/chartType.js +1 -0
- package/dist/esm/types/properties/chartType/chartType.js.map +1 -1
- package/dist/esm/types/properties/config/area.d.ts +0 -38
- package/dist/esm/types/properties/config/area.js +0 -2
- package/dist/esm/types/properties/config/area.js.map +1 -1
- package/dist/esm/types/properties/config/bar.d.ts +0 -57
- package/dist/esm/types/properties/config/bar.js +0 -2
- package/dist/esm/types/properties/config/bar.js.map +1 -1
- package/dist/esm/types/properties/config/column.d.ts +0 -57
- package/dist/esm/types/properties/config/column.js +0 -2
- package/dist/esm/types/properties/config/column.js.map +1 -1
- package/dist/esm/types/properties/config/config.d.ts +1820 -441
- package/dist/esm/types/properties/config/config.js +4 -0
- package/dist/esm/types/properties/config/config.js.map +1 -1
- package/dist/esm/types/properties/config/funnel.d.ts +0 -19
- package/dist/esm/types/properties/config/funnel.js +0 -2
- package/dist/esm/types/properties/config/funnel.js.map +1 -1
- package/dist/esm/types/properties/config/heatmap.d.ts +0 -19
- package/dist/esm/types/properties/config/heatmap.js +0 -2
- package/dist/esm/types/properties/config/heatmap.js.map +1 -1
- package/dist/esm/types/properties/config/line.d.ts +0 -19
- package/dist/esm/types/properties/config/line.js +1 -3
- package/dist/esm/types/properties/config/line.js.map +1 -1
- package/dist/esm/types/properties/config/pie.d.ts +0 -57
- package/dist/esm/types/properties/config/pie.js +0 -2
- package/dist/esm/types/properties/config/pie.js.map +1 -1
- package/dist/esm/types/properties/config/race.d.ts +1706 -0
- package/dist/esm/types/properties/config/race.js +18 -0
- package/dist/esm/types/properties/config/race.js.map +1 -0
- package/dist/esm/types/properties/config/rose.d.ts +0 -38
- package/dist/esm/types/properties/config/rose.js +0 -2
- package/dist/esm/types/properties/config/rose.js.map +1 -1
- package/dist/esm/types/properties/config/scatter.d.ts +0 -19
- package/dist/esm/types/properties/config/scatter.js +0 -2
- package/dist/esm/types/properties/config/scatter.js.map +1 -1
- package/dist/esm/types/properties/measures/baseMeasure.d.ts +8 -6
- package/dist/esm/types/properties/theme/customTheme.d.ts +5548 -2790
- package/dist/esm/types/vseed.d.ts +2 -2
- package/dist/esm/types/zVseed.d.ts +3844 -0
- package/dist/esm/types/zVseed.js +4 -1
- package/dist/esm/types/zVseed.js.map +1 -1
- package/dist/umd/index.js +1599 -872
- package/dist/umd/index.js.map +1 -1
- package/package.json +8 -7
- package/dist/esm/pipeline/spec/chart/pipes/player/playerAdapter.d.ts +0 -2
- package/dist/esm/pipeline/spec/chart/pipes/player/playerAdapter.js +0 -88
- package/dist/esm/pipeline/spec/chart/pipes/player/playerAdapter.js.map +0 -1
|
@@ -8,7 +8,7 @@ const isRadar = (vseed)=>vseed.chartType === ChartTypeEnum.Radar;
|
|
|
8
8
|
const isAreaPercent = (vseed)=>vseed.chartType === ChartTypeEnum.AreaPercent;
|
|
9
9
|
const isColumnPercent = (vseed)=>vseed.chartType === ChartTypeEnum.ColumnPercent;
|
|
10
10
|
const isBarPercent = (vseed)=>vseed.chartType === ChartTypeEnum.BarPercent;
|
|
11
|
-
const isBarLikeChart = (vseed)=>vseed.chartType === ChartTypeEnum.Bar || vseed.chartType === ChartTypeEnum.BarPercent || vseed.chartType === ChartTypeEnum.BarParallel;
|
|
11
|
+
const isBarLikeChart = (vseed)=>vseed.chartType === ChartTypeEnum.Bar || vseed.chartType === ChartTypeEnum.RaceBar || vseed.chartType === ChartTypeEnum.BarPercent || vseed.chartType === ChartTypeEnum.BarParallel;
|
|
12
12
|
const isVTable = (vseed)=>[
|
|
13
13
|
'table',
|
|
14
14
|
'pivotTable'
|
|
@@ -54,6 +54,9 @@ const isCombination = (vseed)=>{
|
|
|
54
54
|
};
|
|
55
55
|
const isRectungularCoordinate = (chartType)=>[
|
|
56
56
|
ChartTypeEnum.Bar,
|
|
57
|
+
ChartTypeEnum.RaceBar,
|
|
58
|
+
ChartTypeEnum.RaceColumn,
|
|
59
|
+
ChartTypeEnum.RaceScatter,
|
|
57
60
|
ChartTypeEnum.BarPercent,
|
|
58
61
|
ChartTypeEnum.BarParallel,
|
|
59
62
|
ChartTypeEnum.Column,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/utils/chatType.js","sources":["webpack://@visactor/vseed/./src/pipeline/utils/chatType.ts"],"sourcesContent":["import type { MeasureEncoding, Measures } from 'src/types'\nimport { type Dimensions, type DimensionGroup, type VSeed, type Measure } from 'src/types'\nimport { isPositionMeasure } from './measures'\nimport { isCommonMeasureEncoding, isMeasureTreeWithParentId } from '../advanced/chart/pipes/measures/utils'\nimport { unique } from 'remeda'\nimport { ChartTypeEnum, DEFAULT_PARENT_ID } from './constant'\n\nexport const isTable = (vseed: VSeed) => {\n return vseed.chartType === ChartTypeEnum.Table\n}\nexport const isPivotTable = (vseed: VSeed) => {\n return vseed.chartType === ChartTypeEnum.PivotTable\n}\nexport const isRadar = (vseed: VSeed) => {\n return vseed.chartType === ChartTypeEnum.Radar\n}\nexport const isAreaPercent = (vseed: VSeed) => {\n return vseed.chartType === ChartTypeEnum.AreaPercent\n}\nexport const isColumnPercent = (vseed: VSeed) => {\n return vseed.chartType === ChartTypeEnum.ColumnPercent\n}\nexport const isBarPercent = (vseed: VSeed) => {\n return vseed.chartType === ChartTypeEnum.BarPercent\n}\n\nexport const isBarLikeChart = (vseed: VSeed) => {\n return (\n vseed.chartType === ChartTypeEnum.Bar ||\n vseed.chartType === ChartTypeEnum.BarPercent ||\n vseed.chartType === ChartTypeEnum.BarParallel\n )\n}\n\nexport const isVTable = (vseed: VSeed) => {\n return ['table', 'pivotTable'].includes(vseed.chartType)\n}\nexport const isVChart = (vseed: VSeed): boolean => {\n return !isVTable(vseed)\n}\n\n/**\n * @description 透视图表或组合图\n * - 透视图表定义: 存在 column 或 row的 encoding\n * - 组合图表定义: 存在多组指标的情况\n * - 透视组合图表: 存在 column 或 row的 encoding 且 存在多组指标的情况\n * 上述三者都只能使用 VTable.PivotChart 绘制\n */\nexport const isPivotChart = (vseed: VSeed) => {\n if (isVTable(vseed)) {\n return false\n }\n\n if (isPivot(vseed)) {\n return true\n }\n\n return isCombination(vseed)\n}\n\n/**\n * @description 存在column 或 row的encoding\n */\nexport const isPivot = (vseed: VSeed) => {\n const { dimensions = [], measures = [] } = vseed as {\n dimensions: Dimensions\n measures: Measures\n }\n\n if (dimensions && dimensions.some((dimension) => dimension.encoding === 'row' || dimension.encoding === 'column')) {\n return true\n }\n\n if (vseed.chartType === ChartTypeEnum.Scatter) {\n const xCount = measures.filter((m: Measure) => m.encoding === 'xAxis').length\n const yCount = measures.filter((m: Measure) => m.encoding === 'yAxis').length\n const otherCount = measures.filter(\n (m: Measure) =>\n !['size', 'xAxis', 'yAxis'].includes(m.encoding as string) &&\n !isCommonMeasureEncoding(m.encoding as MeasureEncoding),\n ).length\n\n /**\n * Scatter \"matrix\" detection logic\n *\n * xCount: number of measures explicitly encoded on the x-axis\n * yCount: number of measures explicitly encoded on the y-axis\n * otherCount: measures that are not size/xAxis/yAxis and are not common encodings\n *\n * When there is at least one explicit x-axis measure (xCount > 0):\n * - All x-encoded measures are counted as X.\n * - Remaining measures (y-encoded + \"other\") are treated as Y variants.\n *\n * When there is no explicit x-axis measure (xCount === 0):\n * - If there is at least one \"other\" measure, we treat exactly one of them as the X measure\n * (so finalXCount = 1), and the remaining \"other\" measures contribute to Y alongside\n * the explicit y-encoded measures.\n * - Since we conceptually \"promote\" one of the other measures to X, only (otherCount - 1)\n * are left to be counted towards Y. Math.max(..., 0) protects against negative values\n * when otherCount is 0.\n */\n let finalXCount: number\n let finalYCount: number\n\n if (xCount > 0) {\n // Explicit x-axis measures exist: X is fixed, Y aggregates y-encoded + other measures.\n finalXCount = xCount\n finalYCount = yCount + otherCount\n } else {\n // No explicit x-axis measure:\n // - If there are \"other\" measures, treat one as X.\n // - Remaining \"other\" measures contribute to Y, together with any y-encoded measures.\n finalXCount = otherCount > 0 ? 1 : 0\n finalYCount = yCount + Math.max(otherCount - 1, 0)\n }\n if (finalXCount > 1 || finalYCount > 1) return true\n }\n\n return false\n}\n\n/**\n * @description 不存在column 或 row的encoding, 但是有多组指标的情况\n */\nexport const isCombination = (vseed: VSeed) => {\n if (isMeasureTreeWithParentId(vseed.measures)) {\n const parentIds = vseed.measures\n ?.filter((m: Measure) => isPositionMeasure(m, vseed.chartType))\n .map((measure: Measure) => measure.parentId || DEFAULT_PARENT_ID)\n return parentIds && unique(parentIds).length > 1\n }\n\n const { measures = [] } = vseed as {\n measures: Measures\n dimensions: Dimensions\n }\n\n const hasMeasureGroup = measures && measures.some((measure: DimensionGroup) => measure && measure.children)\n\n return hasMeasureGroup\n}\n\nexport const isRectungularCoordinate = (chartType: string) => {\n return (\n [\n ChartTypeEnum.Bar,\n ChartTypeEnum.BarPercent,\n ChartTypeEnum.BarParallel,\n ChartTypeEnum.Column,\n ChartTypeEnum.ColumnPercent,\n ChartTypeEnum.ColumnParallel,\n ChartTypeEnum.Line,\n ChartTypeEnum.Area,\n ChartTypeEnum.AreaPercent,\n ChartTypeEnum.DualAxis,\n ChartTypeEnum.Boxplot,\n ChartTypeEnum.DualAxis,\n ChartTypeEnum.Scatter,\n ChartTypeEnum.Heatmap,\n ChartTypeEnum.Boxplot,\n ] as string[]\n ).includes(chartType)\n}\n\n/**\n * 默认的双轴图图表类型配置\n */\nexport const DEFAULT_DUAL_CHART_TYPE = {\n primary: 'column',\n secondary: 'line',\n}\n\nexport const isDualAxisChartType = (chartType: string | undefined) => {\n return (\n chartType &&\n ['column', 'columnParallel', 'columnPercent', 'line', 'area', 'areaPercent', 'scatter'].includes(chartType)\n )\n}\n"],"names":["isTable","vseed","ChartTypeEnum","isPivotTable","isRadar","isAreaPercent","isColumnPercent","isBarPercent","isBarLikeChart","isVTable","isVChart","isPivotChart","isPivot","isCombination","dimensions","measures","dimension","xCount","m","yCount","otherCount","isCommonMeasureEncoding","finalXCount","finalYCount","Math","isMeasureTreeWithParentId","parentIds","isPositionMeasure","measure","DEFAULT_PARENT_ID","unique","hasMeasureGroup","isRectungularCoordinate","chartType","DEFAULT_DUAL_CHART_TYPE","isDualAxisChartType"],"mappings":";;;;AAOO,MAAMA,UAAU,CAACC,QACfA,MAAM,SAAS,KAAKC,cAAc,KAAK;AAEzC,MAAMC,eAAe,CAACF,QACpBA,MAAM,SAAS,KAAKC,cAAc,UAAU;AAE9C,MAAME,UAAU,CAACH,QACfA,MAAM,SAAS,KAAKC,cAAc,KAAK;AAEzC,MAAMG,gBAAgB,CAACJ,QACrBA,MAAM,SAAS,KAAKC,cAAc,WAAW;AAE/C,MAAMI,kBAAkB,CAACL,QACvBA,MAAM,SAAS,KAAKC,cAAc,aAAa;AAEjD,MAAMK,eAAe,CAACN,QACpBA,MAAM,SAAS,KAAKC,cAAc,UAAU;AAG9C,MAAMM,iBAAiB,CAACP,QAE3BA,MAAM,SAAS,KAAKC,cAAc,GAAG,IACr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IwB,0BAA0BxB,MAAM,QAAQ,GAAG;QAC7C,MAAMyB,YAAYzB,MAAM,QAAQ,EAC5B,OAAO,CAACiB,IAAeS,kBAAkBT,GAAGjB,MAAM,SAAS,GAC5D,IAAI,CAAC2B,UAAqBA,QAAQ,QAAQ,IAAIC;QACjD,OAAOH,aAAaI,OAAOJ,WAAW,MAAM,GAAG;IACjD;IAEA,MAAM,EAAEX,WAAW,EAAE,EAAE,GAAGd;IAK1B,MAAM8B,kBAAkBhB,YAAYA,SAAS,IAAI,CAAC,CAACa,UAA4BA,WAAWA,QAAQ,QAAQ;IAE1G,OAAOG;AACT;AAEO,MAAMC,0BAA0B,CAACC,YAEpC;QACE/B,cAAc,GAAG;QACjBA,cAAc,UAAU;QACxBA,cAAc,WAAW;QACzBA,cAAc,MAAM;QACpBA,cAAc,aAAa;QAC3BA,cAAc,cAAc;QAC5BA,cAAc,IAAI;QAClBA,cAAc,IAAI;QAClBA,cAAc,WAAW;QACzBA,cAAc,QAAQ;QACtBA,cAAc,OAAO;QACrBA,cAAc,QAAQ;QACtBA,cAAc,OAAO;QACrBA,cAAc,OAAO;QACrBA,cAAc,OAAO;KACtB,CACD,QAAQ,CAAC+B;AAMN,MAAMC,0BAA0B;IACrC,SAAS;IACT,WAAW;AACb;AAEO,MAAMC,sBAAsB,CAACF,YAEhCA,aACA;QAAC;QAAU;QAAkB;QAAiB;QAAQ;QAAQ;QAAe;KAAU,CAAC,QAAQ,CAACA"}
|
|
1
|
+
{"version":3,"file":"pipeline/utils/chatType.js","sources":["webpack://@visactor/vseed/./src/pipeline/utils/chatType.ts"],"sourcesContent":["import type { MeasureEncoding, Measures } from 'src/types'\nimport { type Dimensions, type DimensionGroup, type VSeed, type Measure } from 'src/types'\nimport { isPositionMeasure } from './measures'\nimport { isCommonMeasureEncoding, isMeasureTreeWithParentId } from '../advanced/chart/pipes/measures/utils'\nimport { unique } from 'remeda'\nimport { ChartTypeEnum, DEFAULT_PARENT_ID } from './constant'\n\nexport const isTable = (vseed: VSeed) => {\n return vseed.chartType === ChartTypeEnum.Table\n}\nexport const isPivotTable = (vseed: VSeed) => {\n return vseed.chartType === ChartTypeEnum.PivotTable\n}\nexport const isRadar = (vseed: VSeed) => {\n return vseed.chartType === ChartTypeEnum.Radar\n}\nexport const isAreaPercent = (vseed: VSeed) => {\n return vseed.chartType === ChartTypeEnum.AreaPercent\n}\nexport const isColumnPercent = (vseed: VSeed) => {\n return vseed.chartType === ChartTypeEnum.ColumnPercent\n}\nexport const isBarPercent = (vseed: VSeed) => {\n return vseed.chartType === ChartTypeEnum.BarPercent\n}\n\nexport const isBarLikeChart = (vseed: VSeed) => {\n return (\n vseed.chartType === ChartTypeEnum.Bar ||\n vseed.chartType === ChartTypeEnum.RaceBar ||\n vseed.chartType === ChartTypeEnum.BarPercent ||\n vseed.chartType === ChartTypeEnum.BarParallel\n )\n}\n\nexport const isVTable = (vseed: VSeed) => {\n return ['table', 'pivotTable'].includes(vseed.chartType)\n}\nexport const isVChart = (vseed: VSeed): boolean => {\n return !isVTable(vseed)\n}\n\n/**\n * @description 透视图表或组合图\n * - 透视图表定义: 存在 column 或 row的 encoding\n * - 组合图表定义: 存在多组指标的情况\n * - 透视组合图表: 存在 column 或 row的 encoding 且 存在多组指标的情况\n * 上述三者都只能使用 VTable.PivotChart 绘制\n */\nexport const isPivotChart = (vseed: VSeed) => {\n if (isVTable(vseed)) {\n return false\n }\n\n if (isPivot(vseed)) {\n return true\n }\n\n return isCombination(vseed)\n}\n\n/**\n * @description 存在column 或 row的encoding\n */\nexport const isPivot = (vseed: VSeed) => {\n const { dimensions = [], measures = [] } = vseed as {\n dimensions: Dimensions\n measures: Measures\n }\n\n if (dimensions && dimensions.some((dimension) => dimension.encoding === 'row' || dimension.encoding === 'column')) {\n return true\n }\n\n if (vseed.chartType === ChartTypeEnum.Scatter) {\n const xCount = measures.filter((m: Measure) => m.encoding === 'xAxis').length\n const yCount = measures.filter((m: Measure) => m.encoding === 'yAxis').length\n const otherCount = measures.filter(\n (m: Measure) =>\n !['size', 'xAxis', 'yAxis'].includes(m.encoding as string) &&\n !isCommonMeasureEncoding(m.encoding as MeasureEncoding),\n ).length\n\n /**\n * Scatter \"matrix\" detection logic\n *\n * xCount: number of measures explicitly encoded on the x-axis\n * yCount: number of measures explicitly encoded on the y-axis\n * otherCount: measures that are not size/xAxis/yAxis and are not common encodings\n *\n * When there is at least one explicit x-axis measure (xCount > 0):\n * - All x-encoded measures are counted as X.\n * - Remaining measures (y-encoded + \"other\") are treated as Y variants.\n *\n * When there is no explicit x-axis measure (xCount === 0):\n * - If there is at least one \"other\" measure, we treat exactly one of them as the X measure\n * (so finalXCount = 1), and the remaining \"other\" measures contribute to Y alongside\n * the explicit y-encoded measures.\n * - Since we conceptually \"promote\" one of the other measures to X, only (otherCount - 1)\n * are left to be counted towards Y. Math.max(..., 0) protects against negative values\n * when otherCount is 0.\n */\n let finalXCount: number\n let finalYCount: number\n\n if (xCount > 0) {\n // Explicit x-axis measures exist: X is fixed, Y aggregates y-encoded + other measures.\n finalXCount = xCount\n finalYCount = yCount + otherCount\n } else {\n // No explicit x-axis measure:\n // - If there are \"other\" measures, treat one as X.\n // - Remaining \"other\" measures contribute to Y, together with any y-encoded measures.\n finalXCount = otherCount > 0 ? 1 : 0\n finalYCount = yCount + Math.max(otherCount - 1, 0)\n }\n if (finalXCount > 1 || finalYCount > 1) return true\n }\n\n return false\n}\n\n/**\n * @description 不存在column 或 row的encoding, 但是有多组指标的情况\n */\nexport const isCombination = (vseed: VSeed) => {\n if (isMeasureTreeWithParentId(vseed.measures)) {\n const parentIds = vseed.measures\n ?.filter((m: Measure) => isPositionMeasure(m, vseed.chartType))\n .map((measure: Measure) => measure.parentId || DEFAULT_PARENT_ID)\n return parentIds && unique(parentIds).length > 1\n }\n\n const { measures = [] } = vseed as {\n measures: Measures\n dimensions: Dimensions\n }\n\n const hasMeasureGroup = measures && measures.some((measure: DimensionGroup) => measure && measure.children)\n\n return hasMeasureGroup\n}\n\nexport const isRectungularCoordinate = (chartType: string) => {\n return (\n [\n ChartTypeEnum.Bar,\n ChartTypeEnum.RaceBar,\n ChartTypeEnum.RaceColumn,\n ChartTypeEnum.RaceScatter,\n ChartTypeEnum.BarPercent,\n ChartTypeEnum.BarParallel,\n ChartTypeEnum.Column,\n ChartTypeEnum.ColumnPercent,\n ChartTypeEnum.ColumnParallel,\n ChartTypeEnum.Line,\n ChartTypeEnum.Area,\n ChartTypeEnum.AreaPercent,\n ChartTypeEnum.DualAxis,\n ChartTypeEnum.Boxplot,\n ChartTypeEnum.DualAxis,\n ChartTypeEnum.Scatter,\n ChartTypeEnum.Heatmap,\n ChartTypeEnum.Boxplot,\n ] as string[]\n ).includes(chartType)\n}\n\n/**\n * 默认的双轴图图表类型配置\n */\nexport const DEFAULT_DUAL_CHART_TYPE = {\n primary: 'column',\n secondary: 'line',\n}\n\nexport const isDualAxisChartType = (chartType: string | undefined) => {\n return (\n chartType &&\n ['column', 'columnParallel', 'columnPercent', 'line', 'area', 'areaPercent', 'scatter'].includes(chartType)\n )\n}\n"],"names":["isTable","vseed","ChartTypeEnum","isPivotTable","isRadar","isAreaPercent","isColumnPercent","isBarPercent","isBarLikeChart","isVTable","isVChart","isPivotChart","isPivot","isCombination","dimensions","measures","dimension","xCount","m","yCount","otherCount","isCommonMeasureEncoding","finalXCount","finalYCount","Math","isMeasureTreeWithParentId","parentIds","isPositionMeasure","measure","DEFAULT_PARENT_ID","unique","hasMeasureGroup","isRectungularCoordinate","chartType","DEFAULT_DUAL_CHART_TYPE","isDualAxisChartType"],"mappings":";;;;AAOO,MAAMA,UAAU,CAACC,QACfA,MAAM,SAAS,KAAKC,cAAc,KAAK;AAEzC,MAAMC,eAAe,CAACF,QACpBA,MAAM,SAAS,KAAKC,cAAc,UAAU;AAE9C,MAAME,UAAU,CAACH,QACfA,MAAM,SAAS,KAAKC,cAAc,KAAK;AAEzC,MAAMG,gBAAgB,CAACJ,QACrBA,MAAM,SAAS,KAAKC,cAAc,WAA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 export declare const ChartTypeEnum: {
|
|
|
14
14
|
readonly ColumnPercent: "columnPercent";
|
|
15
15
|
readonly ColumnParallel: "columnParallel";
|
|
16
16
|
readonly Bar: "bar";
|
|
17
|
+
readonly RaceBar: "raceBar";
|
|
18
|
+
readonly RaceColumn: "raceColumn";
|
|
19
|
+
readonly RaceScatter: "raceScatter";
|
|
17
20
|
readonly BarPercent: "barPercent";
|
|
18
21
|
readonly BarParallel: "barParallel";
|
|
19
22
|
readonly Area: "area";
|
|
@@ -14,6 +14,9 @@ const ChartTypeEnum = {
|
|
|
14
14
|
ColumnPercent: 'columnPercent',
|
|
15
15
|
ColumnParallel: 'columnParallel',
|
|
16
16
|
Bar: 'bar',
|
|
17
|
+
RaceBar: 'raceBar',
|
|
18
|
+
RaceColumn: 'raceColumn',
|
|
19
|
+
RaceScatter: 'raceScatter',
|
|
17
20
|
BarPercent: 'barPercent',
|
|
18
21
|
BarParallel: 'barParallel',
|
|
19
22
|
Area: 'area',
|
|
@@ -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 = 12\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// 轴标签间距\nexport const AXIS_LABEL_SPACE = 8\n// 透视轴 band 类型内边距\nexport const BAND_AXIS_INNER_OFFSET_IN_PIVOT = 2\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 Boxplot: 'boxPlot',\n Histogram: 'histogram',\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","AXIS_LABEL_SPACE","BAND_AXIS_INNER_OFFSET_IN_PIVOT","ChartTypeEnum","DATUM_HIDE_KEY"],"mappings":"AACO,MAAMA,qBAAqB;AAE3B,MAAMC,+BAA+B;AAErC,MAAMC,iCAAiC;AAEvC,MAAMC,qCAAqC;AAE3C,MAAMC,0BAA0B;AAEhC,MAAMC,oBAAoB;AAE1B,MAAMC,mBAAmB;AAEzB,MAAMC,kCAAkC;AAGxC,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;IACT,SAAS;IACT,WAAW;AACb;AAGO,MAAMC,iBAAiB"}
|
|
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 = 12\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// 轴标签间距\nexport const AXIS_LABEL_SPACE = 8\n// 透视轴 band 类型内边距\nexport const BAND_AXIS_INNER_OFFSET_IN_PIVOT = 2\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 RaceBar: 'raceBar',\n RaceColumn: 'raceColumn',\n RaceScatter: 'raceScatter',\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 Boxplot: 'boxPlot',\n Histogram: 'histogram',\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","AXIS_LABEL_SPACE","BAND_AXIS_INNER_OFFSET_IN_PIVOT","ChartTypeEnum","DATUM_HIDE_KEY"],"mappings":"AACO,MAAMA,qBAAqB;AAE3B,MAAMC,+BAA+B;AAErC,MAAMC,iCAAiC;AAEvC,MAAMC,qCAAqC;AAE3C,MAAMC,0BAA0B;AAEhC,MAAMC,oBAAoB;AAE1B,MAAMC,mBAAmB;AAEzB,MAAMC,kCAAkC;AAGxC,MAAMC,gBAAgB;IAC3B,OAAO;IACP,YAAY;IAEZ,MAAM;IACN,QAAQ;IACR,eAAe;IACf,gBAAgB;IAChB,KAAK;IACL,SAAS;IACT,YAAY;IACZ,aAAa;IACb,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;IACT,SAAS;IACT,WAAW;AACb;AAGO,MAAMC,iBAAiB"}
|
|
@@ -43,7 +43,6 @@ const darkTheme = ()=>{
|
|
|
43
43
|
xAxis: bandAxis,
|
|
44
44
|
yAxis: linearAxis,
|
|
45
45
|
crosshairLine: crosshairLine,
|
|
46
|
-
player,
|
|
47
46
|
pivotGrid: getDarkPivotChartGridConfig(),
|
|
48
47
|
annotation: getDarkAnnotation()
|
|
49
48
|
},
|
|
@@ -60,7 +59,6 @@ const darkTheme = ()=>{
|
|
|
60
59
|
],
|
|
61
60
|
pivotGrid: getDarkPivotChartGridConfig(),
|
|
62
61
|
annotation: getDarkAnnotation(),
|
|
63
|
-
player,
|
|
64
62
|
regressionLine: getDarkRegressionLine()
|
|
65
63
|
},
|
|
66
64
|
columnParallel: {
|
|
@@ -75,8 +73,7 @@ const darkTheme = ()=>{
|
|
|
75
73
|
0
|
|
76
74
|
],
|
|
77
75
|
pivotGrid: getDarkPivotChartGridConfig(),
|
|
78
|
-
annotation: getDarkAnnotation()
|
|
79
|
-
player
|
|
76
|
+
annotation: getDarkAnnotation()
|
|
80
77
|
},
|
|
81
78
|
columnPercent: {
|
|
82
79
|
...baseConfig,
|
|
@@ -90,8 +87,7 @@ const darkTheme = ()=>{
|
|
|
90
87
|
0
|
|
91
88
|
],
|
|
92
89
|
pivotGrid: getDarkPivotChartGridConfig(),
|
|
93
|
-
annotation: getDarkAnnotation()
|
|
94
|
-
player
|
|
90
|
+
annotation: getDarkAnnotation()
|
|
95
91
|
},
|
|
96
92
|
bar: {
|
|
97
93
|
...baseConfig,
|
|
@@ -105,7 +101,68 @@ const darkTheme = ()=>{
|
|
|
105
101
|
0
|
|
106
102
|
],
|
|
107
103
|
pivotGrid: getDarkPivotChartGridConfig(),
|
|
104
|
+
annotation: getDarkAnnotation()
|
|
105
|
+
},
|
|
106
|
+
raceBar: {
|
|
107
|
+
...baseConfig,
|
|
108
|
+
xAxis: linearAxis,
|
|
109
|
+
yAxis: barBandAxis,
|
|
110
|
+
crosshairRect: crosshairRect,
|
|
111
|
+
stackCornerRadius: [
|
|
112
|
+
0,
|
|
113
|
+
4,
|
|
114
|
+
4,
|
|
115
|
+
0
|
|
116
|
+
],
|
|
117
|
+
pivotGrid: getDarkPivotChartGridConfig(),
|
|
118
|
+
annotation: getDarkAnnotation(),
|
|
119
|
+
player
|
|
120
|
+
},
|
|
121
|
+
raceColumn: {
|
|
122
|
+
...baseConfig,
|
|
123
|
+
xAxis: bandAxis,
|
|
124
|
+
yAxis: linearAxis,
|
|
125
|
+
crosshairRect: crosshairRect,
|
|
126
|
+
stackCornerRadius: [
|
|
127
|
+
4,
|
|
128
|
+
4,
|
|
129
|
+
0,
|
|
130
|
+
0
|
|
131
|
+
],
|
|
132
|
+
pivotGrid: getDarkPivotChartGridConfig(),
|
|
133
|
+
annotation: getDarkAnnotation(),
|
|
134
|
+
player,
|
|
135
|
+
regressionLine: getDarkRegressionLine()
|
|
136
|
+
},
|
|
137
|
+
raceScatter: {
|
|
138
|
+
...baseConfig,
|
|
139
|
+
crosshairLine,
|
|
140
|
+
sizeRange: [
|
|
141
|
+
8,
|
|
142
|
+
24
|
|
143
|
+
],
|
|
144
|
+
xAxis: {
|
|
145
|
+
...linearAxis,
|
|
146
|
+
line: {
|
|
147
|
+
...linearAxis.line,
|
|
148
|
+
visible: true
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
yAxis: {
|
|
152
|
+
...linearAxis,
|
|
153
|
+
line: {
|
|
154
|
+
...linearAxis.line,
|
|
155
|
+
visible: true
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
label: {
|
|
159
|
+
...baseConfig.label,
|
|
160
|
+
showValue: false,
|
|
161
|
+
showValuePercent: false
|
|
162
|
+
},
|
|
163
|
+
pivotGrid: getDarkPivotChartGridConfig(),
|
|
108
164
|
annotation: getDarkAnnotation(),
|
|
165
|
+
regressionLine: getDarkRegressionLine(),
|
|
109
166
|
player
|
|
110
167
|
},
|
|
111
168
|
barParallel: {
|
|
@@ -120,8 +177,7 @@ const darkTheme = ()=>{
|
|
|
120
177
|
0
|
|
121
178
|
],
|
|
122
179
|
pivotGrid: getDarkPivotChartGridConfig(),
|
|
123
|
-
annotation: getDarkAnnotation()
|
|
124
|
-
player
|
|
180
|
+
annotation: getDarkAnnotation()
|
|
125
181
|
},
|
|
126
182
|
barPercent: {
|
|
127
183
|
...baseConfig,
|
|
@@ -135,8 +191,7 @@ const darkTheme = ()=>{
|
|
|
135
191
|
0
|
|
136
192
|
],
|
|
137
193
|
pivotGrid: getDarkPivotChartGridConfig(),
|
|
138
|
-
annotation: getDarkAnnotation()
|
|
139
|
-
player
|
|
194
|
+
annotation: getDarkAnnotation()
|
|
140
195
|
},
|
|
141
196
|
area: {
|
|
142
197
|
...baseConfig,
|
|
@@ -144,8 +199,7 @@ const darkTheme = ()=>{
|
|
|
144
199
|
yAxis: linearAxis,
|
|
145
200
|
crosshairLine: crosshairLine,
|
|
146
201
|
pivotGrid: getDarkPivotChartGridConfig(),
|
|
147
|
-
annotation: getDarkAnnotation()
|
|
148
|
-
player
|
|
202
|
+
annotation: getDarkAnnotation()
|
|
149
203
|
},
|
|
150
204
|
areaPercent: {
|
|
151
205
|
...baseConfig,
|
|
@@ -153,8 +207,7 @@ const darkTheme = ()=>{
|
|
|
153
207
|
yAxis: linearAxis,
|
|
154
208
|
crosshairLine: crosshairLine,
|
|
155
209
|
pivotGrid: getDarkPivotChartGridConfig(),
|
|
156
|
-
annotation: getDarkAnnotation()
|
|
157
|
-
player
|
|
210
|
+
annotation: getDarkAnnotation()
|
|
158
211
|
},
|
|
159
212
|
scatter: {
|
|
160
213
|
...baseConfig,
|
|
@@ -184,8 +237,7 @@ const darkTheme = ()=>{
|
|
|
184
237
|
},
|
|
185
238
|
pivotGrid: getDarkPivotChartGridConfig(),
|
|
186
239
|
annotation: getDarkAnnotation(),
|
|
187
|
-
regressionLine: getDarkRegressionLine()
|
|
188
|
-
player
|
|
240
|
+
regressionLine: getDarkRegressionLine()
|
|
189
241
|
},
|
|
190
242
|
dualAxis: {
|
|
191
243
|
...baseConfig,
|
|
@@ -209,8 +261,7 @@ const darkTheme = ()=>{
|
|
|
209
261
|
labelLayout: 'arc',
|
|
210
262
|
showDimension: true
|
|
211
263
|
},
|
|
212
|
-
pivotGrid: getDarkPivotChartGridConfig()
|
|
213
|
-
player
|
|
264
|
+
pivotGrid: getDarkPivotChartGridConfig()
|
|
214
265
|
},
|
|
215
266
|
donut: {
|
|
216
267
|
...baseConfig,
|
|
@@ -220,13 +271,11 @@ const darkTheme = ()=>{
|
|
|
220
271
|
labelLayout: 'arc',
|
|
221
272
|
showDimension: true
|
|
222
273
|
},
|
|
223
|
-
pivotGrid: getDarkPivotChartGridConfig()
|
|
224
|
-
player
|
|
274
|
+
pivotGrid: getDarkPivotChartGridConfig()
|
|
225
275
|
},
|
|
226
276
|
radar: {
|
|
227
277
|
...baseConfig,
|
|
228
|
-
pivotGrid: getDarkPivotChartGridConfig()
|
|
229
|
-
player
|
|
278
|
+
pivotGrid: getDarkPivotChartGridConfig()
|
|
230
279
|
},
|
|
231
280
|
rose: {
|
|
232
281
|
...baseConfig,
|
|
@@ -235,8 +284,7 @@ const darkTheme = ()=>{
|
|
|
235
284
|
showValuePercent: true,
|
|
236
285
|
showDimension: true
|
|
237
286
|
},
|
|
238
|
-
pivotGrid: getDarkPivotChartGridConfig()
|
|
239
|
-
player
|
|
287
|
+
pivotGrid: getDarkPivotChartGridConfig()
|
|
240
288
|
},
|
|
241
289
|
roseParallel: {
|
|
242
290
|
...baseConfig,
|
|
@@ -245,15 +293,13 @@ const darkTheme = ()=>{
|
|
|
245
293
|
showValuePercent: true,
|
|
246
294
|
showDimension: true
|
|
247
295
|
},
|
|
248
|
-
pivotGrid: getDarkPivotChartGridConfig()
|
|
249
|
-
player
|
|
296
|
+
pivotGrid: getDarkPivotChartGridConfig()
|
|
250
297
|
},
|
|
251
298
|
funnel: {
|
|
252
299
|
...baseConfig,
|
|
253
300
|
label: getFunnelDarkLabel(),
|
|
254
301
|
transform: getDarkFunnelTransformTheme(),
|
|
255
|
-
pivotGrid: getDarkPivotChartGridConfig()
|
|
256
|
-
player
|
|
302
|
+
pivotGrid: getDarkPivotChartGridConfig()
|
|
257
303
|
},
|
|
258
304
|
heatmap: {
|
|
259
305
|
...baseConfig,
|
|
@@ -264,7 +310,6 @@ const darkTheme = ()=>{
|
|
|
264
310
|
...baseConfig.label,
|
|
265
311
|
labelColorSmartInvert: true
|
|
266
312
|
},
|
|
267
|
-
player,
|
|
268
313
|
cell: getDarkHeatmapCellTheme(),
|
|
269
314
|
pivotGrid: getDarkPivotChartGridConfig()
|
|
270
315
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme/dark/dark.js","sources":["webpack://@visactor/vseed/./src/theme/dark/dark.ts"],"sourcesContent":["import type { CustomThemeConfig, Player, YBandAxis } from 'src/types'\nimport {\n getDarkColor,\n getDarkCrosshairLine,\n getDarkCrosshairRect,\n getDarkBrushConfig,\n getDarkTableConfig,\n getDarkPivotChartGridConfig,\n getDarkLabel,\n getDarkLegend,\n getDarkColorLegend,\n getFunnelDarkLabel,\n getDarkPlayer,\n} from '../common'\nimport { getDarkTooltip } from '../common/tooltip'\nimport { getDarkBandAxis, getDarkLinearAxis } from '../common/axes'\nimport { getDarkAnnotation } from '../common/annotaion'\nimport { getDarkFunnelTransformTheme } from '../common/funnelTransform'\nimport { getDarkHeatmapCellTheme } from '../common/heatmapCell'\nimport { getDarkRegressionLine } from '../common/regressionLine'\nimport { getDarkBoxPlotStyle, getDarkOutlierStyle } from '../common/boxPlot'\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: getDarkLabel(),\n legend: getDarkLegend(),\n tooltip: getDarkTooltip(),\n brush: getDarkBrushConfig(),\n }\n const player = getDarkPlayer() as Player\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 player,\n\n pivotGrid: getDarkPivotChartGridConfig(),\n annotation: getDarkAnnotation(),\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 annotation: getDarkAnnotation(),\n player,\n\n regressionLine: getDarkRegressionLine(),\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 annotation: getDarkAnnotation(),\n player,\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 annotation: getDarkAnnotation(),\n player,\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 annotation: getDarkAnnotation(),\n player,\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 annotation: getDarkAnnotation(),\n player,\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 annotation: getDarkAnnotation(),\n player,\n },\n area: {\n ...baseConfig,\n\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairLine: crosshairLine,\n pivotGrid: getDarkPivotChartGridConfig(),\n annotation: getDarkAnnotation(),\n player,\n },\n areaPercent: {\n ...baseConfig,\n\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairLine: crosshairLine,\n pivotGrid: getDarkPivotChartGridConfig(),\n annotation: getDarkAnnotation(),\n player,\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 annotation: getDarkAnnotation(),\n regressionLine: getDarkRegressionLine(),\n player,\n },\n dualAxis: {\n ...baseConfig,\n xAxis: bandAxis,\n primaryYAxis: linearAxis,\n secondaryYAxis: { ...linearAxis, grid: { visible: false } },\n crosshairRect,\n pivotGrid: getDarkPivotChartGridConfig(),\n annotation: getDarkAnnotation(),\n },\n // polar\n pie: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n labelLayout: 'arc',\n showDimension: true,\n },\n pivotGrid: getDarkPivotChartGridConfig(),\n player,\n },\n donut: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n labelLayout: 'arc',\n showDimension: true,\n },\n pivotGrid: getDarkPivotChartGridConfig(),\n player,\n },\n radar: {\n ...baseConfig,\n pivotGrid: getDarkPivotChartGridConfig(),\n player,\n },\n rose: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n showDimension: true,\n },\n pivotGrid: getDarkPivotChartGridConfig(),\n player,\n },\n roseParallel: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n showDimension: true,\n },\n\n pivotGrid: getDarkPivotChartGridConfig(),\n player,\n },\n // other\n funnel: {\n ...baseConfig,\n label: getFunnelDarkLabel(),\n transform: getDarkFunnelTransformTheme(),\n\n pivotGrid: getDarkPivotChartGridConfig(),\n player,\n },\n heatmap: {\n ...baseConfig,\n legend: getDarkColorLegend(),\n xAxis: bandAxis,\n yAxis: bandAxis,\n label: {\n ...baseConfig.label,\n labelColorSmartInvert: true,\n },\n player,\n\n cell: getDarkHeatmapCellTheme(),\n pivotGrid: getDarkPivotChartGridConfig(),\n },\n histogram: {\n ...baseConfig,\n\n xAxis: linearAxis,\n yAxis: linearAxis,\n crosshairRect: crosshairRect,\n pivotGrid: getDarkPivotChartGridConfig(),\n annotation: getDarkAnnotation(),\n regressionLine: getDarkRegressionLine(),\n },\n boxPlot: {\n ...baseConfig,\n\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairRect: crosshairRect,\n pivotGrid: getDarkPivotChartGridConfig(),\n annotation: getDarkAnnotation(),\n\n boxPlotStyle: getDarkBoxPlotStyle(),\n outlierStyle: getDarkOutlierStyle(),\n },\n },\n }\n}\n"],"names":["darkTheme","linearAxis","getDarkLinearAxis","bandAxis","getDarkBandAxis","barBandAxis","undefined","crosshairLine","getDarkCrosshairLine","crosshairRect","getDarkCrosshairRect","baseConfig","getDarkColor","getDarkLabel","getDarkLegend","getDarkTooltip","getDarkBrushConfig","player","getDarkPlayer","tableConfig","getDarkTableConfig","getDarkPivotChartGridConfig","getDarkAnnotation","getDarkRegressionLine","getFunnelDarkLabel","getDarkFunnelTransformTheme","getDarkColorLegend","getDarkHeatmapCellTheme","getDarkBoxPlotStyle","getDarkOutlierStyle"],"mappings":";;;;;;;;AAsBO,MAAMA,YAAY;IACvB,MAAMC,aAAaC;IACnB,MAAMC,WAAWC;IACjB,MAAMC,cAAyB;QAC7B,GAAGF,QAAQ;QACX,eAAe;QACf,kBAAkB;QAClB,gBAAgB;QAChB,sBAAsBG;QACtB,iBAAiB;QACjB,2BAA2B;YAAC;YAAG;YAAK;SAAI;IAC1C;IACA,MAAMC,gBAAgBC;IACtB,MAAMC,gBAAgBC;IAEtB,MAAMC,aAAa;QACjB,iBAAiB;QACjB,OAAOC;QACP,OAAOC;QACP,QAAQC;QACR,SAASC;QACT,OAAOC;IACT;IACA,MAAMC,SAASC;IAEf,MAAMC,cAAcC;IAEpB,OAAO;QACL,QAAQ;YACN,OAAOD;YACP,YAAYA;YAGZ,MAAM;gBACJ,GAAGR,UAAU;gBACb,OAAOR;gBACP,OAAOF;gBACP,eAAeM;gBACfU;gBAEA,WAAWI;gBACX,YAAYC;YACd;YACA,QAAQ;gBACN,GAAGX,UAAU;gBAEb,OAAOR;gBACP,OAAOF;gBACP,eAAeQ;gBACf,mBAAmB;oBAAC;oBAAG;oBAAG;oBAAG;iBAAE;gBAC/B,WAAWY;gBACX,YAAYC;gBACZL;gBAEA,gBAAgBM;YAClB;YACA,gBAAgB;gBACd,GAAGZ,UAAU;gBAEb,OAAOR;gBACP,O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,OAAOA;gBACP,eAAeQ;gBACf,WAAWY;gBACX,YAAYC;gBACZ,gBAAgBC;YAClB;YACA,SAAS;gBACP,GAAGZ,UAAU;gBAEb,OAAOR;gBACP,OAAOF;gBACP,eAAeQ;gBACf,WAAWY;gBACX,YAAYC;gBAEZ,cAAcM;gBACd,cAAcC;YAChB;QACF;IACF;AACF"}
|
|
1
|
+
{"version":3,"file":"theme/dark/dark.js","sources":["webpack://@visactor/vseed/./src/theme/dark/dark.ts"],"sourcesContent":["import type { CustomThemeConfig, Player, YBandAxis } from 'src/types'\nimport {\n getDarkColor,\n getDarkCrosshairLine,\n getDarkCrosshairRect,\n getDarkBrushConfig,\n getDarkTableConfig,\n getDarkPivotChartGridConfig,\n getDarkLabel,\n getDarkLegend,\n getDarkColorLegend,\n getFunnelDarkLabel,\n getDarkPlayer,\n} from '../common'\nimport { getDarkTooltip } from '../common/tooltip'\nimport { getDarkBandAxis, getDarkLinearAxis } from '../common/axes'\nimport { getDarkAnnotation } from '../common/annotaion'\nimport { getDarkFunnelTransformTheme } from '../common/funnelTransform'\nimport { getDarkHeatmapCellTheme } from '../common/heatmapCell'\nimport { getDarkRegressionLine } from '../common/regressionLine'\nimport { getDarkBoxPlotStyle, getDarkOutlierStyle } from '../common/boxPlot'\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: getDarkLabel(),\n legend: getDarkLegend(),\n tooltip: getDarkTooltip(),\n brush: getDarkBrushConfig(),\n }\n const player = getDarkPlayer() as Player\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 pivotGrid: getDarkPivotChartGridConfig(),\n annotation: getDarkAnnotation(),\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 annotation: getDarkAnnotation(),\n\n regressionLine: getDarkRegressionLine(),\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 annotation: getDarkAnnotation(),\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 annotation: getDarkAnnotation(),\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 annotation: getDarkAnnotation(),\n },\n raceBar: {\n ...baseConfig,\n\n xAxis: linearAxis,\n yAxis: barBandAxis,\n crosshairRect: crosshairRect,\n stackCornerRadius: [0, 4, 4, 0],\n pivotGrid: getDarkPivotChartGridConfig(),\n annotation: getDarkAnnotation(),\n player,\n },\n raceColumn: {\n ...baseConfig,\n\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairRect: crosshairRect,\n stackCornerRadius: [4, 4, 0, 0],\n pivotGrid: getDarkPivotChartGridConfig(),\n annotation: getDarkAnnotation(),\n player,\n\n regressionLine: getDarkRegressionLine(),\n },\n raceScatter: {\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 annotation: getDarkAnnotation(),\n regressionLine: getDarkRegressionLine(),\n player,\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 annotation: getDarkAnnotation(),\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 annotation: getDarkAnnotation(),\n },\n area: {\n ...baseConfig,\n\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairLine: crosshairLine,\n pivotGrid: getDarkPivotChartGridConfig(),\n annotation: getDarkAnnotation(),\n },\n areaPercent: {\n ...baseConfig,\n\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairLine: crosshairLine,\n pivotGrid: getDarkPivotChartGridConfig(),\n annotation: getDarkAnnotation(),\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 annotation: getDarkAnnotation(),\n regressionLine: getDarkRegressionLine(),\n },\n dualAxis: {\n ...baseConfig,\n xAxis: bandAxis,\n primaryYAxis: linearAxis,\n secondaryYAxis: { ...linearAxis, grid: { visible: false } },\n crosshairRect,\n pivotGrid: getDarkPivotChartGridConfig(),\n annotation: getDarkAnnotation(),\n },\n // polar\n pie: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n labelLayout: 'arc',\n showDimension: true,\n },\n pivotGrid: getDarkPivotChartGridConfig(),\n },\n donut: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n labelLayout: 'arc',\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 label: getFunnelDarkLabel(),\n transform: getDarkFunnelTransformTheme(),\n\n pivotGrid: getDarkPivotChartGridConfig(),\n },\n heatmap: {\n ...baseConfig,\n legend: getDarkColorLegend(),\n xAxis: bandAxis,\n yAxis: bandAxis,\n label: {\n ...baseConfig.label,\n labelColorSmartInvert: true,\n },\n\n cell: getDarkHeatmapCellTheme(),\n pivotGrid: getDarkPivotChartGridConfig(),\n },\n histogram: {\n ...baseConfig,\n\n xAxis: linearAxis,\n yAxis: linearAxis,\n crosshairRect: crosshairRect,\n pivotGrid: getDarkPivotChartGridConfig(),\n annotation: getDarkAnnotation(),\n regressionLine: getDarkRegressionLine(),\n },\n boxPlot: {\n ...baseConfig,\n\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairRect: crosshairRect,\n pivotGrid: getDarkPivotChartGridConfig(),\n annotation: getDarkAnnotation(),\n\n boxPlotStyle: getDarkBoxPlotStyle(),\n outlierStyle: getDarkOutlierStyle(),\n },\n },\n }\n}\n"],"names":["darkTheme","linearAxis","getDarkLinearAxis","bandAxis","getDarkBandAxis","barBandAxis","undefined","crosshairLine","getDarkCrosshairLine","crosshairRect","getDarkCrosshairRect","baseConfig","getDarkColor","getDarkLabel","getDarkLegend","getDarkTooltip","getDarkBrushConfig","player","getDarkPlayer","tableConfig","getDarkTableConfig","getDarkPivotChartGridConfig","getDarkAnnotation","getDarkRegressionLine","getFunnelDarkLabel","getDarkFunnelTransformTheme","getDarkColorLegend","getDarkHeatmapCellTheme","getDarkBoxPlotStyle","getDarkOutlierStyle"],"mappings":";;;;;;;;AAsBO,MAAMA,YAAY;IACvB,MAAMC,aAAaC;IACnB,MAAMC,WAAWC;IACjB,MAAMC,cAAyB;QAC7B,GAAGF,QAAQ;QACX,eAAe;QACf,kBAAkB;QAClB,gBAAgB;QAChB,sBAAsBG;QACtB,iBAAiB;QACjB,2BAA2B;YAAC;YAAG;YAAK;SAAI;IAC1C;IACA,MAAMC,gBAAgBC;IACtB,MAAMC,gBAAgBC;IAEtB,MAAMC,aAAa;QACjB,iBAAiB;QACjB,OAAOC;QACP,OAAOC;QACP,QAAQC;QACR,SAASC;QACT,OAAOC;IACT;IACA,MAAMC,SAASC;IAEf,MAAMC,cAAcC;IAEpB,OAAO;QACL,QAAQ;YACN,OAAOD;YACP,YAAYA;YAGZ,MAAM;gBACJ,GAAGR,UAAU;gBACb,OAAOR;gBACP,OAAOF;gBACP,eAAeM;gBAEf,WAAWc;gBACX,YAAYC;YACd;YACA,QAAQ;gBACN,GAAGX,UAAU;gBAEb,OAAOR;gBACP,OAAOF;gBACP,eAAeQ;gBACf,mBAAmB;oBAAC;oBAAG;oBAAG;oBAAG;iBAAE;gBAC/B,WAAWY;gBACX,YAAYC;gBAEZ,gBAAgBC;YAClB;YACA,gBAAgB;gBACd,GAAGZ,UAAU;gBAEb,OAAOR;gBACP,OAAOF;gBACP,eAAeQ;gBACf,mBAAmB;oBAAC;oBAAG;oBAAG;oBAAG;iBAAE;gBAC/B,WAAWY;gBACX,YAAYC;YACd;YACA,eAAe;gBACb,GAAGX,UAAU;gBAEb,O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W,KAAK;oBACnB,kBAAkB;oBAClB,eAAe;gBACjB;gBACA,WAAWU;YACb;YACA,cAAc;gBACZ,GAAGV,UAAU;gBACb,OAAO;oBACL,GAAGA,WAAW,KAAK;oBACnB,kBAAkB;oBAClB,eAAe;gBACjB;gBAEA,WAAWU;YACb;YAEA,QAAQ;gBACN,GAAGV,UAAU;gBACb,OAAOa;gBACP,WAAWC;gBAEX,WAAWJ;YACb;YACA,SAAS;gBACP,GAAGV,UAAU;gBACb,QAAQe;gBACR,OAAOvB;gBACP,OAAOA;gBACP,OAAO;oBACL,GAAGQ,WAAW,KAAK;oBACnB,uBAAuB;gBACzB;gBAEA,MAAMgB;gBACN,WAAWN;YACb;YACA,WAAW;gBACT,GAAGV,UAAU;gBAEb,OAAOV;gBACP,OAAOA;gBACP,eAAeQ;gBACf,WAAWY;gBACX,YAAYC;gBACZ,gBAAgBC;YAClB;YACA,SAAS;gBACP,GAAGZ,UAAU;gBAEb,OAAOR;gBACP,OAAOF;gBACP,eAAeQ;gBACf,WAAWY;gBACX,YAAYC;gBAEZ,cAAcM;gBACd,cAAcC;YAChB;QACF;IACF;AACF"}
|
|
@@ -43,7 +43,6 @@ const lightTheme = ()=>{
|
|
|
43
43
|
xAxis: bandAxis,
|
|
44
44
|
yAxis: linearAxis,
|
|
45
45
|
crosshairLine,
|
|
46
|
-
player,
|
|
47
46
|
pivotGrid: getLightPivotChartGridConfig(),
|
|
48
47
|
annotation: getLightAnnotation()
|
|
49
48
|
},
|
|
@@ -52,7 +51,6 @@ const lightTheme = ()=>{
|
|
|
52
51
|
xAxis: bandAxis,
|
|
53
52
|
yAxis: linearAxis,
|
|
54
53
|
crosshairRect,
|
|
55
|
-
player,
|
|
56
54
|
stackCornerRadius: [
|
|
57
55
|
4,
|
|
58
56
|
4,
|
|
@@ -68,7 +66,6 @@ const lightTheme = ()=>{
|
|
|
68
66
|
xAxis: bandAxis,
|
|
69
67
|
yAxis: linearAxis,
|
|
70
68
|
crosshairRect,
|
|
71
|
-
player,
|
|
72
69
|
stackCornerRadius: [
|
|
73
70
|
4,
|
|
74
71
|
4,
|
|
@@ -84,7 +81,6 @@ const lightTheme = ()=>{
|
|
|
84
81
|
yAxis: {
|
|
85
82
|
...linearAxis
|
|
86
83
|
},
|
|
87
|
-
player,
|
|
88
84
|
crosshairRect,
|
|
89
85
|
stackCornerRadius: [
|
|
90
86
|
4,
|
|
@@ -96,6 +92,20 @@ const lightTheme = ()=>{
|
|
|
96
92
|
annotation: getLightAnnotation()
|
|
97
93
|
},
|
|
98
94
|
bar: {
|
|
95
|
+
...baseConfig,
|
|
96
|
+
xAxis: linearAxis,
|
|
97
|
+
yAxis: barBandAxis,
|
|
98
|
+
crosshairRect,
|
|
99
|
+
stackCornerRadius: [
|
|
100
|
+
0,
|
|
101
|
+
4,
|
|
102
|
+
4,
|
|
103
|
+
0
|
|
104
|
+
],
|
|
105
|
+
pivotGrid: getLightPivotChartGridConfig(),
|
|
106
|
+
annotation: getLightAnnotation()
|
|
107
|
+
},
|
|
108
|
+
raceBar: {
|
|
99
109
|
...baseConfig,
|
|
100
110
|
xAxis: linearAxis,
|
|
101
111
|
yAxis: barBandAxis,
|
|
@@ -110,6 +120,53 @@ const lightTheme = ()=>{
|
|
|
110
120
|
pivotGrid: getLightPivotChartGridConfig(),
|
|
111
121
|
annotation: getLightAnnotation()
|
|
112
122
|
},
|
|
123
|
+
raceColumn: {
|
|
124
|
+
...baseConfig,
|
|
125
|
+
xAxis: bandAxis,
|
|
126
|
+
yAxis: linearAxis,
|
|
127
|
+
crosshairRect,
|
|
128
|
+
player,
|
|
129
|
+
stackCornerRadius: [
|
|
130
|
+
4,
|
|
131
|
+
4,
|
|
132
|
+
0,
|
|
133
|
+
0
|
|
134
|
+
],
|
|
135
|
+
pivotGrid: getLightPivotChartGridConfig(),
|
|
136
|
+
annotation: getLightAnnotation(),
|
|
137
|
+
regressionLine: getLightRegressionLine()
|
|
138
|
+
},
|
|
139
|
+
raceScatter: {
|
|
140
|
+
...baseConfig,
|
|
141
|
+
crosshairLine,
|
|
142
|
+
sizeRange: [
|
|
143
|
+
8,
|
|
144
|
+
24
|
|
145
|
+
],
|
|
146
|
+
xAxis: {
|
|
147
|
+
...linearAxis,
|
|
148
|
+
line: {
|
|
149
|
+
...linearAxis.line,
|
|
150
|
+
visible: true
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
yAxis: {
|
|
154
|
+
...linearAxis,
|
|
155
|
+
line: {
|
|
156
|
+
...linearAxis.line,
|
|
157
|
+
visible: true
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
label: {
|
|
161
|
+
...baseConfig.label,
|
|
162
|
+
showValue: false,
|
|
163
|
+
showValuePercent: false
|
|
164
|
+
},
|
|
165
|
+
player,
|
|
166
|
+
pivotGrid: getLightPivotChartGridConfig(),
|
|
167
|
+
annotation: getLightAnnotation(),
|
|
168
|
+
regressionLine: getLightRegressionLine()
|
|
169
|
+
},
|
|
113
170
|
barParallel: {
|
|
114
171
|
...baseConfig,
|
|
115
172
|
xAxis: linearAxis,
|
|
@@ -131,7 +188,6 @@ const lightTheme = ()=>{
|
|
|
131
188
|
},
|
|
132
189
|
yAxis: barBandAxis,
|
|
133
190
|
crosshairRect,
|
|
134
|
-
player,
|
|
135
191
|
stackCornerRadius: [
|
|
136
192
|
0,
|
|
137
193
|
4,
|
|
@@ -146,7 +202,6 @@ const lightTheme = ()=>{
|
|
|
146
202
|
xAxis: bandAxis,
|
|
147
203
|
yAxis: linearAxis,
|
|
148
204
|
crosshairLine,
|
|
149
|
-
player,
|
|
150
205
|
pivotGrid: getLightPivotChartGridConfig(),
|
|
151
206
|
annotation: getLightAnnotation()
|
|
152
207
|
},
|
|
@@ -156,7 +211,6 @@ const lightTheme = ()=>{
|
|
|
156
211
|
yAxis: {
|
|
157
212
|
...linearAxis
|
|
158
213
|
},
|
|
159
|
-
player,
|
|
160
214
|
crosshairLine,
|
|
161
215
|
pivotGrid: getLightPivotChartGridConfig(),
|
|
162
216
|
annotation: getLightAnnotation()
|
|
@@ -187,7 +241,6 @@ const lightTheme = ()=>{
|
|
|
187
241
|
showValue: false,
|
|
188
242
|
showValuePercent: false
|
|
189
243
|
},
|
|
190
|
-
player,
|
|
191
244
|
pivotGrid: getLightPivotChartGridConfig(),
|
|
192
245
|
annotation: getLightAnnotation(),
|
|
193
246
|
regressionLine: getLightRegressionLine()
|
|
@@ -214,7 +267,6 @@ const lightTheme = ()=>{
|
|
|
214
267
|
labelLayout: 'arc',
|
|
215
268
|
showDimension: true
|
|
216
269
|
},
|
|
217
|
-
player,
|
|
218
270
|
pivotGrid: getLightPivotChartGridConfig()
|
|
219
271
|
},
|
|
220
272
|
donut: {
|
|
@@ -225,12 +277,10 @@ const lightTheme = ()=>{
|
|
|
225
277
|
labelLayout: 'arc',
|
|
226
278
|
showDimension: true
|
|
227
279
|
},
|
|
228
|
-
player,
|
|
229
280
|
pivotGrid: getLightPivotChartGridConfig()
|
|
230
281
|
},
|
|
231
282
|
radar: {
|
|
232
283
|
...baseConfig,
|
|
233
|
-
player,
|
|
234
284
|
pivotGrid: getLightPivotChartGridConfig()
|
|
235
285
|
},
|
|
236
286
|
rose: {
|
|
@@ -240,7 +290,6 @@ const lightTheme = ()=>{
|
|
|
240
290
|
showValuePercent: true,
|
|
241
291
|
showDimension: true
|
|
242
292
|
},
|
|
243
|
-
player,
|
|
244
293
|
pivotGrid: getLightPivotChartGridConfig()
|
|
245
294
|
},
|
|
246
295
|
roseParallel: {
|
|
@@ -250,14 +299,12 @@ const lightTheme = ()=>{
|
|
|
250
299
|
showValuePercent: true,
|
|
251
300
|
showDimension: true
|
|
252
301
|
},
|
|
253
|
-
player,
|
|
254
302
|
pivotGrid: getLightPivotChartGridConfig()
|
|
255
303
|
},
|
|
256
304
|
funnel: {
|
|
257
305
|
...baseConfig,
|
|
258
306
|
label: getFunnelLightLabel(),
|
|
259
307
|
transform: getLightFunnelTransformTheme(),
|
|
260
|
-
player,
|
|
261
308
|
pivotGrid: getLightPivotChartGridConfig()
|
|
262
309
|
},
|
|
263
310
|
heatmap: {
|
|
@@ -269,7 +316,6 @@ const lightTheme = ()=>{
|
|
|
269
316
|
...baseConfig.label,
|
|
270
317
|
labelColorSmartInvert: true
|
|
271
318
|
},
|
|
272
|
-
player,
|
|
273
319
|
cell: getLightHeatmapCellTheme(),
|
|
274
320
|
pivotGrid: getLightPivotChartGridConfig()
|
|
275
321
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme/light/light.js","sources":["webpack://@visactor/vseed/./src/theme/light/light.ts"],"sourcesContent":["import type { CustomThemeConfig, Player, YBandAxis } from 'src/types'\nimport {\n getFunnelLightLabel,\n getLightColor,\n getLightColorLegend,\n getLightCrosshairLine,\n getLightCrosshairRect,\n getLightBrushConfig,\n getLightLabel,\n getLightLegend,\n getLightPivotChartGridConfig,\n getLightTableConfig,\n getLightPlayer,\n} from '../common'\nimport { getLightTooltip } from '../common/tooltip'\nimport { getLightBandAxis, getLightLinearAxis } from '../common/axes'\nimport { getLightAnnotation } from '../common/annotaion'\nimport { getLightFunnelTransformTheme } from '../common/funnelTransform'\nimport { getLightHeatmapCellTheme } from '../common/heatmapCell'\nimport { getLightRegressionLine } from '../common/regressionLine'\nimport { getLightBoxPlotStyle, getLightOutlierStyle } from '../common/boxPlot'\n\nexport const lightTheme = (): CustomThemeConfig => {\n const linearAxis = getLightLinearAxis()\n const bandAxis: YBandAxis = getLightBandAxis()\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\n const crosshairLine = getLightCrosshairLine()\n const crosshairRect = getLightCrosshairRect()\n\n const baseConfig = {\n backgroundColor: 'transparent',\n color: getLightColor(),\n label: getLightLabel(),\n legend: getLightLegend(),\n tooltip: getLightTooltip(),\n brush: getLightBrushConfig(),\n }\n const tableConfig = getLightTableConfig()\n const player = getLightPlayer() as Player\n\n return {\n config: {\n // table\n table: tableConfig,\n pivotTable: tableConfig,\n // cartesian\n line: {\n ...baseConfig,\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairLine,\n player,\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\n },\n column: {\n ...baseConfig,\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairRect,\n player,\n\n stackCornerRadius: [4, 4, 0, 0],\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\n\n regressionLine: getLightRegressionLine(),\n },\n columnParallel: {\n ...baseConfig,\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairRect,\n player,\n\n stackCornerRadius: [4, 4, 0, 0],\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\n },\n columnPercent: {\n ...baseConfig,\n xAxis: bandAxis,\n yAxis: {\n ...linearAxis,\n },\n player,\n\n crosshairRect,\n stackCornerRadius: [4, 4, 0, 0],\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\n },\n bar: {\n ...baseConfig,\n xAxis: linearAxis,\n yAxis: barBandAxis,\n crosshairRect,\n player,\n\n stackCornerRadius: [0, 4, 4, 0],\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\n },\n barParallel: {\n ...baseConfig,\n xAxis: linearAxis,\n yAxis: barBandAxis,\n crosshairRect,\n stackCornerRadius: [0, 4, 4, 0],\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\n },\n barPercent: {\n ...baseConfig,\n xAxis: {\n ...linearAxis,\n },\n yAxis: barBandAxis,\n crosshairRect,\n player,\n\n stackCornerRadius: [0, 4, 4, 0],\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\n },\n area: {\n ...baseConfig,\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairLine,\n player,\n\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\n },\n areaPercent: {\n ...baseConfig,\n xAxis: bandAxis,\n yAxis: {\n ...linearAxis,\n },\n player,\n\n crosshairLine,\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\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 player,\n\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\n\n regressionLine: getLightRegressionLine(),\n },\n dualAxis: {\n ...baseConfig,\n xAxis: bandAxis,\n primaryYAxis: linearAxis,\n secondaryYAxis: { ...linearAxis, grid: { visible: false } },\n crosshairRect,\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\n },\n // polar\n pie: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n labelLayout: 'arc',\n showDimension: true,\n },\n player,\n\n pivotGrid: getLightPivotChartGridConfig(),\n },\n donut: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n labelLayout: 'arc',\n showDimension: true,\n },\n player,\n\n pivotGrid: getLightPivotChartGridConfig(),\n },\n radar: {\n ...baseConfig,\n player,\n\n pivotGrid: getLightPivotChartGridConfig(),\n },\n rose: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n showDimension: true,\n },\n player,\n\n pivotGrid: getLightPivotChartGridConfig(),\n },\n roseParallel: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n showDimension: true,\n },\n player,\n\n pivotGrid: getLightPivotChartGridConfig(),\n },\n // other\n funnel: {\n ...baseConfig,\n label: getFunnelLightLabel(),\n transform: getLightFunnelTransformTheme(),\n player,\n\n pivotGrid: getLightPivotChartGridConfig(),\n },\n heatmap: {\n ...baseConfig,\n legend: getLightColorLegend(),\n xAxis: bandAxis,\n yAxis: bandAxis,\n label: {\n ...baseConfig.label,\n labelColorSmartInvert: true,\n },\n player,\n\n cell: getLightHeatmapCellTheme(),\n pivotGrid: getLightPivotChartGridConfig(),\n },\n histogram: {\n ...baseConfig,\n xAxis: linearAxis,\n yAxis: linearAxis,\n crosshairRect,\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\n regressionLine: getLightRegressionLine(),\n },\n boxPlot: {\n ...baseConfig,\n xAxis: linearAxis,\n yAxis: linearAxis,\n crosshairRect,\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\n\n boxPlotStyle: getLightBoxPlotStyle(),\n outlierStyle: getLightOutlierStyle(),\n },\n },\n }\n}\n"],"names":["lightTheme","linearAxis","getLightLinearAxis","bandAxis","getLightBandAxis","barBandAxis","undefined","crosshairLine","getLightCrosshairLine","crosshairRect","getLightCrosshairRect","baseConfig","getLightColor","getLightLabel","getLightLegend","getLightTooltip","getLightBrushConfig","tableConfig","getLightTableConfig","player","getLightPlayer","getLightPivotChartGridConfig","getLightAnnotation","getLightRegressionLine","getFunnelLightLabel","getLightFunnelTransformTheme","getLightColorLegend","getLightHeatmapCellTheme","getLightBoxPlotStyle","getLightOutlierStyle"],"mappings":";;;;;;;;AAsBO,MAAMA,aAAa;IACxB,MAAMC,aAAaC;IACnB,MAAMC,WAAsBC;IAC5B,MAAMC,cAAyB;QAC7B,GAAGF,QAAQ;QACX,eAAe;QACf,kBAAkB;QAClB,gBAAgB;QAChB,sBAAsBG;QACtB,iBAAiB;QACjB,2BAA2B;YAAC;YAAG;YAAK;SAAI;IAC1C;IAEA,MAAMC,gBAAgBC;IACtB,MAAMC,gBAAgBC;IAEtB,MAAMC,aAAa;QACjB,iBAAiB;QACjB,OAAOC;QACP,OAAOC;QACP,QAAQC;QACR,SAASC;QACT,OAAOC;IACT;IACA,M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,WAAWE;YACb;YACA,cAAc;gBACZ,GAAGV,UAAU;gBACb,OAAO;oBACL,GAAGA,WAAW,KAAK;oBACnB,kBAAkB;oBAClB,eAAe;gBACjB;gBACAQ;gBAEA,WAAWE;YACb;YAEA,QAAQ;gBACN,GAAGV,UAAU;gBACb,OAAOa;gBACP,WAAWC;gBACXN;gBAEA,WAAWE;YACb;YACA,SAAS;gBACP,GAAGV,UAAU;gBACb,QAAQe;gBACR,OAAOvB;gBACP,OAAOA;gBACP,OAAO;oBACL,GAAGQ,WAAW,KAAK;oBACnB,uBAAuB;gBACzB;gBACAQ;gBAEA,MAAMQ;gBACN,WAAWN;YACb;YACA,WAAW;gBACT,GAAGV,UAAU;gBACb,OAAOV;gBACP,OAAOA;gBACPQ;gBACA,WAAWY;gBACX,YAAYC;gBACZ,gBAAgBC;YAClB;YACA,SAAS;gBACP,GAAGZ,UAAU;gBACb,OAAOV;gBACP,OAAOA;gBACPQ;gBACA,WAAWY;gBACX,YAAYC;gBAEZ,cAAcM;gBACd,cAAcC;YAChB;QACF;IACF;AACF"}
|
|
1
|
+
{"version":3,"file":"theme/light/light.js","sources":["webpack://@visactor/vseed/./src/theme/light/light.ts"],"sourcesContent":["import type { CustomThemeConfig, Player, YBandAxis } from 'src/types'\nimport {\n getFunnelLightLabel,\n getLightColor,\n getLightColorLegend,\n getLightCrosshairLine,\n getLightCrosshairRect,\n getLightBrushConfig,\n getLightLabel,\n getLightLegend,\n getLightPivotChartGridConfig,\n getLightTableConfig,\n getLightPlayer,\n} from '../common'\nimport { getLightTooltip } from '../common/tooltip'\nimport { getLightBandAxis, getLightLinearAxis } from '../common/axes'\nimport { getLightAnnotation } from '../common/annotaion'\nimport { getLightFunnelTransformTheme } from '../common/funnelTransform'\nimport { getLightHeatmapCellTheme } from '../common/heatmapCell'\nimport { getLightRegressionLine } from '../common/regressionLine'\nimport { getLightBoxPlotStyle, getLightOutlierStyle } from '../common/boxPlot'\n\nexport const lightTheme = (): CustomThemeConfig => {\n const linearAxis = getLightLinearAxis()\n const bandAxis: YBandAxis = getLightBandAxis()\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\n const crosshairLine = getLightCrosshairLine()\n const crosshairRect = getLightCrosshairRect()\n\n const baseConfig = {\n backgroundColor: 'transparent',\n color: getLightColor(),\n label: getLightLabel(),\n legend: getLightLegend(),\n tooltip: getLightTooltip(),\n brush: getLightBrushConfig(),\n }\n const tableConfig = getLightTableConfig()\n const player = getLightPlayer() as Player\n\n return {\n config: {\n // table\n table: tableConfig,\n pivotTable: tableConfig,\n // cartesian\n line: {\n ...baseConfig,\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairLine,\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\n },\n column: {\n ...baseConfig,\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairRect,\n\n stackCornerRadius: [4, 4, 0, 0],\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\n\n regressionLine: getLightRegressionLine(),\n },\n columnParallel: {\n ...baseConfig,\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairRect,\n\n stackCornerRadius: [4, 4, 0, 0],\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\n },\n columnPercent: {\n ...baseConfig,\n xAxis: bandAxis,\n yAxis: {\n ...linearAxis,\n },\n\n crosshairRect,\n stackCornerRadius: [4, 4, 0, 0],\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\n },\n bar: {\n ...baseConfig,\n xAxis: linearAxis,\n yAxis: barBandAxis,\n crosshairRect,\n\n stackCornerRadius: [0, 4, 4, 0],\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\n },\n raceBar: {\n ...baseConfig,\n xAxis: linearAxis,\n yAxis: barBandAxis,\n crosshairRect,\n player,\n\n stackCornerRadius: [0, 4, 4, 0],\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\n },\n raceColumn: {\n ...baseConfig,\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairRect,\n player,\n\n stackCornerRadius: [4, 4, 0, 0],\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\n\n regressionLine: getLightRegressionLine(),\n },\n raceScatter: {\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 player,\n\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\n\n regressionLine: getLightRegressionLine(),\n },\n barParallel: {\n ...baseConfig,\n xAxis: linearAxis,\n yAxis: barBandAxis,\n crosshairRect,\n stackCornerRadius: [0, 4, 4, 0],\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\n },\n barPercent: {\n ...baseConfig,\n xAxis: {\n ...linearAxis,\n },\n yAxis: barBandAxis,\n crosshairRect,\n\n stackCornerRadius: [0, 4, 4, 0],\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\n },\n area: {\n ...baseConfig,\n xAxis: bandAxis,\n yAxis: linearAxis,\n crosshairLine,\n\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\n },\n areaPercent: {\n ...baseConfig,\n xAxis: bandAxis,\n yAxis: {\n ...linearAxis,\n },\n\n crosshairLine,\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\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 pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\n\n regressionLine: getLightRegressionLine(),\n },\n dualAxis: {\n ...baseConfig,\n xAxis: bandAxis,\n primaryYAxis: linearAxis,\n secondaryYAxis: { ...linearAxis, grid: { visible: false } },\n crosshairRect,\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\n },\n // polar\n pie: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n labelLayout: 'arc',\n showDimension: true,\n },\n\n pivotGrid: getLightPivotChartGridConfig(),\n },\n donut: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n labelLayout: 'arc',\n showDimension: true,\n },\n\n pivotGrid: getLightPivotChartGridConfig(),\n },\n radar: {\n ...baseConfig,\n\n pivotGrid: getLightPivotChartGridConfig(),\n },\n rose: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n showDimension: true,\n },\n\n pivotGrid: getLightPivotChartGridConfig(),\n },\n roseParallel: {\n ...baseConfig,\n label: {\n ...baseConfig.label,\n showValuePercent: true,\n showDimension: true,\n },\n\n pivotGrid: getLightPivotChartGridConfig(),\n },\n // other\n funnel: {\n ...baseConfig,\n label: getFunnelLightLabel(),\n transform: getLightFunnelTransformTheme(),\n\n pivotGrid: getLightPivotChartGridConfig(),\n },\n heatmap: {\n ...baseConfig,\n legend: getLightColorLegend(),\n xAxis: bandAxis,\n yAxis: bandAxis,\n label: {\n ...baseConfig.label,\n labelColorSmartInvert: true,\n },\n\n cell: getLightHeatmapCellTheme(),\n pivotGrid: getLightPivotChartGridConfig(),\n },\n histogram: {\n ...baseConfig,\n xAxis: linearAxis,\n yAxis: linearAxis,\n crosshairRect,\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\n regressionLine: getLightRegressionLine(),\n },\n boxPlot: {\n ...baseConfig,\n xAxis: linearAxis,\n yAxis: linearAxis,\n crosshairRect,\n pivotGrid: getLightPivotChartGridConfig(),\n annotation: getLightAnnotation(),\n\n boxPlotStyle: getLightBoxPlotStyle(),\n outlierStyle: getLightOutlierStyle(),\n },\n },\n }\n}\n"],"names":["lightTheme","linearAxis","getLightLinearAxis","bandAxis","getLightBandAxis","barBandAxis","undefined","crosshairLine","getLightCrosshairLine","crosshairRect","getLightCrosshairRect","baseConfig","getLightColor","getLightLabel","getLightLegend","getLightTooltip","getLightBrushConfig","tableConfig","getLightTableConfig","player","getLightPlayer","getLightPivotChartGridConfig","getLightAnnotation","getLightRegressionLine","getFunnelLightLabel","getLightFunnelTransformTheme","getLightColorLegend","getLightHeatmapCellTheme","getLightBoxPlotStyle","getLightOutlierStyle"],"mappings":";;;;;;;;AAsBO,MAAMA,aAAa;IACxB,MAAMC,aAAaC;IACnB,MAAMC,WAAsBC;IAC5B,MAAMC,cAAyB;QAC7B,GAAGF,QAAQ;QACX,eAAe;QACf,kBAAkB;QAClB,gBAAgB;QAChB,sBAAsBG;QACtB,iBAAiB;QACjB,2BAA2B;YAAC;YAAG;YAAK;SAAI;IAC1C;IAEA,MAAMC,gBAAgBC;IACtB,MAAMC,gBAAgBC;IAEtB,MAAMC,aAAa;QACjB,iBAAiB;QACjB,OAAOC;QACP,OAAOC;QACP,QAAQC;QACR,SAASC;QACT,OAAOC;IACT;IACA,MAAMC,cAAcC;IACpB,MAAMC,SAASC;IAEf,OAAO;QACL,QAAQ;YAEN,OAAOH;YACP,YAAYA;YAEZ,MAAM;gBACJ,GAAGN,UAAU;gBACb,OAAOR;gBACP,OAAOF;gBACPM;gBACA,WAAWc;gBACX,YAAYC;YACd;YACA,QAAQ;gBACN,GAAGX,UAAU;gBACb,OAAOR;gBACP,OAAOF;gBACPQ;gBAEA,mBAAmB;oBAAC;oBAAG;oBAAG;oBAAG;iBAAE;gBAC/B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