@visactor/vchart 1.13.9-alpha.4 → 1.13.9-alpha.6
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/build/es5/index.js +1 -1
- package/build/index.es.js +139 -155
- package/build/index.js +139 -155
- package/build/index.min.js +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/chart/base/base-chart.d.ts +8 -1
- package/cjs/chart/base/base-chart.js +33 -20
- package/cjs/chart/base/base-chart.js.map +1 -1
- package/cjs/chart/interface/chart.d.ts +8 -1
- package/cjs/chart/interface/chart.js.map +1 -1
- package/cjs/chart/sankey/sankey.js +21 -21
- package/cjs/chart/sankey/sankey.js.map +1 -1
- package/cjs/constant/funnel.js +2 -1
- package/cjs/constant/layout.js +1 -2
- package/cjs/core/index.d.ts +1 -1
- package/cjs/core/index.js +1 -1
- package/cjs/core/index.js.map +1 -1
- package/esm/chart/base/base-chart.d.ts +8 -1
- package/esm/chart/base/base-chart.js +33 -20
- package/esm/chart/base/base-chart.js.map +1 -1
- package/esm/chart/interface/chart.d.ts +8 -1
- package/esm/chart/interface/chart.js.map +1 -1
- package/esm/chart/sankey/sankey.js +22 -22
- package/esm/chart/sankey/sankey.js.map +1 -1
- package/esm/constant/funnel.js +2 -1
- package/esm/constant/layout.js +1 -2
- package/esm/core/index.d.ts +1 -1
- package/esm/core/index.js +1 -1
- package/esm/core/index.js.map +1 -1
- package/package.json +15 -15
|
@@ -12,28 +12,28 @@ class SankeyChart extends base_chart_1.BaseChart {
|
|
|
12
12
|
this.type = "sankey", this.seriesType = type_1.SeriesTypeEnum.sankey;
|
|
13
13
|
}
|
|
14
14
|
_setStateInDatum(stateKey, checkReverse, datum, filter, region) {
|
|
15
|
-
const activeDatum = (0, vutils_1.isArray)(datum) ? datum[0] : datum
|
|
16
|
-
this.
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
var _a
|
|
21
|
-
let
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
return (0, vutils_1.isArray)(datum) && (datum = datum[0]), activeDatum[k] == (null == datum ? void 0 : datum[k]);
|
|
30
|
-
}))))), pickElement && (hasPick = !0, r.interaction.startInteraction(stateKey, pickElement),
|
|
31
|
-
(mark.id().includes("node") || mark.id().includes("link")) && (activeNodeOrLink = pickElement)));
|
|
32
|
-
})), activeNodeOrLink && (null === (_b = (_a = s)._handleEmphasisElement) || void 0 === _b || _b.call(_a, {
|
|
33
|
-
item: activeNodeOrLink
|
|
15
|
+
const activeDatum = (0, vutils_1.isArray)(datum) ? datum[0] : datum;
|
|
16
|
+
this.filterGraphicsByDatum(activeDatum, {
|
|
17
|
+
filter: (series, mark) => "text" !== mark.type && mark.getProduct() && (!filter || filter(series, mark)),
|
|
18
|
+
region: region,
|
|
19
|
+
getDatum: e => {
|
|
20
|
+
var _a;
|
|
21
|
+
let d = null === (_a = e.getDatum()) || void 0 === _a ? void 0 : _a.datum;
|
|
22
|
+
return (0, vutils_1.isArray)(d) && (d = d[0]), d;
|
|
23
|
+
},
|
|
24
|
+
callback: (element, mark, s, r) => {
|
|
25
|
+
var _a, _b, _c;
|
|
26
|
+
const id = null === (_a = mark.getProduct()) || void 0 === _a ? void 0 : _a.id();
|
|
27
|
+
id && (id.includes("node") || id.includes("link")) && (null === (_c = (_b = s)._handleEmphasisElement) || void 0 === _c || _c.call(_b, {
|
|
28
|
+
item: element
|
|
34
29
|
}));
|
|
35
|
-
}
|
|
36
|
-
|
|
30
|
+
},
|
|
31
|
+
regionCallback: (elements, r) => {
|
|
32
|
+
activeDatum ? elements.length && (elements.forEach((e => {
|
|
33
|
+
r.interaction.startInteraction(stateKey, e);
|
|
34
|
+
})), checkReverse && r.interaction.reverseEventElement(stateKey)) : r.interaction.clearEventElement(stateKey, !0);
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39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AE,WAAW,CAAC,CAAC;AACvD,CAAC,CAAC;AALW,QAAA,mBAAmB,uBAK9B","file":"sankey.js","sourcesContent":["import { BaseChart } from '../base/base-chart';\nimport { ChartTypeEnum } from '../interface/type';\nimport { SeriesTypeEnum } from '../../series/interface/type';\nimport type { ISankeyChartSpec } from './interface';\nimport { registerSankeySeries } from '../../series/sankey/sankey';\nimport { Factory } from '../../core/factory';\nimport { SankeyChartSpecTransformer } from './sankey-transformer';\nimport type { Datum, MaybeArray } from '../../typings/common';\nimport type { ISeries } from '../../series/interface';\nimport type { IMark } from '../../mark/interface/common';\nimport type { IRegionQuerier } from '../../typings/params';\nimport { isArray } from '@visactor/vutils';\nimport { loadScrollbar } from '@visactor/vrender-components';\n\nexport class SankeyChart<T extends ISankeyChartSpec = ISankeyChartSpec> extends BaseChart<T> {\n static readonly type: string = ChartTypeEnum.sankey;\n static readonly seriesType: string = SeriesTypeEnum.sankey;\n static readonly transformerConstructor = SankeyChartSpecTransformer;\n readonly transformerConstructor = SankeyChartSpecTransformer;\n readonly type: string = ChartTypeEnum.sankey;\n readonly seriesType: string = SeriesTypeEnum.sankey;\n\n protected _setStateInDatum(\n stateKey: string,\n checkReverse: boolean,\n datum: MaybeArray<Datum> | null,\n filter?: (series: ISeries, mark: IMark) => boolean,\n region?: IRegionQuerier\n ) {\n // 桑基图暂时只支持单选\n const activeDatum = isArray(datum) ? datum[0] : datum;\n const markFilter = (series: ISeries, mark: IMark) => {\n return mark.type !== 'text' && mark.getProduct() && (!filter || filter(series, mark));\n };\n\n this.filterGraphicsByDatum(activeDatum, {\n filter: markFilter,\n region,\n getDatum: e => {\n let d = e.getDatum()?.datum;\n\n if (isArray(d)) {\n // data of link\n d = d[0];\n }\n return d;\n },\n callback: (element, mark, s, r) => {\n const id = mark.getProduct()?.id();\n if (id && (id.includes('node') || id.includes('link'))) {\n (s as any)._handleEmphasisElement?.({ item: element });\n }\n },\n regionCallback: (elements, r) => {\n if (!activeDatum) {\n r.interaction.clearEventElement(stateKey, true);\n return;\n } else if (elements.length) {\n elements.forEach(e => {\n r.interaction.startInteraction(stateKey, e);\n });\n\n if (checkReverse) {\n r.interaction.reverseEventElement(stateKey);\n }\n }\n }\n });\n }\n}\n\nexport const registerSankeyChart = () => {\n loadScrollbar();\n registerSankeySeries();\n\n Factory.registerChart(SankeyChart.type, SankeyChart);\n};\n"]}
|
package/cjs/constant/funnel.js
CHANGED
|
@@ -12,4 +12,5 @@ exports.FUNNEL_LAST_VALUE_RATIO = `${base_1.PREFIX}_FUNNEL_LAST_VALUE_RATIO`, ex
|
|
|
12
12
|
exports.FUNNEL_LAST_VALUE = `${base_1.PREFIX}_FUNNEL_LAST_VALUE`, exports.FUNNEL_CURRENT_VALUE = `${base_1.PREFIX}_FUNNEL_CURRENT_VALUE`,
|
|
13
13
|
exports.FUNNEL_NEXT_VALUE = `${base_1.PREFIX}_FUNNEL_NEXT_VALUE`, exports.FUNNEL_TRANSFORM_LEVEL = `${base_1.PREFIX}_FUNNEL_TRANSFORM_LEVEL`,
|
|
14
14
|
exports.FUNNEL_LABEL_LINE_LENGTH = 20, exports.FUNNEL_LABEL_SPACE_WIDTH = 5, exports.FUNNEL_MAX_SIZE = "80%",
|
|
15
|
-
exports.FUNNEL_MIN_SIZE = 0;
|
|
15
|
+
exports.FUNNEL_MIN_SIZE = 0;
|
|
16
|
+
//# sourceMappingURL=funnel.js.map
|
package/cjs/constant/layout.js
CHANGED
|
@@ -24,5 +24,4 @@ function(LayoutZIndex) {
|
|
|
24
24
|
LayoutLevel[LayoutLevel.Player = 40] = "Player", LayoutLevel[LayoutLevel.ScrollBar = 40] = "ScrollBar",
|
|
25
25
|
LayoutLevel[LayoutLevel.Legend = 50] = "Legend", LayoutLevel[LayoutLevel.Title = 70] = "Title",
|
|
26
26
|
LayoutLevel[LayoutLevel.CustomMark = 70] = "CustomMark";
|
|
27
|
-
}(LayoutLevel = exports.LayoutLevel || (exports.LayoutLevel = {}));
|
|
28
|
-
//# sourceMappingURL=layout.js.map
|
|
27
|
+
}(LayoutLevel = exports.LayoutLevel || (exports.LayoutLevel = {}));
|
package/cjs/core/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VChart } from './vchart';
|
|
2
2
|
import { Factory } from './factory';
|
|
3
3
|
export { VChart, Factory };
|
|
4
|
-
export declare const version = "1.13.9-alpha.
|
|
4
|
+
export declare const version = "1.13.9-alpha.6";
|
|
5
5
|
export type { IVChart } from './interface';
|
|
6
6
|
export type { IStateSpec, StateValueType } from '../compile/mark';
|
|
7
7
|
export type { IRegion } from '../region/interface';
|
package/cjs/core/index.js
CHANGED
|
@@ -35,7 +35,7 @@ Object.defineProperty(exports, "Factory", {
|
|
|
35
35
|
get: function() {
|
|
36
36
|
return factory_1.Factory;
|
|
37
37
|
}
|
|
38
|
-
}), exports.version = "1.13.9-alpha.
|
|
38
|
+
}), exports.version = "1.13.9-alpha.6", __exportStar(require("../typings/spec/common"), exports),
|
|
39
39
|
__exportStar(require("../event/interface"), exports), __exportStar(require("../theme/interface"), exports),
|
|
40
40
|
__exportStar(require("./interface"), exports), __exportStar(require("../constant/base"), exports),
|
|
41
41
|
__exportStar(require("../constant/data"), exports), __exportStar(require("../typings/spec/index"), exports),
|
package/cjs/core/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/core/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAIA,qCAAkC;AAGzB,uFAHA,eAAM,OAGA;AAFf,uCAAoC;AAEnB,wFAFR,iBAAO,OAEQ;AAGX,QAAA,OAAO,GAAG,gBAAgB,CAAC;AAOxC,yDAAuC;AACvC,qDAAmC;AACnC,qDAAmC;AACnC,8CAA4B;AAG5B,mDAAiC;AACjC,mDAAiC;AAKjC,wDAAsC;AAGtC,qDAAmC;AAGnC,iDAA+B;AAG/B,uDAUgC;AAT9B,uGAAA,OAAO,OAAA;AACP,2GAAA,WAAW,OAAA;AACX,8GAAA,cAAc,OAAA;AACd,0GAAA,UAAU,OAAA;AACV,yGAAA,SAAS,OAAA;AACT,0GAAA,UAAU,OAAA;AACV,0GAAA,UAAU,OAAA;AACV,0GAAA,UAAU,OAAA;AACV,4GAAA,YAAY,OAAA","file":"index.js","sourcesContent":["/**\n * @description The core module of VChart, containing the necessary interfaces for using VChart.\n */\n\nimport { VChart } from './vchart';\nimport { Factory } from './factory';\n\nexport { VChart, Factory };\n\n// export the version\nexport const version = \"1.13.9-alpha.
|
|
1
|
+
{"version":3,"sources":["../src/core/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAIA,qCAAkC;AAGzB,uFAHA,eAAM,OAGA;AAFf,uCAAoC;AAEnB,wFAFR,iBAAO,OAEQ;AAGX,QAAA,OAAO,GAAG,gBAAgB,CAAC;AAOxC,yDAAuC;AACvC,qDAAmC;AACnC,qDAAmC;AACnC,8CAA4B;AAG5B,mDAAiC;AACjC,mDAAiC;AAKjC,wDAAsC;AAGtC,qDAAmC;AAGnC,iDAA+B;AAG/B,uDAUgC;AAT9B,uGAAA,OAAO,OAAA;AACP,2GAAA,WAAW,OAAA;AACX,8GAAA,cAAc,OAAA;AACd,0GAAA,UAAU,OAAA;AACV,yGAAA,SAAS,OAAA;AACT,0GAAA,UAAU,OAAA;AACV,0GAAA,UAAU,OAAA;AACV,0GAAA,UAAU,OAAA;AACV,4GAAA,YAAY,OAAA","file":"index.js","sourcesContent":["/**\n * @description The core module of VChart, containing the necessary interfaces for using VChart.\n */\n\nimport { VChart } from './vchart';\nimport { Factory } from './factory';\n\nexport { VChart, Factory };\n\n// export the version\nexport const version = \"1.13.9-alpha.6\";\n\n// export necessary types\nexport type { IVChart } from './interface';\nexport type { IStateSpec, StateValueType } from '../compile/mark';\nexport type { IRegion } from '../region/interface';\n\nexport * from '../typings/spec/common';\nexport * from '../event/interface';\nexport * from '../theme/interface';\nexport * from './interface';\n\n// some constants\nexport * from '../constant/base';\nexport * from '../constant/data';\n\n/**\n * spec\n */\nexport * from '../typings/spec/index';\n\n// tooltip\nexport * from '../typings/tooltip';\n\n// theme\nexport * from '../theme/index';\n\n// vrender\nexport {\n vglobal,\n createGroup,\n createRichText,\n createText,\n createArc,\n createArea,\n createRect,\n createLine,\n createSymbol\n} from '@visactor/vrender-core';\n"]}
|
|
@@ -13,7 +13,7 @@ import type { DataView } from '@visactor/vdataset';
|
|
|
13
13
|
import type { DataSet } from '@visactor/vdataset';
|
|
14
14
|
import type { IParserOptions } from '@visactor/vdataset';
|
|
15
15
|
import type { IBoundsLike, Maybe } from '@visactor/vutils';
|
|
16
|
-
import type { IRunningConfig as IMorphConfig, IView } from '@visactor/vgrammar-core';
|
|
16
|
+
import type { IElement, IRunningConfig as IMorphConfig, IView } from '@visactor/vgrammar-core';
|
|
17
17
|
import { CompilableBase } from '../../compile/compilable-base';
|
|
18
18
|
import type { IGlobalScale } from '../../scale/interface';
|
|
19
19
|
export declare class BaseChart<T extends IChartSpec> extends CompilableBase implements IChart {
|
|
@@ -146,6 +146,13 @@ export declare class BaseChart<T extends IChartSpec> extends CompilableBase impl
|
|
|
146
146
|
private _initEvent;
|
|
147
147
|
protected _enableMarkAnimation(states: string | string[]): void;
|
|
148
148
|
protected _disableMarkAnimation(states: string | string[]): void;
|
|
149
|
+
filterGraphicsByDatum(datum: MaybeArray<Datum> | null, opt?: {
|
|
150
|
+
filter?: (series: ISeries, mark: IMark) => boolean;
|
|
151
|
+
region?: IRegionQuerier;
|
|
152
|
+
getDatum?: (el: IElement, mark: IMark, s: ISeries, r: IRegion) => Datum;
|
|
153
|
+
callback?: (el: IElement, mark: IMark, s: ISeries, r: IRegion) => void;
|
|
154
|
+
regionCallback?: (pickElements: IElement[], r: IRegion) => void;
|
|
155
|
+
}): IElement[];
|
|
149
156
|
protected _setStateInDatum(stateKey: string, checkReverse: boolean, datum: MaybeArray<Datum> | null, filter?: (series: ISeries, mark: IMark) => boolean, region?: IRegionQuerier): void;
|
|
150
157
|
setDimensionIndex(value: StringOrNumber, opt: DimensionIndexOption): void;
|
|
151
158
|
getColorScheme(): import("../..").IThemeColorScheme;
|
|
@@ -646,35 +646,48 @@ export class BaseChart extends CompilableBase {
|
|
|
646
646
|
product && product.animate && product.animate.disableAnimationState(states);
|
|
647
647
|
}));
|
|
648
648
|
}
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
649
|
+
filterGraphicsByDatum(datum, opt = {}) {
|
|
650
|
+
var _a;
|
|
651
|
+
const keys = (datum = datum ? array(datum) : null) ? Object.keys(datum[0]) : null, allElements = [], getDatumOfElement = null !== (_a = opt.getDatum) && void 0 !== _a ? _a : el => el.getDatum();
|
|
652
|
+
return this.getRegionsInQuerier(opt.region).forEach((r => {
|
|
653
|
+
const pickElements = [];
|
|
654
|
+
datum && r.getSeries().forEach((s => {
|
|
653
655
|
s.getMarks().forEach((m => {
|
|
654
|
-
if (m.getProduct() && (!filter || isFunction(filter) && filter(s, m))) {
|
|
656
|
+
if (m.getProduct() && (!opt.filter || isFunction(opt.filter) && opt.filter(s, m))) {
|
|
655
657
|
const isCollect = m.getProduct().isCollectionMark(), elements = m.getProduct().elements;
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
658
|
+
if (isCollect) elements.filter((e => {
|
|
659
|
+
const elDatum = getDatumOfElement(e, m, s, r);
|
|
660
|
+
elDatum && datum.every(((d, index) => keys.every((k => d[k] == elDatum[index][k])))) && (pickElements.push(e),
|
|
661
|
+
allElements.push(e), opt.callback && opt.callback(e, m, s, r));
|
|
660
662
|
})); else if (datum.length > 1) {
|
|
661
663
|
const datumTemp = datum.slice();
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
664
|
+
elements.forEach((e => {
|
|
665
|
+
const elDatum = getDatumOfElement(e, m, s, r), index = elDatum && datumTemp.findIndex((d => keys.every((k => d[k] == elDatum[k]))));
|
|
666
|
+
index >= 0 && (datumTemp.splice(index, 1), pickElements.push(e), allElements.push(e),
|
|
667
|
+
opt.callback && opt.callback(e, m, s, r));
|
|
666
668
|
}));
|
|
667
669
|
} else {
|
|
668
|
-
const el = elements.find((e =>
|
|
669
|
-
|
|
670
|
+
const el = elements.find((e => {
|
|
671
|
+
const elDatum = getDatumOfElement(e, m, s, r);
|
|
672
|
+
return elDatum && keys.every((k => datum[0][k] == elDatum[k]));
|
|
673
|
+
}));
|
|
674
|
+
el && (pickElements.push(el), allElements.push(el), opt.callback && opt.callback(el, m, s, r));
|
|
670
675
|
}
|
|
671
|
-
pickElements.forEach((element => {
|
|
672
|
-
r.interaction.startInteraction(stateKey, element);
|
|
673
|
-
}));
|
|
674
676
|
}
|
|
675
677
|
}));
|
|
676
|
-
})),
|
|
677
|
-
}));
|
|
678
|
+
})), opt.regionCallback && opt.regionCallback(pickElements, r);
|
|
679
|
+
})), allElements;
|
|
680
|
+
}
|
|
681
|
+
_setStateInDatum(stateKey, checkReverse, datum, filter, region) {
|
|
682
|
+
this.filterGraphicsByDatum(datum, {
|
|
683
|
+
filter: filter,
|
|
684
|
+
region: region,
|
|
685
|
+
regionCallback: (elements, r) => {
|
|
686
|
+
datum ? elements.length && (elements.forEach((e => {
|
|
687
|
+
r.interaction.startInteraction(stateKey, e);
|
|
688
|
+
})), checkReverse && r.interaction.reverseEventElement(stateKey)) : r.interaction.clearEventElement(stateKey, !0);
|
|
689
|
+
}
|
|
690
|
+
});
|
|
678
691
|
}
|
|
679
692
|
setDimensionIndex(value, opt) {
|
|
680
693
|
var _a, _b;
|