@visactor/vseed 0.1.15 → 0.1.16
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 +3 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/builder/builder/buildAdvanced.js +1 -1
- package/dist/esm/builder/builder/buildAdvanced.js.map +1 -1
- package/dist/esm/builder/builder/buildSpec.js +2 -3
- package/dist/esm/builder/builder/buildSpec.js.map +1 -1
- package/dist/esm/dataReshape/foldMeasures.d.ts +1 -0
- package/dist/esm/dataReshape/foldMeasures.js +5 -1
- package/dist/esm/dataReshape/foldMeasures.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/default/defaultDimensions.js +4 -3
- package/dist/esm/pipeline/advanced/chart/pipes/default/defaultDimensions.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/default/defaultMeasures.js +12 -9
- package/dist/esm/pipeline/advanced/chart/pipes/default/defaultMeasures.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/init/initAdvancedVSeed.js +2 -0
- package/dist/esm/pipeline/advanced/chart/pipes/init/initAdvancedVSeed.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithDualEncoding.js +4 -6
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithDualEncoding.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithEncoding.js +2 -5
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithEncoding.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithScatterEncoding.js +2 -4
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithScatterEncoding.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithDualEncoding.js +4 -6
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithDualEncoding.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithEncoding.js +2 -5
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithEncoding.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithScatterEncoding.js +2 -4
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithScatterEncoding.js.map +1 -1
- package/dist/esm/pipeline/advanced/table/pipes/default/defaultDimensions.js +13 -7
- package/dist/esm/pipeline/advanced/table/pipes/default/defaultDimensions.js.map +1 -1
- package/dist/esm/pipeline/advanced/table/pipes/default/defaultMeasures.js +13 -9
- package/dist/esm/pipeline/advanced/table/pipes/default/defaultMeasures.js.map +1 -1
- package/dist/esm/pipeline/advanced/table/pipes/init/initAdvancedVSeed.js +2 -0
- package/dist/esm/pipeline/advanced/table/pipes/init/initAdvancedVSeed.js.map +1 -1
- package/dist/esm/pipeline/advanced/table/pipes/reshape/reshapePivotTable.js +2 -1
- package/dist/esm/pipeline/advanced/table/pipes/reshape/reshapePivotTable.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/axes/format/linearFormat.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/axes/format/linearFormat.js +11 -0
- package/dist/esm/pipeline/spec/chart/pipes/axes/format/linearFormat.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/axes/title/defaultTitleText.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/axes/title/defaultTitleText.js +14 -0
- package/dist/esm/pipeline/spec/chart/pipes/axes/title/defaultTitleText.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/axes/xBand.js +3 -1
- package/dist/esm/pipeline/spec/chart/pipes/axes/xBand.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/axes/xLinear.js +8 -11
- package/dist/esm/pipeline/spec/chart/pipes/axes/xLinear.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/axes/yBand.js +3 -1
- package/dist/esm/pipeline/spec/chart/pipes/axes/yBand.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/axes/yLinear.js +7 -10
- package/dist/esm/pipeline/spec/chart/pipes/axes/yLinear.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/axes/yLinearPrimary.js +8 -10
- package/dist/esm/pipeline/spec/chart/pipes/axes/yLinearPrimary.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/axes/yLinearSecondary.js +8 -10
- package/dist/esm/pipeline/spec/chart/pipes/axes/yLinearSecondary.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/label/label.js +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/label/label.js.map +1 -1
- package/dist/esm/pipeline/utils/format/createFormatterByMeasure.js +4 -3
- package/dist/esm/pipeline/utils/format/createFormatterByMeasure.js.map +1 -1
- package/dist/esm/pipeline/utils/index.d.ts +1 -0
- package/dist/esm/pipeline/utils/index.js +1 -0
- package/dist/esm/pipeline/utils/valid/checkVSeed.d.ts +2 -0
- package/dist/esm/pipeline/utils/valid/checkVSeed.js +11 -0
- package/dist/esm/pipeline/utils/valid/checkVSeed.js.map +1 -0
- package/dist/esm/pipeline/utils/valid/index.d.ts +1 -0
- package/dist/esm/pipeline/utils/valid/index.js +2 -0
- package/dist/esm/types/properties/config/axes/linearAxis.d.ts +3 -3
- package/dist/esm/types/properties/config/label/label.d.ts +2 -2
- package/dist/umd/index.js +166 -153
- package/dist/umd/index.js.map +1 -1
- package/package.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/label/label.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/label/label.ts"],"sourcesContent":["import type { ILineChartSpec } from '@visactor/vchart'\nimport type { ILineLikeLabelSpec } from '@visactor/vchart/esm/series/mixin/interface'\nimport { createFormatter, createFormatterByMeasure, findMeasureById } from '../../../../utils'\nimport type {\n Datum,\n Dimensions,\n Encoding,\n FoldInfo,\n Formatter,\n Label,\n Measure,\n Measures,\n NumFormat,\n SpecPipe,\n} from 'src/types'\nimport { isEmpty, merge, uniqueBy } from 'remeda'\n\nexport const label: SpecPipe = (spec, context) => {\n const result = { ...spec } as ILineChartSpec\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { chartType, encoding } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { label: Label }\n const foldInfo = datasetReshapeInfo[0].foldInfo as FoldInfo\n if (!baseConfig || isEmpty(baseConfig.label)) {\n return result\n }\n\n const { label } = baseConfig\n\n result.label = buildLabel(label, vseed.measures, vseed.dimensions, advancedVSeed.measures, encoding as Encoding, [\n foldInfo,\n ])\n\n return result\n}\n\nexport const generateMeasureValue = (\n value: number | string,\n measure?: Measure,\n labelAutoFormat
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/label/label.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/label/label.ts"],"sourcesContent":["import type { ILineChartSpec } from '@visactor/vchart'\nimport type { ILineLikeLabelSpec } from '@visactor/vchart/esm/series/mixin/interface'\nimport { createFormatter, createFormatterByMeasure, findMeasureById } from '../../../../utils'\nimport type {\n Datum,\n Dimensions,\n Encoding,\n FoldInfo,\n Formatter,\n Label,\n Measure,\n Measures,\n NumFormat,\n SpecPipe,\n} from 'src/types'\nimport { isEmpty, merge, uniqueBy } from 'remeda'\n\nexport const label: SpecPipe = (spec, context) => {\n const result = { ...spec } as ILineChartSpec\n const { advancedVSeed, vseed } = context\n const { datasetReshapeInfo } = advancedVSeed\n const { chartType, encoding } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { label: Label }\n const foldInfo = datasetReshapeInfo[0].foldInfo as FoldInfo\n if (!baseConfig || isEmpty(baseConfig.label)) {\n return result\n }\n\n const { label } = baseConfig\n\n result.label = buildLabel(label, vseed.measures, vseed.dimensions, advancedVSeed.measures, encoding as Encoding, [\n foldInfo,\n ])\n\n return result\n}\n\nexport const generateMeasureValue = (\n value: number | string,\n measure?: Measure,\n labelAutoFormat?: boolean,\n numFormat: NumFormat = {},\n) => {\n if (!measure) {\n return value\n }\n\n const format = merge(numFormat, measure.numFormat || measure.format)\n const mergedMeasure = { ...measure, numFormat: format, autoFormat: labelAutoFormat || measure.autoFormat }\n\n const formatter = createFormatterByMeasure(mergedMeasure)\n return formatter(value)\n}\n\nexport const generateMeasurePercent = (value: number | string, sum: number, formatter: Formatter) => {\n if (value === undefined || value === null) return String(value)\n const num = Number(value)\n if (Number.isNaN(num)) return String(value)\n\n const percentValue = num / sum\n return formatter(percentValue)\n}\n\nexport const buildLabel = (\n label: Label,\n vseedMeasures: Measures = [],\n vseedDimensions: Dimensions = [],\n advancedVSeedMeasures: Measures,\n encoding: Encoding,\n foldInfoList: FoldInfo[],\n) => {\n const {\n enable,\n wrap,\n showValue,\n showValuePercent,\n labelOverlap,\n labelColorSmartInvert,\n labelColor,\n labelFontSize,\n labelFontWeight,\n labelBackgroundColor,\n labelPosition,\n autoFormat,\n numFormat = {},\n } = label\n\n const labelDims = uniqueBy(\n (vseedDimensions || []).filter((item) => encoding.label?.includes(item.id)),\n (item) => item.id,\n )\n const labelMeas = uniqueBy(\n (vseedMeasures || []).filter((item) => encoding.label?.includes(item.id)),\n (item) => item.id,\n )\n\n const percentFormat: NumFormat = merge(numFormat, {\n type: 'percent',\n } as NumFormat)\n\n const percentFormatter = createFormatter(percentFormat)\n\n const result = {\n visible: enable,\n formatMethod: (_, datum: Datum) => {\n const result = []\n\n const dimLabels = labelDims.map((item) => item.alias || item.id)\n const meaLabels = labelMeas.map((item) =>\n generateMeasureValue(datum[item.id] as number | string, item, autoFormat, numFormat),\n )\n\n result.push(...dimLabels)\n\n foldInfoList.forEach((foldInfo) => {\n const { measureId, measureValue, statistics } = foldInfo\n const measure = findMeasureById(advancedVSeedMeasures, datum[measureId] as string)\n const measureValueLabel = generateMeasureValue(\n datum[measureValue] as number | string,\n measure,\n autoFormat,\n numFormat,\n )\n const measurePercentLabel = generateMeasurePercent(\n datum[measureValue] as number | string,\n statistics.sum,\n percentFormatter,\n )\n if (showValue) {\n result.push(measureValueLabel)\n }\n if (showValuePercent) {\n result.push(measurePercentLabel)\n }\n })\n\n result.push(...meaLabels)\n\n if (wrap) {\n return result\n }\n return result.join(' ')\n },\n position: labelPosition,\n style: {\n fill: labelColor,\n fontSize: labelFontSize,\n fontWeight: labelFontWeight,\n background: labelBackgroundColor,\n },\n smartInvert: labelColorSmartInvert,\n } as ILineLikeLabelSpec\n\n if (labelOverlap) {\n result.overlap = {\n hideOnHit: true,\n clampForce: true,\n }\n }\n\n return result\n}\n"],"names":["label","spec","context","result","advancedVSeed","vseed","datasetReshapeInfo","chartType","encoding","baseConfig","foldInfo","isEmpty","buildLabel","generateMeasureValue","value","measure","labelAutoFormat","numFormat","format","merge","mergedMeasure","formatter","createFormatterByMeasure","generateMeasurePercent","sum","String","num","Number","percentValue","vseedMeasures","vseedDimensions","advancedVSeedMeasures","foldInfoList","enable","wrap","showValue","showValuePercent","labelOverlap","labelColorSmartInvert","labelColor","labelFontSize","labelFontWeight","labelBackgroundColor","labelPosition","autoFormat","labelDims","uniqueBy","item","labelMeas","percentFormat","percentFormatter","createFormatter","_","datum","dimLabels","meaLabels","measureId","measureValue","statistics","findMeasureById","measureValueLabel","measurePercentLabel"],"mappings":";;AAiBO,MAAMA,cAAkB,CAACC,MAAMC;IACpC,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEI,kBAAkB,EAAE,GAAGF;IAC/B,MAAM,EAAEG,SAAS,EAAEC,QAAQ,EAAE,GAAGJ;IAChC,MAAMK,aAAaL,cAAc,MAAM,CAACG,UAAU;IAClD,MAAMG,WAAWJ,kBAAkB,CAAC,EAAE,CAAC,QAAQ;IAC/C,IAAI,CAACG,cAAcE,QAAQF,WAAW,KAAK,GACzC,OAAON;IAGT,MAAM,EAAEH,KAAK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"./createFormatter.js";
|
2
|
-
import { isEmpty } from "remeda";
|
2
|
+
import { isEmpty, isNullish } from "remeda";
|
3
3
|
const createFormatterByMeasure = (measure)=>{
|
4
4
|
if (!measure) return (v)=>String(v);
|
5
|
-
const { numFormat, format, autoFormat
|
5
|
+
const { numFormat, format, autoFormat } = measure;
|
6
6
|
const formatterFormat = numFormat || format || {};
|
7
|
+
if (true === autoFormat) return autoFormatter;
|
8
|
+
if (isNullish(autoFormat) && isEmpty(formatterFormat)) return autoFormatter;
|
7
9
|
if (!isEmpty(formatterFormat)) return createFormatter(formatterFormat);
|
8
|
-
if (autoFormat) return autoFormatter;
|
9
10
|
return (v)=>String(v);
|
10
11
|
};
|
11
12
|
export { createFormatterByMeasure };
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pipeline/utils/format/createFormatterByMeasure.js","sources":["webpack://@visactor/vseed/./src/pipeline/utils/format/createFormatterByMeasure.ts"],"sourcesContent":["import type { Formatter, Measure } from 'src/types'\nimport { autoFormatter, createFormatter } from './createFormatter'\nimport { isEmpty } from 'remeda'\n\nexport const createFormatterByMeasure = (measure?: Measure): Formatter => {\n if (!measure) {\n return (v) => String(v)\n }\n const { numFormat, format, autoFormat
|
1
|
+
{"version":3,"file":"pipeline/utils/format/createFormatterByMeasure.js","sources":["webpack://@visactor/vseed/./src/pipeline/utils/format/createFormatterByMeasure.ts"],"sourcesContent":["import type { Formatter, Measure } from 'src/types'\nimport { autoFormatter, createFormatter } from './createFormatter'\nimport { isEmpty, isNullish } from 'remeda'\n\nexport const createFormatterByMeasure = (measure?: Measure): Formatter => {\n if (!measure) {\n return (v) => String(v)\n }\n const { numFormat, format, autoFormat } = measure\n\n const formatterFormat = numFormat || format || {}\n\n if (autoFormat === true) {\n return autoFormatter\n }\n\n if (isNullish(autoFormat) && isEmpty(formatterFormat)) {\n return autoFormatter\n }\n\n if (!isEmpty(formatterFormat)) {\n return createFormatter(formatterFormat)\n }\n\n return (v) => String(v)\n}\n"],"names":["createFormatterByMeasure","measure","v","String","numFormat","format","autoFormat","formatterFormat","autoFormatter","isNullish","isEmpty","createFormatter"],"mappings":";;AAIO,MAAMA,2BAA2B,CAACC;IACvC,IAAI,CAACA,SACH,OAAO,CAACC,IAAMC,OAAOD;IAEvB,MAAM,EAAEE,SAAS,EAAEC,MAAM,EAAEC,UAAU,EAAE,GAAGL;IAE1C,MAAMM,kBAAkBH,aAAaC,UAAU,CAAC;IAEhD,IAAIC,AAAe,SAAfA,YACF,OAAOE;IAGT,IAAIC,UAAUH,eAAeI,QAAQH,kBACnC,OAAOC;IAGT,IAAI,CAACE,QAAQH,kBACX,OAAOI,gBAAgBJ;IAGzB,OAAO,CAACL,IAAMC,OAAOD;AACvB"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { isEmpty } from "remeda";
|
2
|
+
const checkVSeed = (vseed)=>{
|
3
|
+
const { chartType, dataset, dimensions, measures } = vseed;
|
4
|
+
if (!chartType) throw new Error('chartType is required');
|
5
|
+
if (!dataset || isEmpty(dataset)) throw new Error('dataset is required, and must be an array');
|
6
|
+
if (dimensions && !Array.isArray(dimensions)) throw new Error('dimensions must be an array');
|
7
|
+
if (measures && !Array.isArray(measures)) throw new Error('measures must be an array');
|
8
|
+
};
|
9
|
+
export { checkVSeed };
|
10
|
+
|
11
|
+
//# sourceMappingURL=checkVSeed.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"pipeline/utils/valid/checkVSeed.js","sources":["webpack://@visactor/vseed/./src/pipeline/utils/valid/checkVSeed.ts"],"sourcesContent":["import { isEmpty } from 'remeda'\nimport type { VSeed } from 'src/types'\n\nexport const checkVSeed = (vseed: VSeed) => {\n const { chartType, dataset, dimensions, measures } = vseed\n if (!chartType) {\n throw new Error('chartType is required')\n }\n if (!dataset || isEmpty(dataset)) {\n throw new Error('dataset is required, and must be an array')\n }\n if (dimensions && !Array.isArray(dimensions)) {\n throw new Error('dimensions must be an array')\n }\n if (measures && !Array.isArray(measures)) {\n throw new Error('measures must be an array')\n }\n}\n"],"names":["checkVSeed","vseed","chartType","dataset","dimensions","measures","Error","isEmpty","Array"],"mappings":";AAGO,MAAMA,aAAa,CAACC;IACzB,MAAM,EAAEC,SAAS,EAAEC,OAAO,EAAEC,UAAU,EAAEC,QAAQ,EAAE,GAAGJ;IACrD,IAAI,CAACC,WACH,MAAM,IAAII,MAAM;IAElB,IAAI,CAACH,WAAWI,QAAQJ,UACtB,MAAM,IAAIG,MAAM;IAElB,IAAIF,cAAc,CAACI,MAAM,OAAO,CAACJ,aAC/B,MAAM,IAAIE,MAAM;IAElB,IAAID,YAAY,CAACG,MAAM,OAAO,CAACH,WAC7B,MAAM,IAAIC,MAAM;AAEpB"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export { checkVSeed } from './checkVSeed';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { NumFormat } from
|
1
|
+
import type { NumFormat } from '../../format';
|
2
2
|
export type XLinearAxis = {
|
3
3
|
/**
|
4
4
|
* @description 轴是否可见
|
@@ -33,11 +33,11 @@ export type XLinearAxis = {
|
|
33
33
|
*/
|
34
34
|
zero?: boolean;
|
35
35
|
/**
|
36
|
-
* @description 是否自动格式化数值轴的刻度标签, 仅对数值轴生效,
|
36
|
+
* @description 是否自动格式化数值轴的刻度标签, 仅对数值轴生效, autoFormat 为 true 时, numFormat 配置失效
|
37
37
|
*/
|
38
38
|
autoFormat?: boolean;
|
39
39
|
/**
|
40
|
-
* @description 数值轴的数字格式化,
|
40
|
+
* @description 数值轴的数字格式化, 仅对数值轴生效, 优先级低于 autoFormat
|
41
41
|
*/
|
42
42
|
numFormat?: NumFormat;
|
43
43
|
/**
|
@@ -19,11 +19,11 @@ export type Label = {
|
|
19
19
|
*/
|
20
20
|
showValuePercent?: boolean;
|
21
21
|
/**
|
22
|
-
* @description 标签数值是否自动格式化,
|
22
|
+
* @description 标签数值是否自动格式化, autoFormat 为 true 时, numFormat 配置失效
|
23
23
|
*/
|
24
24
|
autoFormat?: boolean;
|
25
25
|
/**
|
26
|
-
* @description 标签数值格式化配置, 会和 `measure` 中的 `format` 进行合并, `measure` 中的 `format` 优先级更高.
|
26
|
+
* @description 标签数值格式化配置, 会和 `measure` 中的 `format` 进行合并, `measure` 中的 `format` 优先级更高. numFormat 优先级低于 autoFormat
|
27
27
|
*/
|
28
28
|
numFormat?: NumFormat;
|
29
29
|
/**
|