@visactor/vchart 1.2.0-beta.2 → 1.2.0-beta.4
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/index.js +275 -129
- package/build/index.min.js +1 -1
- package/cjs/chart/waterfall/waterfall.js +1 -0
- package/cjs/chart/waterfall/waterfall.js.map +1 -1
- package/cjs/component/axis/cartesian/index.d.ts +1 -0
- package/cjs/component/axis/cartesian/index.js +1 -1
- package/cjs/component/axis/cartesian/index.js.map +1 -1
- package/cjs/component/axis/cartesian/interface/spec.d.ts +4 -1
- package/cjs/component/axis/cartesian/interface/spec.js.map +1 -1
- package/cjs/component/axis/cartesian/linear-axis.d.ts +3 -2
- package/cjs/component/axis/cartesian/linear-axis.js.map +1 -1
- package/cjs/component/axis/cartesian/log-axis.d.ts +15 -0
- package/cjs/component/axis/cartesian/log-axis.js +23 -0
- package/cjs/component/axis/cartesian/log-axis.js.map +1 -0
- package/cjs/component/axis/mixin/linear-axis-mixin.d.ts +2 -0
- package/cjs/component/axis/mixin/linear-axis-mixin.js +13 -1
- package/cjs/component/axis/mixin/linear-axis-mixin.js.map +1 -1
- package/cjs/component/base/util.js +3 -0
- package/cjs/component/base/util.js.map +1 -1
- package/cjs/component/data-zoom/data-filter-base-component.js +2 -3
- package/cjs/component/data-zoom/data-filter-base-component.js.map +1 -1
- package/cjs/component/data-zoom/data-zoom/data-zoom.js +6 -6
- package/cjs/component/data-zoom/data-zoom/data-zoom.js.map +1 -1
- package/cjs/component/index.d.ts +4 -4
- package/cjs/component/index.js +6 -1
- package/cjs/component/index.js.map +1 -1
- package/cjs/component/interface/type.d.ts +1 -0
- package/cjs/component/interface/type.js +12 -12
- package/cjs/component/interface/type.js.map +1 -1
- package/cjs/component/tooltip/handler/base.d.ts +1 -1
- package/cjs/component/tooltip/handler/base.js +1 -1
- package/cjs/component/tooltip/handler/base.js.map +1 -1
- package/cjs/component/tooltip/handler/canvas/canvas-tooltip-handler.d.ts +1 -0
- package/cjs/component/tooltip/handler/canvas/canvas-tooltip-handler.js +11 -4
- package/cjs/component/tooltip/handler/canvas/canvas-tooltip-handler.js.map +1 -1
- package/cjs/component/tooltip/handler/dom/dom-tooltip-handler.d.ts +1 -0
- package/cjs/component/tooltip/handler/dom/dom-tooltip-handler.js +3 -0
- package/cjs/component/tooltip/handler/dom/dom-tooltip-handler.js.map +1 -1
- package/cjs/component/tooltip/interface/event.d.ts +8 -0
- package/cjs/component/tooltip/interface/event.js +6 -0
- package/cjs/component/tooltip/interface/event.js.map +1 -0
- package/cjs/component/tooltip/interface/spec.d.ts +2 -2
- package/cjs/component/tooltip/interface/spec.js.map +1 -1
- package/cjs/component/tooltip/processor/base.js +6 -2
- package/cjs/component/tooltip/processor/base.js.map +1 -1
- package/cjs/component/tooltip/processor/dimension-tooltip.js +3 -4
- package/cjs/component/tooltip/processor/dimension-tooltip.js.map +1 -1
- package/cjs/component/tooltip/processor/mark-tooltip.js +1 -2
- package/cjs/component/tooltip/processor/mark-tooltip.js.map +1 -1
- package/cjs/component/tooltip/tooltip.d.ts +4 -2
- package/cjs/component/tooltip/tooltip.js +21 -9
- package/cjs/component/tooltip/tooltip.js.map +1 -1
- package/cjs/constant/event.d.ts +3 -1
- package/cjs/constant/event.js +2 -1
- package/cjs/constant/event.js.map +1 -1
- package/cjs/core/index.d.ts +1 -1
- package/cjs/core/index.js +1 -1
- package/cjs/core/index.js.map +1 -1
- package/cjs/data/transforms/sankey.js +10 -2
- package/cjs/data/transforms/sankey.js.map +1 -1
- package/cjs/event/interface.d.ts +3 -0
- package/cjs/event/interface.js.map +1 -1
- package/cjs/series/geo/geo.js +2 -1
- package/cjs/series/geo/geo.js.map +1 -1
- package/cjs/series/map/map.js +2 -2
- package/cjs/series/map/map.js.map +1 -1
- package/cjs/series/word-cloud/base.d.ts +1 -0
- package/cjs/series/word-cloud/base.js +35 -32
- package/cjs/series/word-cloud/base.js.map +1 -1
- package/cjs/series/word-cloud/word-cloud-3d.js +33 -33
- package/cjs/series/word-cloud/word-cloud-3d.js.map +1 -1
- package/cjs/theme/buildin-theme/light/component/axis/log-axis.d.ts +2 -0
- package/cjs/theme/buildin-theme/light/component/axis/log-axis.js +22 -0
- package/cjs/theme/buildin-theme/light/component/axis/log-axis.js.map +1 -0
- package/cjs/typings/tooltip/handler.d.ts +1 -0
- package/cjs/typings/tooltip/handler.js.map +1 -1
- package/cjs/vchart-all.js +1 -1
- package/cjs/vchart-all.js.map +1 -1
- package/esm/chart/waterfall/waterfall.js +1 -0
- package/esm/chart/waterfall/waterfall.js.map +1 -1
- package/esm/component/axis/cartesian/index.d.ts +1 -0
- package/esm/component/axis/cartesian/index.js +2 -0
- package/esm/component/axis/cartesian/index.js.map +1 -1
- package/esm/component/axis/cartesian/interface/spec.d.ts +4 -1
- package/esm/component/axis/cartesian/interface/spec.js.map +1 -1
- package/esm/component/axis/cartesian/linear-axis.d.ts +3 -2
- package/esm/component/axis/cartesian/linear-axis.js.map +1 -1
- package/esm/component/axis/cartesian/log-axis.d.ts +15 -0
- package/esm/component/axis/cartesian/log-axis.js +24 -0
- package/esm/component/axis/cartesian/log-axis.js.map +1 -0
- package/esm/component/axis/mixin/linear-axis-mixin.d.ts +2 -0
- package/esm/component/axis/mixin/linear-axis-mixin.js +8 -1
- package/esm/component/axis/mixin/linear-axis-mixin.js.map +1 -1
- package/esm/component/base/util.js +3 -0
- package/esm/component/base/util.js.map +1 -1
- package/esm/component/data-zoom/data-filter-base-component.js +2 -3
- package/esm/component/data-zoom/data-filter-base-component.js.map +1 -1
- package/esm/component/data-zoom/data-zoom/data-zoom.js +6 -6
- package/esm/component/data-zoom/data-zoom/data-zoom.js.map +1 -1
- package/esm/component/index.d.ts +4 -4
- package/esm/component/index.js +2 -2
- package/esm/component/index.js.map +1 -1
- package/esm/component/interface/type.d.ts +1 -0
- package/esm/component/interface/type.js +12 -12
- package/esm/component/interface/type.js.map +1 -1
- package/esm/component/tooltip/handler/base.d.ts +1 -1
- package/esm/component/tooltip/handler/base.js +1 -1
- package/esm/component/tooltip/handler/base.js.map +1 -1
- package/esm/component/tooltip/handler/canvas/canvas-tooltip-handler.d.ts +1 -0
- package/esm/component/tooltip/handler/canvas/canvas-tooltip-handler.js +11 -4
- package/esm/component/tooltip/handler/canvas/canvas-tooltip-handler.js.map +1 -1
- package/esm/component/tooltip/handler/dom/dom-tooltip-handler.d.ts +1 -0
- package/esm/component/tooltip/handler/dom/dom-tooltip-handler.js +3 -0
- package/esm/component/tooltip/handler/dom/dom-tooltip-handler.js.map +1 -1
- package/esm/component/tooltip/interface/event.d.ts +8 -0
- package/esm/component/tooltip/interface/event.js +2 -0
- package/esm/component/tooltip/interface/event.js.map +1 -0
- package/esm/component/tooltip/interface/spec.d.ts +2 -2
- package/esm/component/tooltip/interface/spec.js.map +1 -1
- package/esm/component/tooltip/processor/base.js +7 -1
- package/esm/component/tooltip/processor/base.js.map +1 -1
- package/esm/component/tooltip/processor/dimension-tooltip.js +2 -7
- package/esm/component/tooltip/processor/dimension-tooltip.js.map +1 -1
- package/esm/component/tooltip/processor/mark-tooltip.js +0 -3
- package/esm/component/tooltip/processor/mark-tooltip.js.map +1 -1
- package/esm/component/tooltip/tooltip.d.ts +4 -2
- package/esm/component/tooltip/tooltip.js +23 -9
- package/esm/component/tooltip/tooltip.js.map +1 -1
- package/esm/constant/event.d.ts +3 -1
- package/esm/constant/event.js +2 -1
- package/esm/constant/event.js.map +1 -1
- package/esm/core/index.d.ts +1 -1
- package/esm/core/index.js +1 -1
- package/esm/core/index.js.map +1 -1
- package/esm/data/transforms/sankey.js +10 -2
- package/esm/data/transforms/sankey.js.map +1 -1
- package/esm/event/interface.d.ts +3 -0
- package/esm/event/interface.js.map +1 -1
- package/esm/series/geo/geo.js +2 -1
- package/esm/series/geo/geo.js.map +1 -1
- package/esm/series/map/map.js +2 -2
- package/esm/series/map/map.js.map +1 -1
- package/esm/series/word-cloud/base.d.ts +1 -0
- package/esm/series/word-cloud/base.js +35 -32
- package/esm/series/word-cloud/base.js.map +1 -1
- package/esm/series/word-cloud/word-cloud-3d.js +33 -33
- package/esm/series/word-cloud/word-cloud-3d.js.map +1 -1
- package/esm/theme/buildin-theme/light/component/axis/log-axis.d.ts +2 -0
- package/esm/theme/buildin-theme/light/component/axis/log-axis.js +18 -0
- package/esm/theme/buildin-theme/light/component/axis/log-axis.js.map +1 -0
- package/esm/typings/tooltip/handler.d.ts +1 -0
- package/esm/typings/tooltip/handler.js.map +1 -1
- package/esm/vchart-all.js +2 -2
- package/esm/vchart-all.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/series/map/map.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAEtD,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,gCAAgC,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE1D,OAAO,EAAE,cAAc,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAEvH,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAElE,OAAO,EAAE,UAAU,E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OAAO,CAAC,OAAO,CAAC,yBAAyB,CAAC,CAAC;QAChD,OAAO,CAAC,CAAC;IACX,CAAC;IAED,cAAc,CAAC,CAAW;;QACxB,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;QACxB,MAAA,MAAA,IAAI,CAAC,YAAY,0CAAE,WAAW,EAAE,0CAAE,iBAAiB,EAAE,CAAC;QACtD,MAAA,IAAI,CAAC,YAAY,0CAAE,UAAU,EAAE,CAAC;IAClC,CAAC;IAES,aAAa;QACrB,OAAO,kBAAkB,CAAC;IAC5B,CAAC;;AAxUe,cAAI,GAAW,cAAc,CAAC,GAAG,CAAC;AAGlC,cAAI,mCACf,UAAU,CAAC,IAAI,KAClB,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,kBAAkB,CAAC,IAAI,EAAE,IAAI,EAAE,YAAY,CAAC,IAAI,EAAE,IACrF","file":"map.js","sourcesContent":["/* eslint-disable no-duplicate-imports */\nimport { MarkTypeEnum } from '../../mark/interface';\nimport { registerGrammar } from '@visactor/vgrammar';\nimport type { IElement } from '@visactor/vgrammar';\nimport { Projection } from '@visactor/vgrammar-projection';\nimport { DataView } from '@visactor/vdataset';\nimport type { IPathMark } from '../../mark/path';\nimport { geoSourceMap } from './geo-source';\nimport { lookup } from '../../data/transforms/lookup';\nimport type { Maybe, Datum, StringOrNumber } from '../../typings';\nimport { isValid, isValidNumber } from '../../util';\nimport { GeoSeries } from '../geo/geo';\nimport { map } from '../../data/transforms/map';\nimport { copyDataView } from '../../data/transforms/copy-data-view';\nimport { registerDataSetInstanceTransform } from '../../data/register';\nimport { MapSeriesTooltipHelper } from './tooltip-helper';\nimport type { ITextMark } from '../../mark/text';\nimport { AttributeLevel, DEFAULT_DATA_SERIES_FIELD, DEFAULT_DATA_KEY, DEFAULT_DATA_INDEX } from '../../constant/index';\nimport type { SeriesMarkMap } from '../interface';\nimport { SeriesMarkNameEnum, SeriesTypeEnum } from '../interface';\nimport type { IMapSeriesSpec, IMapSeriesTheme } from './interface';\nimport { SeriesData } from '../base/series-data';\nimport type { PanEventParam, ZoomEventParam } from '../../event/interface';\nimport { animationConfig, shouldDoMorph, userAnimationConfig } from '../../animation/utils';\nimport { DEFAULT_MARK_ANIMATION } from '../../animation/config';\nimport { BaseSeries } from '../base/base-series';\nimport { VChart } from '../../core/vchart';\nimport { PathMark } from '../../mark/path';\nimport { TextMark } from '../../mark/text';\n\nVChart.useMark([PathMark, TextMark]);\n\n// 注册语法元素\nregisterGrammar('projection', Projection, 'projections');\n\nexport class MapSeries extends GeoSeries<IMapSeriesSpec> {\n static readonly type: string = SeriesTypeEnum.map;\n type = SeriesTypeEnum.map;\n\n static readonly mark: SeriesMarkMap = {\n ...BaseSeries.mark,\n [SeriesMarkNameEnum.area]: { name: SeriesMarkNameEnum.area, type: MarkTypeEnum.path }\n };\n\n map!: string;\n\n protected _nameMap!: { [key: StringOrNumber]: StringOrNumber };\n getNameMap() {\n return this._nameMap;\n }\n\n protected _nameProperty: string = 'name';\n getNameProperty() {\n return this._nameProperty;\n }\n\n protected declare _theme: Maybe<IMapSeriesTheme>;\n\n private _areaCache: Map<string, { shape: string }> = new Map();\n\n private _pathMark: IPathMark;\n private _labelMark: ITextMark;\n\n setAttrFromSpec() {\n super.setAttrFromSpec();\n this.map = this._spec.map;\n this._nameMap = this._spec.nameMap;\n this._nameField = this._spec.nameField;\n this._valueField = this._spec.valueField;\n this._spec.nameProperty && (this._nameProperty = this._spec.nameProperty);\n if (!this.map) {\n this._option.onError(`map type '${this.map}' is not specified !`);\n }\n\n if (!geoSourceMap.get(this.map)) {\n this._option.onError(`'${this.map}' data is not registered !`);\n }\n }\n\n // data\n initData(): void {\n super.initData();\n\n registerDataSetInstanceTransform(this._dataSet, 'copyDataView', copyDataView);\n registerDataSetInstanceTransform(this._dataSet, 'map', map);\n registerDataSetInstanceTransform(this._dataSet, 'lookup', lookup);\n\n // 初始化地图数据\n const features = geoSourceMap.get(this.map);\n if (!features) {\n this._option.onError('no valid map data found!');\n }\n const mapData = new DataView(this._dataSet);\n\n mapData\n .parse([features], {\n type: 'dataview'\n })\n .transform({ type: 'copyDataView', options: { deep: true } })\n .transform({\n type: 'map',\n options: {\n nameMap: this._nameMap,\n nameProperty: this._nameProperty\n }\n })\n .transform({\n type: 'lookup',\n options: {\n from: () => this._data?.getLatestData(),\n key: 'name',\n fields: this._nameField,\n values: [this.nameField, this.valueField, this._seriesField ?? DEFAULT_DATA_SERIES_FIELD, DEFAULT_DATA_KEY],\n as: [this.nameField, this.valueField, this._seriesField ?? DEFAULT_DATA_SERIES_FIELD, DEFAULT_DATA_KEY]\n }\n });\n this._data?.getDataView().target.addListener('change', mapData.reRunAllTransform);\n this._mapViewData = new SeriesData(this._option, mapData);\n }\n\n // mark\n initMark() {\n this._pathMark = this._createMark(MapSeries.mark.area, {\n morph: shouldDoMorph(this._spec.animation, this._spec.morph, userAnimationConfig('area', this._spec)),\n defaultMorphElementKey: this.getDimensionField()[0],\n groupKey: this.getDimensionField()[0],\n isSeriesMark: true,\n skipBeforeLayouted: true,\n dataView: this._mapViewData.getDataView(),\n dataProductId: this._mapViewData.getProductId()\n }) as IPathMark;\n\n if (this._spec.label?.visible) {\n this._labelMark = this._createMark(MapSeries.mark.label, {\n // map zoom/scale need to be transformed in path.group\n // so label mark cannot be in the same groupMark\n parent: this.getRegion().getGroupMark(),\n skipBeforeLayouted: true,\n dataView: this._mapViewData.getDataView(),\n dataProductId: this._mapViewData.getProductId()\n }) as ITextMark;\n }\n }\n\n initMarkStyle() {\n const pathMark = this._pathMark;\n if (pathMark) {\n this.setMarkStyle(\n pathMark,\n {\n fill: (datum: any) => {\n if (isValid(datum[this._seriesField ?? DEFAULT_DATA_SERIES_FIELD])) {\n return (this._option.globalScale.getScale('color') ?? this.getDefaultColorScale()).scale(\n datum[this._seriesField ?? DEFAULT_DATA_SERIES_FIELD]\n );\n }\n return this._spec?.defaultFillColor;\n },\n path: this.getPath.bind(this)\n },\n 'normal',\n AttributeLevel.Series\n );\n\n pathMark.setPostProcess('fill', result => {\n if (!isValid(result)) {\n return this._spec.defaultFillColor;\n }\n return result;\n });\n\n this.setMarkStyle(\n pathMark,\n {\n smoothScale: true\n },\n 'normal',\n AttributeLevel.Built_In\n );\n this._trigger.registerMark(pathMark);\n this._tooltipHelper?.activeTriggerSet.mark.add(pathMark);\n }\n\n const labelMark = this._labelMark;\n if (labelMark) {\n this.setMarkStyle(labelMark, {\n text: (datum: Datum) => {\n return this._getDatumName(datum);\n },\n x: (datum: Datum) => this.dataToPosition(datum)?.x,\n y: (datum: Datum) => this.dataToPosition(datum)?.y\n });\n }\n }\n\n initAnimation() {\n this._pathMark.setAnimationConfig(\n animationConfig(DEFAULT_MARK_ANIMATION.path(), userAnimationConfig(SeriesMarkNameEnum.area, this._spec))\n );\n\n if (this._labelMark) {\n this._labelMark.setAnimationConfig(\n animationConfig(DEFAULT_MARK_ANIMATION.label(), userAnimationConfig(SeriesMarkNameEnum.label, this._spec))\n );\n }\n }\n\n protected initTooltip() {\n this._tooltipHelper = new MapSeriesTooltipHelper(this);\n }\n\n protected getPath(datum: any) {\n const area = this._areaCache.get(datum[DEFAULT_DATA_INDEX]);\n if (area) {\n return area.shape;\n }\n const shape = this._coordinateHelper?.shape(datum);\n this._areaCache.set(datum[DEFAULT_DATA_INDEX], {\n shape\n });\n return shape;\n }\n\n // life cycle\n onEvaluateEnd() {\n this._mapViewData.updateData();\n }\n\n getDimensionField(): string[] {\n return [this.nameField];\n }\n\n getMeasureField(): string[] {\n return [this.valueField];\n }\n\n release() {\n super.release();\n this._areaCache.clear();\n this._nameMap = {};\n this._trigger = this._mapViewData = null as any;\n }\n\n updateSpec(spec: any) {\n const originalSpec = this._originalSpec;\n const { map, nameMap, valueField, nameProperty } = originalSpec;\n const result = super.updateSpec(spec);\n if (\n spec?.map !== map ||\n spec?.nameMap !== nameMap ||\n spec?.valueField !== valueField ||\n spec?.nameProperty !== nameProperty\n ) {\n result.reRender = true;\n }\n return result;\n }\n\n handleZoom(e: ZoomEventParam) {\n const { scale, scaleCenter } = e;\n if (scale === 1) {\n return;\n }\n\n this.getMarksWithoutRoot().forEach(mark => {\n const vGrammarMark = mark.getProduct();\n\n if (!vGrammarMark || !vGrammarMark.elements || !vGrammarMark.elements.length) {\n return;\n }\n const elements = vGrammarMark.elements;\n\n if (mark.type === MarkTypeEnum.path) {\n vGrammarMark.group.getGroupGraphicItem().scale(scale, scale, scaleCenter);\n } else {\n // label Mark 的定位,需要通过 dataToPosition 来计算\n elements.forEach((el: IElement) => {\n const graphicItem = el.getGraphicItem();\n const datum = el.getDatum();\n const newPosition = this.dataToPosition(datum);\n if (newPosition && graphicItem) {\n graphicItem.translateTo(newPosition.x, newPosition.y);\n }\n });\n }\n });\n }\n\n handlePan(e: PanEventParam) {\n const { delta } = e;\n if (delta[0] === 0 && delta[1] === 0) {\n return;\n }\n\n this.getMarksWithoutRoot().forEach(mark => {\n const vGrammarMark = mark.getProduct();\n\n if (!vGrammarMark || !vGrammarMark.elements || !vGrammarMark.elements.length) {\n return;\n }\n const elements = vGrammarMark.elements;\n\n if (mark.type === MarkTypeEnum.path) {\n vGrammarMark.group.getGroupGraphicItem().translate(delta[0], delta[1]);\n } else {\n // label Mark 的定位,需要通过 dataToPosition 来计算\n elements.forEach((el: IElement, i: number) => {\n const graphicItem = el.getGraphicItem();\n const datum = el.getDatum();\n const newPosition = this.dataToPosition(datum);\n if (newPosition && graphicItem) {\n graphicItem.translateTo(newPosition.x, newPosition.y);\n }\n });\n }\n });\n }\n\n protected _getDatumCenter(datum: any): [number, number] {\n if (isValidNumber(datum.centroidX * datum.centroidY)) {\n return [datum.centroidX, datum.centroidY];\n }\n\n if (datum.properties?.center) {\n return datum.properties.center;\n }\n\n if (datum.properties?.centroid) {\n return datum.properties.centroid;\n }\n\n return [Number.NaN, Number.NaN];\n }\n\n protected _getDatumName(datum: any): string {\n if (datum[this.nameField]) {\n return datum[this.nameField];\n }\n if (datum.properties?.[this._nameProperty]) {\n if (this._spec.nameMap) {\n return this._spec.nameMap[datum.properties[this._nameProperty]] ?? '';\n }\n return datum.properties[this._nameProperty] ?? '';\n }\n return '';\n }\n\n dataToPositionX(data: any): number {\n this._option.onError('Method not implemented.');\n return 0;\n }\n dataToPositionY(data: any): number {\n this._option.onError('Method not implemented.');\n return 0;\n }\n\n viewDataUpdate(d: DataView): void {\n super.viewDataUpdate(d);\n this._mapViewData?.getDataView()?.reRunAllTransform();\n this._mapViewData?.updateData();\n }\n\n protected _getDataIdKey() {\n return DEFAULT_DATA_INDEX;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/series/map/map.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAEtD,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,gCAAgC,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE1D,OAAO,EAAE,cAAc,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAEvH,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAElE,OAAO,EAAE,UAAU,EAAE,MAAM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AChD,OAAO,CAAC,CAAC;IACX,CAAC;IACD,eAAe,CAAC,IAAS;QACvB,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,yBAAyB,CAAC,CAAC;QAChD,OAAO,CAAC,CAAC;IACX,CAAC;IAED,cAAc,CAAC,CAAW;;QACxB,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;QACxB,MAAA,MAAA,IAAI,CAAC,YAAY,0CAAE,WAAW,EAAE,0CAAE,iBAAiB,EAAE,CAAC;QACtD,MAAA,IAAI,CAAC,YAAY,0CAAE,UAAU,EAAE,CAAC;IAClC,CAAC;IAES,aAAa;QACrB,OAAO,kBAAkB,CAAC;IAC5B,CAAC;;AA1Ue,cAAI,GAAW,cAAc,CAAC,GAAG,CAAC;AAGlC,cAAI,mCACf,UAAU,CAAC,IAAI,KAClB,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,kBAAkB,CAAC,IAAI,EAAE,IAAI,EAAE,YAAY,CAAC,IAAI,EAAE,IACrF","file":"map.js","sourcesContent":["/* eslint-disable no-duplicate-imports */\nimport { MarkTypeEnum } from '../../mark/interface';\nimport { registerGrammar } from '@visactor/vgrammar';\nimport type { IElement } from '@visactor/vgrammar';\nimport { Projection } from '@visactor/vgrammar-projection';\nimport { DataView } from '@visactor/vdataset';\nimport type { IPathMark } from '../../mark/path';\nimport { geoSourceMap } from './geo-source';\nimport { lookup } from '../../data/transforms/lookup';\nimport type { Maybe, Datum, StringOrNumber } from '../../typings';\nimport { isValid, isValidNumber } from '../../util';\nimport { GeoSeries } from '../geo/geo';\nimport { map } from '../../data/transforms/map';\nimport { copyDataView } from '../../data/transforms/copy-data-view';\nimport { registerDataSetInstanceTransform } from '../../data/register';\nimport { MapSeriesTooltipHelper } from './tooltip-helper';\nimport type { ITextMark } from '../../mark/text';\nimport { AttributeLevel, DEFAULT_DATA_SERIES_FIELD, DEFAULT_DATA_KEY, DEFAULT_DATA_INDEX } from '../../constant/index';\nimport type { SeriesMarkMap } from '../interface';\nimport { SeriesMarkNameEnum, SeriesTypeEnum } from '../interface';\nimport type { IMapSeriesSpec, IMapSeriesTheme } from './interface';\nimport { SeriesData } from '../base/series-data';\nimport type { PanEventParam, ZoomEventParam } from '../../event/interface';\nimport { animationConfig, shouldDoMorph, userAnimationConfig } from '../../animation/utils';\nimport { DEFAULT_MARK_ANIMATION } from '../../animation/config';\nimport { BaseSeries } from '../base/base-series';\nimport { VChart } from '../../core/vchart';\nimport { PathMark } from '../../mark/path';\nimport { TextMark } from '../../mark/text';\n\nVChart.useMark([PathMark, TextMark]);\n\n// 注册语法元素\nregisterGrammar('projection', Projection, 'projections');\n\nexport class MapSeries extends GeoSeries<IMapSeriesSpec> {\n static readonly type: string = SeriesTypeEnum.map;\n type = SeriesTypeEnum.map;\n\n static readonly mark: SeriesMarkMap = {\n ...BaseSeries.mark,\n [SeriesMarkNameEnum.area]: { name: SeriesMarkNameEnum.area, type: MarkTypeEnum.path }\n };\n\n map!: string;\n\n protected _nameMap!: { [key: StringOrNumber]: StringOrNumber };\n getNameMap() {\n return this._nameMap;\n }\n\n protected _nameProperty: string = 'name';\n getNameProperty() {\n return this._nameProperty;\n }\n\n protected declare _theme: Maybe<IMapSeriesTheme>;\n\n private _areaCache: Map<string, { shape: string }> = new Map();\n\n private _pathMark: IPathMark;\n private _labelMark: ITextMark;\n\n setAttrFromSpec() {\n super.setAttrFromSpec();\n this.map = this._spec.map;\n this._nameMap = this._spec.nameMap;\n this._nameField = this._spec.nameField;\n this._valueField = this._spec.valueField;\n this._spec.nameProperty && (this._nameProperty = this._spec.nameProperty);\n if (!this.map) {\n this._option.onError(`map type '${this.map}' is not specified !`);\n }\n\n if (!geoSourceMap.get(this.map)) {\n this._option.onError(`'${this.map}' data is not registered !`);\n }\n }\n\n // data\n initData(): void {\n super.initData();\n\n registerDataSetInstanceTransform(this._dataSet, 'copyDataView', copyDataView);\n registerDataSetInstanceTransform(this._dataSet, 'map', map);\n registerDataSetInstanceTransform(this._dataSet, 'lookup', lookup);\n\n // 初始化地图数据\n const features = geoSourceMap.get(this.map);\n if (!features) {\n this._option.onError('no valid map data found!');\n }\n const mapData = new DataView(this._dataSet);\n\n mapData\n .parse([features], {\n type: 'dataview'\n })\n .transform({ type: 'copyDataView', options: { deep: true } })\n .transform({\n type: 'map',\n options: {\n nameMap: this._nameMap,\n nameProperty: this._nameProperty\n }\n })\n .transform({\n type: 'lookup',\n options: {\n from: () => this._data?.getLatestData(),\n key: 'name',\n fields: this._nameField,\n values: [this.nameField, this.valueField, this._seriesField ?? DEFAULT_DATA_SERIES_FIELD, DEFAULT_DATA_KEY],\n as: [this.nameField, this.valueField, this._seriesField ?? DEFAULT_DATA_SERIES_FIELD, DEFAULT_DATA_KEY]\n }\n });\n this._data?.getDataView().target.addListener('change', mapData.reRunAllTransform);\n this._mapViewData = new SeriesData(this._option, mapData);\n }\n\n // mark\n initMark() {\n this._pathMark = this._createMark(MapSeries.mark.area, {\n morph: shouldDoMorph(this._spec.animation, this._spec.morph, userAnimationConfig('area', this._spec)),\n defaultMorphElementKey: this.getDimensionField()[0],\n groupKey: this.getDimensionField()[0],\n isSeriesMark: true,\n skipBeforeLayouted: true,\n dataView: this._mapViewData.getDataView(),\n dataProductId: this._mapViewData.getProductId()\n }) as IPathMark;\n\n if (this._spec.label?.visible) {\n this._labelMark = this._createMark(MapSeries.mark.label, {\n // map zoom/scale need to be transformed in path.group\n // so label mark cannot be in the same groupMark\n parent: this.getRegion().getGroupMark(),\n skipBeforeLayouted: true,\n dataView: this._mapViewData.getDataView(),\n dataProductId: this._mapViewData.getProductId()\n }) as ITextMark;\n }\n }\n\n initMarkStyle() {\n const pathMark = this._pathMark;\n if (pathMark) {\n this.setMarkStyle(\n pathMark,\n {\n fill: (datum: any) => {\n if (isValid(datum[this._seriesField ?? DEFAULT_DATA_SERIES_FIELD])) {\n return (this._option.globalScale.getScale('color') ?? this.getDefaultColorScale()).scale(\n datum[this._seriesField ?? DEFAULT_DATA_SERIES_FIELD]\n );\n }\n return this._spec?.defaultFillColor;\n },\n path: this.getPath.bind(this)\n },\n 'normal',\n AttributeLevel.Series\n );\n\n pathMark.setPostProcess('fill', result => {\n if (!isValid(result)) {\n return this._spec.defaultFillColor;\n }\n return result;\n });\n\n this.setMarkStyle(\n pathMark,\n {\n smoothScale: true\n },\n 'normal',\n AttributeLevel.Built_In\n );\n this._trigger.registerMark(pathMark);\n this._tooltipHelper?.activeTriggerSet.mark.add(pathMark);\n }\n\n const labelMark = this._labelMark;\n if (labelMark) {\n this.setMarkStyle(labelMark, {\n text: (datum: Datum) => {\n return this._getDatumName(datum);\n },\n x: (datum: Datum) => this.dataToPosition(datum)?.x,\n y: (datum: Datum) => this.dataToPosition(datum)?.y\n });\n }\n }\n\n initAnimation() {\n this._pathMark.setAnimationConfig(\n animationConfig(DEFAULT_MARK_ANIMATION.path(), userAnimationConfig(SeriesMarkNameEnum.area, this._spec))\n );\n\n if (this._labelMark) {\n this._labelMark.setAnimationConfig(\n animationConfig(DEFAULT_MARK_ANIMATION.label(), userAnimationConfig(SeriesMarkNameEnum.label, this._spec))\n );\n }\n }\n\n protected initTooltip() {\n this._tooltipHelper = new MapSeriesTooltipHelper(this);\n }\n\n protected getPath(datum: any) {\n const area = this._areaCache.get(datum[DEFAULT_DATA_INDEX]);\n if (area) {\n return area.shape;\n }\n const shape = this._coordinateHelper?.shape(datum);\n this._areaCache.set(datum[DEFAULT_DATA_INDEX], {\n shape\n });\n return shape;\n }\n\n // life cycle\n onEvaluateEnd() {\n this._mapViewData.updateData();\n }\n\n getDimensionField(): string[] {\n return [this.nameField];\n }\n\n getMeasureField(): string[] {\n return [this.valueField];\n }\n\n release() {\n super.release();\n this._areaCache.clear();\n this._nameMap = {};\n this._trigger = this._mapViewData = null as any;\n }\n\n updateSpec(spec: any) {\n const originalSpec = this._originalSpec;\n const { map, nameMap, valueField, nameProperty } = originalSpec;\n const result = super.updateSpec(spec);\n if (\n spec?.map !== map ||\n spec?.nameMap !== nameMap ||\n spec?.valueField !== valueField ||\n spec?.nameProperty !== nameProperty\n ) {\n result.change = true;\n result.reRender = true;\n result.reMake = true;\n }\n return result;\n }\n\n handleZoom(e: ZoomEventParam) {\n const { scale, scaleCenter } = e;\n if (scale === 1) {\n return;\n }\n\n this.getMarksWithoutRoot().forEach(mark => {\n const vGrammarMark = mark.getProduct();\n\n if (!vGrammarMark || !vGrammarMark.elements || !vGrammarMark.elements.length) {\n return;\n }\n const elements = vGrammarMark.elements;\n\n if (mark.type === MarkTypeEnum.path) {\n vGrammarMark.group.getGroupGraphicItem().scale(scale, scale, scaleCenter);\n } else {\n // label Mark 的定位,需要通过 dataToPosition 来计算\n elements.forEach((el: IElement) => {\n const graphicItem = el.getGraphicItem();\n const datum = el.getDatum();\n const newPosition = this.dataToPosition(datum);\n if (newPosition && graphicItem) {\n graphicItem.translateTo(newPosition.x, newPosition.y);\n }\n });\n }\n });\n }\n\n handlePan(e: PanEventParam) {\n const { delta } = e;\n if (delta[0] === 0 && delta[1] === 0) {\n return;\n }\n\n this.getMarksWithoutRoot().forEach(mark => {\n const vGrammarMark = mark.getProduct();\n\n if (!vGrammarMark || !vGrammarMark.elements || !vGrammarMark.elements.length) {\n return;\n }\n const elements = vGrammarMark.elements;\n\n if (mark.type === MarkTypeEnum.path) {\n vGrammarMark.group.getGroupGraphicItem().translate(delta[0], delta[1]);\n } else {\n // label Mark 的定位,需要通过 dataToPosition 来计算\n elements.forEach((el: IElement, i: number) => {\n const graphicItem = el.getGraphicItem();\n const datum = el.getDatum();\n const newPosition = this.dataToPosition(datum);\n if (newPosition && graphicItem) {\n graphicItem.translateTo(newPosition.x, newPosition.y);\n }\n });\n }\n });\n }\n\n protected _getDatumCenter(datum: any): [number, number] {\n if (isValidNumber(datum.centroidX * datum.centroidY)) {\n return [datum.centroidX, datum.centroidY];\n }\n\n if (datum.properties?.center) {\n return datum.properties.center;\n }\n\n if (datum.properties?.centroid) {\n return datum.properties.centroid;\n }\n\n return [Number.NaN, Number.NaN];\n }\n\n protected _getDatumName(datum: any): string {\n if (datum[this.nameField]) {\n return datum[this.nameField];\n }\n if (datum.properties?.[this._nameProperty]) {\n if (this._spec.nameMap) {\n return this._spec.nameMap[datum.properties[this._nameProperty]] ?? '';\n }\n return datum.properties[this._nameProperty] ?? '';\n }\n return '';\n }\n\n dataToPositionX(data: any): number {\n this._option.onError('Method not implemented.');\n return 0;\n }\n dataToPositionY(data: any): number {\n this._option.onError('Method not implemented.');\n return 0;\n }\n\n viewDataUpdate(d: DataView): void {\n super.viewDataUpdate(d);\n this._mapViewData?.getDataView()?.reRunAllTransform();\n this._mapViewData?.updateData();\n }\n\n protected _getDataIdKey() {\n return DEFAULT_DATA_INDEX;\n }\n}\n"]}
|
|
@@ -58,6 +58,7 @@ export declare class BaseWordCloudSeries<T extends IBaseWordCloudSeriesSpec = IB
|
|
|
58
58
|
getStackValueField(): string;
|
|
59
59
|
setValueFieldToStack(): void;
|
|
60
60
|
setValueFieldToPercent(): void;
|
|
61
|
+
onLayoutEnd(ctx: any): void;
|
|
61
62
|
updateSpec(spec: any): {
|
|
62
63
|
change: boolean;
|
|
63
64
|
reMake: boolean;
|
|
@@ -126,7 +126,7 @@ export class BaseWordCloudSeries extends BaseSeries {
|
|
|
126
126
|
return 1 === colorList.length && (colorList = [ colorList[0], colorList[0] ]), datum => colorList[0];
|
|
127
127
|
}
|
|
128
128
|
compile() {
|
|
129
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23
|
|
129
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23;
|
|
130
130
|
super.compile();
|
|
131
131
|
const wordCloudTransforms = [], valueField = this._valueField, valueScale = new LinearScale, fontWeightRange = this._fontWeightRange, rotateAngles = this._rotateAngles, fontWeightField = this._fontWeightField, fillingRotateAngles = this._wordCloudShapeConfig.fillingRotateAngles;
|
|
132
132
|
if (valueField) {
|
|
@@ -150,14 +150,14 @@ export class BaseWordCloudSeries extends BaseSeries {
|
|
|
150
150
|
as: WORD_CLOUD_TEXT,
|
|
151
151
|
callback: this._spec.word.formatMethod
|
|
152
152
|
});
|
|
153
|
-
const textField = (null === (_c = this._spec.word) || void 0 === _c ? void 0 : _c.formatMethod) ? WORD_CLOUD_TEXT : this._nameField
|
|
153
|
+
const textField = (null === (_c = this._spec.word) || void 0 === _c ? void 0 : _c.formatMethod) ? WORD_CLOUD_TEXT : this._nameField;
|
|
154
154
|
this._isWordCloudShape ? wordCloudTransforms.push({
|
|
155
155
|
type: "wordcloudShape",
|
|
156
156
|
dataIndexKey: DEFAULT_DATA_KEY,
|
|
157
|
-
size: [
|
|
157
|
+
size: [ this._region.getLayoutRect().width, this._region.getLayoutRect().height ],
|
|
158
158
|
shape: this._maskShape,
|
|
159
159
|
text: {
|
|
160
|
-
field: (null === (
|
|
160
|
+
field: (null === (_k = this._spec.word) || void 0 === _k ? void 0 : _k.formatMethod) ? WORD_CLOUD_TEXT : this._nameField
|
|
161
161
|
},
|
|
162
162
|
fontSize: valueField ? {
|
|
163
163
|
field: valueField
|
|
@@ -165,42 +165,42 @@ export class BaseWordCloudSeries extends BaseSeries {
|
|
|
165
165
|
fontSizeRange: this._fontSizeRange,
|
|
166
166
|
padding: this._fontPadding,
|
|
167
167
|
rotateList: rotateAngles,
|
|
168
|
-
fontFamily: null !== (
|
|
168
|
+
fontFamily: null !== (_l = this._fontFamilyField) && void 0 !== _l ? _l : null === (_o = null === (_m = this._spec.word) || void 0 === _m ? void 0 : _m.style) || void 0 === _o ? void 0 : _o.fontFamily,
|
|
169
169
|
fontWeight: fontWeightField ? {
|
|
170
170
|
field: fontWeightField
|
|
171
171
|
} : valueField ? {
|
|
172
172
|
field: WORD_CLOUD_WEIGHT
|
|
173
173
|
} : null,
|
|
174
|
-
fontStyle: null !== (
|
|
175
|
-
fillingFontFamily: null !== (
|
|
174
|
+
fontStyle: null !== (_p = this._fontStyleField) && void 0 !== _p ? _p : null === (_r = null === (_q = this._spec.word) || void 0 === _q ? void 0 : _q.style) || void 0 === _r ? void 0 : _r.fontStyle,
|
|
175
|
+
fillingFontFamily: null !== (_t = null === (_s = this._wordCloudShapeConfig) || void 0 === _s ? void 0 : _s.fillingFontFamilyField) && void 0 !== _t ? _t : null === (_v = null === (_u = this._spec.word) || void 0 === _u ? void 0 : _u.style) || void 0 === _v ? void 0 : _v.fontFamily,
|
|
176
176
|
fillingPadding: this._fillingFontPadding,
|
|
177
|
-
fillingFontStyle: null !== (
|
|
178
|
-
fillingFontWeight: null !== (
|
|
177
|
+
fillingFontStyle: null !== (_x = null === (_w = this._wordCloudShapeConfig) || void 0 === _w ? void 0 : _w.fillingFontStyleField) && void 0 !== _x ? _x : null === (_z = null === (_y = this._spec.word) || void 0 === _y ? void 0 : _y.style) || void 0 === _z ? void 0 : _z.fontStyle,
|
|
178
|
+
fillingFontWeight: null !== (_1 = null === (_0 = this._wordCloudShapeConfig) || void 0 === _0 ? void 0 : _0.fillingFontWeightField) && void 0 !== _1 ? _1 : null === (_3 = null === (_2 = this._spec.word) || void 0 === _2 ? void 0 : _2.style) || void 0 === _3 ? void 0 : _3.fontWeight,
|
|
179
179
|
fillingRotateList: fillingRotateAngles,
|
|
180
|
-
fillingTimes: null === (
|
|
181
|
-
fillingXStep: null === (
|
|
182
|
-
fillingYStep: null === (
|
|
183
|
-
fillingXRatioStep: null === (
|
|
184
|
-
fillingYRatioStep: null === (
|
|
185
|
-
fillingInitialOpacity: null === (
|
|
186
|
-
fillingDeltaOpacity: null === (
|
|
187
|
-
fillingInitialFontSize: null === (
|
|
188
|
-
fillingDeltaFontSize: null === (
|
|
189
|
-
ratio: null === (
|
|
190
|
-
fillingRatio: null === (
|
|
191
|
-
removeWhiteBorder: null === (
|
|
192
|
-
textLayoutTimes: null === (
|
|
193
|
-
fontSizeShrinkFactor: null === (
|
|
194
|
-
stepFactor: null === (
|
|
195
|
-
layoutMode: null === (
|
|
196
|
-
importantWordCount: null === (
|
|
197
|
-
globalShinkLimit: null === (
|
|
198
|
-
fontSizeEnlargeFactor: null === (
|
|
199
|
-
fillingDeltaFontSizeFactor: null === (
|
|
180
|
+
fillingTimes: null === (_4 = this._wordCloudShapeConfig) || void 0 === _4 ? void 0 : _4.fillingTimes,
|
|
181
|
+
fillingXStep: null === (_5 = this._wordCloudShapeConfig) || void 0 === _5 ? void 0 : _5.fillingXStep,
|
|
182
|
+
fillingYStep: null === (_6 = this._wordCloudShapeConfig) || void 0 === _6 ? void 0 : _6.fillingYStep,
|
|
183
|
+
fillingXRatioStep: null === (_7 = this._wordCloudShapeConfig) || void 0 === _7 ? void 0 : _7.fillingXRatioStep,
|
|
184
|
+
fillingYRatioStep: null === (_8 = this._wordCloudShapeConfig) || void 0 === _8 ? void 0 : _8.fillingYRatioStep,
|
|
185
|
+
fillingInitialOpacity: null === (_9 = this._wordCloudShapeConfig) || void 0 === _9 ? void 0 : _9.fillingInitialOpacity,
|
|
186
|
+
fillingDeltaOpacity: null === (_10 = this._wordCloudShapeConfig) || void 0 === _10 ? void 0 : _10.fillingDeltaOpacity,
|
|
187
|
+
fillingInitialFontSize: null === (_11 = this._wordCloudShapeConfig) || void 0 === _11 ? void 0 : _11.fillingInitialFontSize,
|
|
188
|
+
fillingDeltaFontSize: null === (_12 = this._wordCloudShapeConfig) || void 0 === _12 ? void 0 : _12.fillingDeltaFontSize,
|
|
189
|
+
ratio: null === (_13 = this._wordCloudShapeConfig) || void 0 === _13 ? void 0 : _13.ratio,
|
|
190
|
+
fillingRatio: null === (_14 = this._wordCloudShapeConfig) || void 0 === _14 ? void 0 : _14.fillingRatio,
|
|
191
|
+
removeWhiteBorder: null === (_15 = this._wordCloudShapeConfig) || void 0 === _15 ? void 0 : _15.removeWhiteBorder,
|
|
192
|
+
textLayoutTimes: null === (_16 = this._wordCloudShapeConfig) || void 0 === _16 ? void 0 : _16.textLayoutTimes,
|
|
193
|
+
fontSizeShrinkFactor: null === (_17 = this._wordCloudShapeConfig) || void 0 === _17 ? void 0 : _17.fontSizeShrinkFactor,
|
|
194
|
+
stepFactor: null === (_18 = this._wordCloudShapeConfig) || void 0 === _18 ? void 0 : _18.stepFactor,
|
|
195
|
+
layoutMode: null === (_19 = this._wordCloudShapeConfig) || void 0 === _19 ? void 0 : _19.layoutMode,
|
|
196
|
+
importantWordCount: null === (_20 = this._wordCloudShapeConfig) || void 0 === _20 ? void 0 : _20.importantWordCount,
|
|
197
|
+
globalShinkLimit: null === (_21 = this._wordCloudShapeConfig) || void 0 === _21 ? void 0 : _21.globalShinkLimit,
|
|
198
|
+
fontSizeEnlargeFactor: null === (_22 = this._wordCloudShapeConfig) || void 0 === _22 ? void 0 : _22.fontSizeEnlargeFactor,
|
|
199
|
+
fillingDeltaFontSizeFactor: null === (_23 = this._wordCloudShapeConfig) || void 0 === _23 ? void 0 : _23.fillingDeltaFontSizeFactor
|
|
200
200
|
}) : (wordCloudTransforms.push({
|
|
201
201
|
type: "wordcloud",
|
|
202
202
|
layoutType: isTrueBrowser(this._option.mode) ? this._wordCloudConfig.layoutMode : "fast",
|
|
203
|
-
size: [
|
|
203
|
+
size: [ this._region.getLayoutRect().width, this._region.getLayoutRect().height ],
|
|
204
204
|
shape: this._maskShape,
|
|
205
205
|
dataIndexKey: DEFAULT_DATA_KEY,
|
|
206
206
|
text: {
|
|
@@ -214,13 +214,13 @@ export class BaseWordCloudSeries extends BaseSeries {
|
|
|
214
214
|
rotate: {
|
|
215
215
|
field: WORD_CLOUD_ANGLE
|
|
216
216
|
},
|
|
217
|
-
fontFamily: null !== (
|
|
217
|
+
fontFamily: null !== (_d = this._fontFamilyField) && void 0 !== _d ? _d : null === (_f = null === (_e = this._spec.word) || void 0 === _e ? void 0 : _e.style) || void 0 === _f ? void 0 : _f.fontFamily,
|
|
218
218
|
fontWeight: fontWeightField ? {
|
|
219
219
|
field: fontWeightField
|
|
220
220
|
} : valueField ? {
|
|
221
221
|
field: WORD_CLOUD_WEIGHT
|
|
222
222
|
} : null,
|
|
223
|
-
fontStyle: null !== (
|
|
223
|
+
fontStyle: null !== (_g = this._fontStyleField) && void 0 !== _g ? _g : null === (_j = null === (_h = this._spec.word) || void 0 === _h ? void 0 : _h.style) || void 0 === _j ? void 0 : _j.fontStyle,
|
|
224
224
|
randomVisible: this._random,
|
|
225
225
|
clip: "clip" === this._wordCloudConfig.drawOutOfBound,
|
|
226
226
|
shrink: this._wordCloudConfig.zoomToFit.shrink,
|
|
@@ -267,6 +267,9 @@ export class BaseWordCloudSeries extends BaseSeries {
|
|
|
267
267
|
}
|
|
268
268
|
setValueFieldToStack() {}
|
|
269
269
|
setValueFieldToPercent() {}
|
|
270
|
+
onLayoutEnd(ctx) {
|
|
271
|
+
super.onLayoutEnd(ctx), this.compile();
|
|
272
|
+
}
|
|
270
273
|
updateSpec(spec) {
|
|
271
274
|
const originalSpec = this._originalSpec, result = super.updateSpec(spec);
|
|
272
275
|
return isEqual(originalSpec, spec) || (result.reMake = !0, result.reCompile = !0),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/series/word-cloud/base.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAC7F,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAGpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,M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AC,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC,EAAE;YAChC,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC;YACrB,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC;YACxB,OAAO,MAAM,CAAC;SACf;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;;AAvYe,wBAAI,mCACf,UAAU,CAAC,IAAI,KAClB,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,kBAAkB,CAAC,IAAI,EAAE,IAAI,EAAE,YAAY,CAAC,IAAI,EAAE,EACrF,CAAC,kBAAkB,CAAC,WAAW,CAAC,EAAE,EAAE,IAAI,EAAE,kBAAkB,CAAC,WAAW,EAAE,IAAI,EAAE,YAAY,CAAC,IAAI,EAAE,IACnG","file":"base.js","sourcesContent":["/* eslint-disable no-duplicate-imports */\nimport type { IPadding } from '@visactor/vutils';\nimport { isEqual } from '@visactor/vutils';\nimport { isValid } from '@visactor/vutils';\nimport { AttributeLevel, DEFAULT_DATA_KEY, DEFAULT_DATA_SERIES_FIELD } from '../../constant';\nimport { MarkTypeEnum } from '../../mark/interface';\nimport type { ITextMark } from '../../mark/text';\nimport type { SeriesMarkMap } from '../interface';\nimport { SeriesMarkNameEnum } from '../interface';\nimport { isTrueBrowser } from '../../util';\nimport {\n DEFAULT_DRAW_OUT_OF_BOUND,\n DEFAULT_FONTSIZE_RANGE,\n DEFAULT_FONT_PADDING,\n DEFAULT_FONT_WEIGHT_RANGE,\n DEFAULT_MASK_SHAPE,\n DEFAULT_MIN_FONT_SIZE,\n DEFAULT_RANDOM,\n DEFAULT_ROTATE_ANGLES,\n DEFAULT_ZOOM_TO_FIT,\n SHAPE_TYPE\n} from './config';\nimport type {\n IWordCloudSeriesSpec,\n WordCloudConfigType,\n WordCloudShapeConfigType,\n WordCloudShapeType\n} from './interface';\nimport { registerWordCloudTransforms } from '@visactor/vgrammar-wordcloud';\nimport { registerWordCloudShapeTransforms } from '@visactor/vgrammar-wordcloud-shape';\nimport type { Datum, IPoint } from '../../typings';\nimport { DEFAULT_MARK_ANIMATION } from '../../animation/config';\nimport { animationConfig, userAnimationConfig } from '../../animation/utils';\nimport { LinearScale } from '@visactor/vscale';\nimport { extent } from '@visactor/vgrammar-util';\nimport {\n WORD_CLOUD_ANGLE,\n WORD_CLOUD_FILLING_ANGLE,\n WORD_CLOUD_TEXT,\n WORD_CLOUD_WEIGHT\n} from '../../constant/word-cloud';\nimport { getDataScheme } from '../../theme/color-scheme/util';\nimport type { ICompilableMark } from '../../compile/mark';\nimport { BaseSeries } from '../base/base-series';\nimport { ColorOrdinalScale } from '../../scale/color-ordinal-scale';\nimport { VChart } from '../../core/vchart';\nimport { TextMark } from '../../mark/text';\n\nVChart.useMark([TextMark]);\n\nregisterWordCloudTransforms();\nregisterWordCloudShapeTransforms();\n\nexport type IBaseWordCloudSeriesSpec = Omit<IWordCloudSeriesSpec, 'type'> & { type: string };\n\nexport class BaseWordCloudSeries<T extends IBaseWordCloudSeriesSpec = IBaseWordCloudSeriesSpec> extends BaseSeries<T> {\n static readonly mark: SeriesMarkMap = {\n ...BaseSeries.mark,\n [SeriesMarkNameEnum.word]: { name: SeriesMarkNameEnum.word, type: MarkTypeEnum.text },\n [SeriesMarkNameEnum.fillingWord]: { name: SeriesMarkNameEnum.fillingWord, type: MarkTypeEnum.text }\n };\n\n protected _nameField: string;\n protected _valueField?: string;\n setValueField(field: string) {\n if (isValid(field)) {\n this._valueField = field;\n this.setFontSizeRange(DEFAULT_FONTSIZE_RANGE);\n }\n }\n\n protected _fontFamilyField: string;\n protected _fontWeightField: string;\n protected _fontStyleField: string;\n protected _colorHexField: string;\n protected _colorMode: 'linear' | 'ordinal';\n protected _colorList: string[];\n protected _rotateAngles?: number[];\n protected _fontWeightRange?: [number, number];\n\n protected _fontSizeRange?: [number, number] = [DEFAULT_MIN_FONT_SIZE, DEFAULT_MIN_FONT_SIZE];\n setFontSizeRange(fontSizeRange: [number, number]) {\n if (isValid(fontSizeRange) && isValid(this._spec.valueField)) {\n this._fontSizeRange = fontSizeRange;\n }\n }\n\n protected _maskShape?: string | WordCloudShapeType;\n protected _isWordCloudShape: boolean = false;\n\n protected _keepAspect?: boolean;\n protected _random?: boolean;\n protected _fontPadding?: number;\n protected _fillingFontPadding?: number;\n protected _wordCloudConfig?: WordCloudConfigType;\n protected _wordCloudShapeConfig?: WordCloudShapeConfigType;\n\n protected _padding?: IPadding;\n\n /**\n * @override\n */\n setAttrFromSpec() {\n super.setAttrFromSpec();\n // series布局相关\n this._padding = this._option.getChart().padding;\n\n // 普通词云 & 形状词云 共有spec相关\n this._nameField = this._spec.nameField;\n this._fontFamilyField = this._spec.fontFamilyField;\n this._fontWeightField = this._spec.fontWeightField;\n this._fontStyleField = this._spec.fontStyleField;\n this._colorHexField = this._spec.colorHexField;\n this._colorMode = this._spec.colorMode ?? 'ordinal';\n this._colorList = this._spec.colorList;\n this.setValueField(this._spec.valueField);\n this._fontWeightRange = this._spec.fontWeightRange ?? DEFAULT_FONT_WEIGHT_RANGE;\n this._rotateAngles = this._spec.rotateAngles ?? DEFAULT_ROTATE_ANGLES;\n this.setFontSizeRange(this._spec.fontSizeRange);\n this._maskShape = this._spec.maskShape ?? DEFAULT_MASK_SHAPE;\n this._keepAspect = this._spec.keepAspect;\n this._random = this._spec.random ?? DEFAULT_RANDOM;\n this._fontPadding = this._spec?.word?.padding ?? this._theme?.wordCloud?.word?.padding ?? DEFAULT_FONT_PADDING;\n\n // 普通词云spec相关\n this._wordCloudConfig = {\n drawOutOfBound: DEFAULT_DRAW_OUT_OF_BOUND,\n layoutMode: 'default',\n zoomToFit: DEFAULT_ZOOM_TO_FIT,\n ...this._spec.wordCloudConfig\n };\n\n // 形状词云spec相关\n this._wordCloudShapeConfig = {\n fillingSeriesField: this.getSeriesField(),\n fillingRotateAngles: DEFAULT_ROTATE_ANGLES,\n layoutMode: 'default',\n ...this._spec?.wordCloudShapeConfig\n };\n this._fillingFontPadding =\n this._spec?.fillingWord?.padding ?? this._theme?.wordCloud?.fillingWord?.padding ?? DEFAULT_FONT_PADDING;\n\n this._isWordCloudShape = !SHAPE_TYPE.includes(this._maskShape);\n }\n\n protected _wordMark: ITextMark;\n protected _fillingWordMark: ITextMark;\n initMark(): void {\n this._wordMark = this._createMark(BaseWordCloudSeries.mark.word, {\n defaultMorphElementKey: this._seriesField,\n groupKey: this._seriesField,\n isSeriesMark: true\n }) as ITextMark;\n if (this._isWordCloudShape) {\n this._fillingWordMark = this._createMark(BaseWordCloudSeries.mark.fillingWord) as ITextMark;\n }\n }\n\n initMarkStyle() {\n const wordMark = this._wordMark;\n const fillingWordMark = this._fillingWordMark;\n const textField = this._spec.word?.formatMethod ? WORD_CLOUD_TEXT : this._nameField;\n if (wordMark) {\n this.setMarkStyle(\n wordMark,\n {\n fill: this._colorHexField\n ? (datum: Datum) => datum[this._colorHexField]\n : this.getWordColorAttribute(this._seriesField, false),\n text: (datum: Datum) => datum[textField],\n x: (datum: Datum) => datum.x,\n y: (datum: Datum) => datum.y,\n fontFamily: (datum: Datum) => datum.fontFamily,\n fontSize: (datum: Datum) => datum.fontSize,\n fontStyle: (datum: Datum) => datum.fontStyle,\n fontWeight: (datum: Datum) => datum.fontWeight,\n angle: (datum: Datum) => datum.angle,\n visible: (datum: Datum) => !datum.isFillingWord\n },\n 'normal',\n AttributeLevel.Series\n );\n }\n if (fillingWordMark) {\n this.setMarkStyle(\n fillingWordMark,\n {\n fill: this._wordCloudShapeConfig.fillingColorHexField\n ? (datum: Datum) => datum[this._wordCloudShapeConfig.fillingColorHexField]\n : this.getWordColorAttribute(this._wordCloudShapeConfig.fillingSeriesField, true),\n text: (datum: Datum) => datum[textField],\n x: (datum: Datum) => datum.x,\n y: (datum: Datum) => datum.y,\n fontFamily: (datum: Datum) => datum.fontFamily,\n fontSize: (datum: Datum) => datum.fontSize,\n fontStyle: (datum: Datum) => datum.fontStyle,\n fontWeight: (datum: Datum) => datum.fontWeight,\n angle: (datum: Datum) => datum.angle,\n visible: (datum: Datum) => datum.isFillingWord\n },\n 'normal',\n AttributeLevel.Series\n );\n }\n this._trigger.registerMark(wordMark);\n this._tooltipHelper?.activeTriggerSet.mark.add(wordMark);\n this._trigger.registerMark(fillingWordMark);\n this._tooltipHelper?.activeTriggerSet.mark.add(fillingWordMark);\n }\n\n initAnimation() {\n if (this._wordMark) {\n this._wordMark.setAnimationConfig(\n animationConfig(DEFAULT_MARK_ANIMATION.wordCloud(), userAnimationConfig(SeriesMarkNameEnum.word, this._spec))\n );\n }\n }\n\n protected getWordOrdinalColorScale(field: string, isFillingWord: boolean) {\n const colorList = isFillingWord ? this._wordCloudShapeConfig.fillingColorList : this._colorList;\n const colorDomain = field ? this.getViewData()?.latestData.map((datum: Datum) => datum[field]) : [];\n const colorRange =\n colorList ??\n this._option.globalScale.getScale('color')?.range() ??\n getDataScheme(this._option.getTheme().colorScheme, this.type as any);\n return new ColorOrdinalScale().domain(colorDomain).range?.(colorRange);\n }\n\n getWordColorAttribute(field: string, isFillingWord: boolean) {\n if (this._colorMode === 'ordinal') {\n return {\n scale: this.getWordOrdinalColorScale(field, isFillingWord),\n field: this._seriesField ?? DEFAULT_DATA_SERIES_FIELD\n };\n }\n // const valueScale = new LinearScale()\n // .domain(extent(this.getViewData()?.latestData.map((datum: Datum) => datum[field])), true)\n // .range([0, 1]);\n let colorList =\n (isFillingWord ? this._colorList : this._wordCloudShapeConfig.fillingColorList) ??\n this._option.globalScale.getScale('color').range();\n // 如果用户只输入了一个 color,无法构成 colorRange,则进行兜底\n if (colorList.length === 1) {\n colorList = [colorList[0], colorList[0]];\n }\n // 颜色插值 todo@chensiji\n // const interpolate = interpolateColors(colorList)\n // return (datum: Datum) => interpolate(valueScale.scale(datum[field]))\n return (datum: Datum) => colorList[0];\n }\n\n compile(): void {\n super.compile();\n\n const wordCloudTransforms: any[] = [];\n const valueField = this._valueField;\n const valueScale = new LinearScale();\n const fontWeightRange = this._fontWeightRange;\n const rotateAngles = this._rotateAngles;\n const fontWeightField = this._fontWeightField;\n const fillingRotateAngles = this._wordCloudShapeConfig.fillingRotateAngles;\n\n // fontWeight处理\n if (valueField) {\n const [minValue, maxValue] = extent(this.getViewData()?.latestData.map((datum: any) => datum[valueField]));\n valueScale.domain([minValue, maxValue], true).range(fontWeightRange);\n wordCloudTransforms.push({\n type: 'map',\n as: WORD_CLOUD_WEIGHT,\n callback: (datum: any) => {\n if (minValue === maxValue) {\n return valueScale.scale(maxValue);\n }\n return valueScale.scale(datum[valueField]);\n }\n });\n }\n\n // rotateAngles处理\n wordCloudTransforms.push({\n type: 'map',\n as: WORD_CLOUD_ANGLE,\n callback: () => {\n return rotateAngles[Math.floor(Math.random() * rotateAngles.length)];\n }\n });\n wordCloudTransforms.push({\n type: 'map',\n as: WORD_CLOUD_FILLING_ANGLE,\n callback: () => {\n return fillingRotateAngles[Math.floor(Math.random() * fillingRotateAngles.length)];\n }\n });\n\n // text fromat method 处理\n if (this._spec.word?.formatMethod) {\n wordCloudTransforms.push({\n type: 'map',\n as: WORD_CLOUD_TEXT,\n callback: this._spec.word.formatMethod\n });\n }\n\n const textField = this._spec.word?.formatMethod ? WORD_CLOUD_TEXT : this._nameField;\n\n const srView = this.getCompiler().getVGrammarView();\n // 词云 transform\n if (!this._isWordCloudShape) {\n wordCloudTransforms.push({\n type: 'wordcloud',\n // TIP: 非浏览器环境下,使用 fast 布局,否则会出现兼容问题\n layoutType: !isTrueBrowser(this._option.mode) ? 'fast' : this._wordCloudConfig.layoutMode,\n size: [\n srView.width() - this._padding?.left || 0 - this._padding?.right || 0,\n srView.height() - this._padding?.top || 0 - this._padding?.bottom || 0\n ],\n shape: this._maskShape,\n dataIndexKey: DEFAULT_DATA_KEY,\n text: { field: textField },\n fontSize: valueField ? { field: valueField } : this._fontSizeRange[0],\n fontSizeRange: this._fontSizeRange,\n padding: this._fontPadding,\n rotate: { field: WORD_CLOUD_ANGLE },\n fontFamily: this._fontFamilyField ?? this._spec.word?.style?.fontFamily,\n fontWeight: fontWeightField ? { field: fontWeightField } : valueField ? { field: WORD_CLOUD_WEIGHT } : null,\n fontStyle: this._fontStyleField ?? this._spec.word?.style?.fontStyle,\n\n randomVisible: this._random,\n clip: this._wordCloudConfig.drawOutOfBound === 'clip',\n shrink: this._wordCloudConfig.zoomToFit.shrink,\n enlarge: this._wordCloudConfig.zoomToFit.enlarge,\n minFontSize: this._wordCloudConfig.zoomToFit.fontSizeLimitMin,\n progressiveTime: this._wordCloudConfig.progressiveTime,\n progressiveStep: this._wordCloudConfig.progressiveStep\n });\n // 挂到mark的transform上\n (this._wordMark as ICompilableMark).getProduct().transform(wordCloudTransforms);\n }\n // 形状词云 transform\n else {\n wordCloudTransforms.push({\n type: 'wordcloudShape',\n // 形状词云中必须要传入dataIndexKey, 否则填充词无法绘制\n dataIndexKey: DEFAULT_DATA_KEY,\n\n size: [srView.width(), srView.height()],\n shape: this._maskShape,\n\n text: { field: this._spec.word?.formatMethod ? WORD_CLOUD_TEXT : this._nameField },\n fontSize: valueField ? { field: valueField } : this._fontSizeRange[0],\n fontSizeRange: this._fontSizeRange,\n padding: this._fontPadding,\n rotateList: rotateAngles,\n fontFamily: this._fontFamilyField ?? this._spec.word?.style?.fontFamily,\n fontWeight: fontWeightField ? { field: fontWeightField } : valueField ? { field: WORD_CLOUD_WEIGHT } : null,\n fontStyle: this._fontStyleField ?? this._spec.word?.style?.fontStyle,\n\n fillingFontFamily: this._wordCloudShapeConfig?.fillingFontFamilyField ?? this._spec.word?.style?.fontFamily,\n fillingPadding: this._fillingFontPadding,\n fillingFontStyle: this._wordCloudShapeConfig?.fillingFontStyleField ?? this._spec.word?.style?.fontStyle,\n fillingFontWeight: this._wordCloudShapeConfig?.fillingFontWeightField ?? this._spec.word?.style?.fontWeight, // 填充词fontWeight默认不跟随valueField\n fillingRotateList: fillingRotateAngles,\n\n fillingTimes: this._wordCloudShapeConfig?.fillingTimes,\n fillingXStep: this._wordCloudShapeConfig?.fillingXStep,\n fillingYStep: this._wordCloudShapeConfig?.fillingYStep,\n fillingXRatioStep: this._wordCloudShapeConfig?.fillingXRatioStep,\n fillingYRatioStep: this._wordCloudShapeConfig?.fillingYRatioStep,\n fillingInitialOpacity: this._wordCloudShapeConfig?.fillingInitialOpacity,\n fillingDeltaOpacity: this._wordCloudShapeConfig?.fillingDeltaOpacity,\n fillingInitialFontSize: this._wordCloudShapeConfig?.fillingInitialFontSize,\n fillingDeltaFontSize: this._wordCloudShapeConfig?.fillingDeltaFontSize,\n\n ratio: this._wordCloudShapeConfig?.ratio,\n fillingRatio: this._wordCloudShapeConfig?.fillingRatio,\n removeWhiteBorder: this._wordCloudShapeConfig?.removeWhiteBorder,\n textLayoutTimes: this._wordCloudShapeConfig?.textLayoutTimes,\n fontSizeShrinkFactor: this._wordCloudShapeConfig?.fontSizeShrinkFactor,\n stepFactor: this._wordCloudShapeConfig?.stepFactor,\n layoutMode: this._wordCloudShapeConfig?.layoutMode,\n importantWordCount: this._wordCloudShapeConfig?.importantWordCount,\n globalShinkLimit: this._wordCloudShapeConfig?.globalShinkLimit,\n fontSizeEnlargeFactor: this._wordCloudShapeConfig?.fontSizeEnlargeFactor,\n fillingDeltaFontSizeFactor: this._wordCloudShapeConfig?.fillingDeltaFontSizeFactor\n });\n }\n // 把transform挂载到data的product上\n this._data.getProduct().transform(wordCloudTransforms);\n }\n\n getStatisticFields() {\n const fields: { key: string; operations: Array<'max' | 'min' | 'values'> }[] = [];\n fields.push({ key: this._nameField, operations: ['values'] });\n fields.push({ key: this._valueField, operations: ['max', 'min'] });\n return fields;\n }\n dataToPosition(data: Datum): IPoint {\n return null;\n }\n dataToPositionX(data: any): number {\n return null;\n }\n dataToPositionY(data: any): number {\n return null;\n }\n dataToPositionZ(data: any): number {\n return null;\n }\n valueToPosition(value1: any, value2?: any): IPoint {\n return null;\n }\n setValueFieldToStackOffsetSilhouette(): void {\n // do nothing\n }\n\n getGroupFields(): string[] {\n // do nothing\n return [];\n }\n\n getStackGroupFields(): string[] {\n // do nothing\n return [];\n }\n\n getStackValueField(): string {\n // do nothing\n return '';\n }\n\n setValueFieldToStack(): void {\n // do nothing\n }\n\n setValueFieldToPercent(): void {\n //do nothing\n }\n\n updateSpec(spec: any) {\n const originalSpec = this._originalSpec;\n const result = super.updateSpec(spec);\n if (!isEqual(originalSpec, spec)) {\n result.reMake = true;\n result.reCompile = true;\n return result;\n }\n return result;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/series/word-cloud/base.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAC7F,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAGpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EACL,yBAAyB,EACzB,sBAAsB,EACtB,oBAAoB,EACpB,yBAAyB,EACzB,kBAAkB,EAClB,qBAAqB,EACrB,cAAc,EACd,qBAAqB,EACrB,mBAAmB,EACnB,UAAU,EACX,MAAM,UAAU,CAAC;AAOlB,OAAO,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC;AAEtF,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EACL,gBAAgB,EAChB,wBAAwB,EACxB,eAAe,EACf,iBAAiB,EAClB,MAAM,2BAA2B,CAAC;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IACd,CAAC;IACD,oCAAoC;IAEpC,CAAC;IAED,cAAc;QAEZ,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,mBAAmB;QAEjB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,kBAAkB;QAEhB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,oBAAoB;IAEpB,CAAC;IAED,sBAAsB;IAEtB,CAAC;IAED,WAAW,CAAC,GAAQ;QAClB,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QACvB,IAAI,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;IAED,UAAU,CAAC,IAAS;QAClB,MAAM,YAAY,GAAG,IAAI,CAAC,aAAa,CAAC;QACxC,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QACtC,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC,EAAE;YAChC,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC;YACrB,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC;YACxB,OAAO,MAAM,CAAC;SACf;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;;AAvYe,wBAAI,mCACf,UAAU,CAAC,IAAI,KAClB,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,kBAAkB,CAAC,IAAI,EAAE,IAAI,EAAE,YAAY,CAAC,IAAI,EAAE,EACrF,CAAC,kBAAkB,CAAC,WAAW,CAAC,EAAE,EAAE,IAAI,EAAE,kBAAkB,CAAC,WAAW,EAAE,IAAI,EAAE,YAAY,CAAC,IAAI,EAAE,IACnG","file":"base.js","sourcesContent":["/* eslint-disable no-duplicate-imports */\nimport type { IPadding } from '@visactor/vutils';\nimport { isEqual } from '@visactor/vutils';\nimport { isValid } from '@visactor/vutils';\nimport { AttributeLevel, DEFAULT_DATA_KEY, DEFAULT_DATA_SERIES_FIELD } from '../../constant';\nimport { MarkTypeEnum } from '../../mark/interface';\nimport type { ITextMark } from '../../mark/text';\nimport type { SeriesMarkMap } from '../interface';\nimport { SeriesMarkNameEnum } from '../interface';\nimport { isTrueBrowser } from '../../util';\nimport {\n DEFAULT_DRAW_OUT_OF_BOUND,\n DEFAULT_FONTSIZE_RANGE,\n DEFAULT_FONT_PADDING,\n DEFAULT_FONT_WEIGHT_RANGE,\n DEFAULT_MASK_SHAPE,\n DEFAULT_MIN_FONT_SIZE,\n DEFAULT_RANDOM,\n DEFAULT_ROTATE_ANGLES,\n DEFAULT_ZOOM_TO_FIT,\n SHAPE_TYPE\n} from './config';\nimport type {\n IWordCloudSeriesSpec,\n WordCloudConfigType,\n WordCloudShapeConfigType,\n WordCloudShapeType\n} from './interface';\nimport { registerWordCloudTransforms } from '@visactor/vgrammar-wordcloud';\nimport { registerWordCloudShapeTransforms } from '@visactor/vgrammar-wordcloud-shape';\nimport type { Datum, IPoint } from '../../typings';\nimport { DEFAULT_MARK_ANIMATION } from '../../animation/config';\nimport { animationConfig, userAnimationConfig } from '../../animation/utils';\nimport { LinearScale } from '@visactor/vscale';\nimport { extent } from '@visactor/vgrammar-util';\nimport {\n WORD_CLOUD_ANGLE,\n WORD_CLOUD_FILLING_ANGLE,\n WORD_CLOUD_TEXT,\n WORD_CLOUD_WEIGHT\n} from '../../constant/word-cloud';\nimport { getDataScheme } from '../../theme/color-scheme/util';\nimport type { ICompilableMark } from '../../compile/mark';\nimport { BaseSeries } from '../base/base-series';\nimport { ColorOrdinalScale } from '../../scale/color-ordinal-scale';\nimport { VChart } from '../../core/vchart';\nimport { TextMark } from '../../mark/text';\n\nVChart.useMark([TextMark]);\n\nregisterWordCloudTransforms();\nregisterWordCloudShapeTransforms();\n\nexport type IBaseWordCloudSeriesSpec = Omit<IWordCloudSeriesSpec, 'type'> & { type: string };\n\nexport class BaseWordCloudSeries<T extends IBaseWordCloudSeriesSpec = IBaseWordCloudSeriesSpec> extends BaseSeries<T> {\n static readonly mark: SeriesMarkMap = {\n ...BaseSeries.mark,\n [SeriesMarkNameEnum.word]: { name: SeriesMarkNameEnum.word, type: MarkTypeEnum.text },\n [SeriesMarkNameEnum.fillingWord]: { name: SeriesMarkNameEnum.fillingWord, type: MarkTypeEnum.text }\n };\n\n protected _nameField: string;\n protected _valueField?: string;\n setValueField(field: string) {\n if (isValid(field)) {\n this._valueField = field;\n this.setFontSizeRange(DEFAULT_FONTSIZE_RANGE);\n }\n }\n\n protected _fontFamilyField: string;\n protected _fontWeightField: string;\n protected _fontStyleField: string;\n protected _colorHexField: string;\n protected _colorMode: 'linear' | 'ordinal';\n protected _colorList: string[];\n protected _rotateAngles?: number[];\n protected _fontWeightRange?: [number, number];\n\n protected _fontSizeRange?: [number, number] = [DEFAULT_MIN_FONT_SIZE, DEFAULT_MIN_FONT_SIZE];\n setFontSizeRange(fontSizeRange: [number, number]) {\n if (isValid(fontSizeRange) && isValid(this._spec.valueField)) {\n this._fontSizeRange = fontSizeRange;\n }\n }\n\n protected _maskShape?: string | WordCloudShapeType;\n protected _isWordCloudShape: boolean = false;\n\n protected _keepAspect?: boolean;\n protected _random?: boolean;\n protected _fontPadding?: number;\n protected _fillingFontPadding?: number;\n protected _wordCloudConfig?: WordCloudConfigType;\n protected _wordCloudShapeConfig?: WordCloudShapeConfigType;\n\n protected _padding?: IPadding;\n\n /**\n * @override\n */\n setAttrFromSpec() {\n super.setAttrFromSpec();\n // series布局相关\n this._padding = this._option.getChart().padding;\n\n // 普通词云 & 形状词云 共有spec相关\n this._nameField = this._spec.nameField;\n this._fontFamilyField = this._spec.fontFamilyField;\n this._fontWeightField = this._spec.fontWeightField;\n this._fontStyleField = this._spec.fontStyleField;\n this._colorHexField = this._spec.colorHexField;\n this._colorMode = this._spec.colorMode ?? 'ordinal';\n this._colorList = this._spec.colorList;\n this.setValueField(this._spec.valueField);\n this._fontWeightRange = this._spec.fontWeightRange ?? DEFAULT_FONT_WEIGHT_RANGE;\n this._rotateAngles = this._spec.rotateAngles ?? DEFAULT_ROTATE_ANGLES;\n this.setFontSizeRange(this._spec.fontSizeRange);\n this._maskShape = this._spec.maskShape ?? DEFAULT_MASK_SHAPE;\n this._keepAspect = this._spec.keepAspect;\n this._random = this._spec.random ?? DEFAULT_RANDOM;\n this._fontPadding = this._spec?.word?.padding ?? this._theme?.wordCloud?.word?.padding ?? DEFAULT_FONT_PADDING;\n\n // 普通词云spec相关\n this._wordCloudConfig = {\n drawOutOfBound: DEFAULT_DRAW_OUT_OF_BOUND,\n layoutMode: 'default',\n zoomToFit: DEFAULT_ZOOM_TO_FIT,\n ...this._spec.wordCloudConfig\n };\n\n // 形状词云spec相关\n this._wordCloudShapeConfig = {\n fillingSeriesField: this.getSeriesField(),\n fillingRotateAngles: DEFAULT_ROTATE_ANGLES,\n layoutMode: 'default',\n ...this._spec?.wordCloudShapeConfig\n };\n this._fillingFontPadding =\n this._spec?.fillingWord?.padding ?? this._theme?.wordCloud?.fillingWord?.padding ?? DEFAULT_FONT_PADDING;\n\n this._isWordCloudShape = !SHAPE_TYPE.includes(this._maskShape);\n }\n\n protected _wordMark: ITextMark;\n protected _fillingWordMark: ITextMark;\n initMark(): void {\n this._wordMark = this._createMark(BaseWordCloudSeries.mark.word, {\n defaultMorphElementKey: this._seriesField,\n groupKey: this._seriesField,\n isSeriesMark: true\n }) as ITextMark;\n if (this._isWordCloudShape) {\n this._fillingWordMark = this._createMark(BaseWordCloudSeries.mark.fillingWord) as ITextMark;\n }\n }\n\n initMarkStyle() {\n const wordMark = this._wordMark;\n const fillingWordMark = this._fillingWordMark;\n const textField = this._spec.word?.formatMethod ? WORD_CLOUD_TEXT : this._nameField;\n if (wordMark) {\n this.setMarkStyle(\n wordMark,\n {\n fill: this._colorHexField\n ? (datum: Datum) => datum[this._colorHexField]\n : this.getWordColorAttribute(this._seriesField, false),\n text: (datum: Datum) => datum[textField],\n x: (datum: Datum) => datum.x,\n y: (datum: Datum) => datum.y,\n fontFamily: (datum: Datum) => datum.fontFamily,\n fontSize: (datum: Datum) => datum.fontSize,\n fontStyle: (datum: Datum) => datum.fontStyle,\n fontWeight: (datum: Datum) => datum.fontWeight,\n angle: (datum: Datum) => datum.angle,\n visible: (datum: Datum) => !datum.isFillingWord\n },\n 'normal',\n AttributeLevel.Series\n );\n }\n if (fillingWordMark) {\n this.setMarkStyle(\n fillingWordMark,\n {\n fill: this._wordCloudShapeConfig.fillingColorHexField\n ? (datum: Datum) => datum[this._wordCloudShapeConfig.fillingColorHexField]\n : this.getWordColorAttribute(this._wordCloudShapeConfig.fillingSeriesField, true),\n text: (datum: Datum) => datum[textField],\n x: (datum: Datum) => datum.x,\n y: (datum: Datum) => datum.y,\n fontFamily: (datum: Datum) => datum.fontFamily,\n fontSize: (datum: Datum) => datum.fontSize,\n fontStyle: (datum: Datum) => datum.fontStyle,\n fontWeight: (datum: Datum) => datum.fontWeight,\n angle: (datum: Datum) => datum.angle,\n visible: (datum: Datum) => datum.isFillingWord\n },\n 'normal',\n AttributeLevel.Series\n );\n }\n this._trigger.registerMark(wordMark);\n this._tooltipHelper?.activeTriggerSet.mark.add(wordMark);\n this._trigger.registerMark(fillingWordMark);\n this._tooltipHelper?.activeTriggerSet.mark.add(fillingWordMark);\n }\n\n initAnimation() {\n if (this._wordMark) {\n this._wordMark.setAnimationConfig(\n animationConfig(DEFAULT_MARK_ANIMATION.wordCloud(), userAnimationConfig(SeriesMarkNameEnum.word, this._spec))\n );\n }\n }\n\n protected getWordOrdinalColorScale(field: string, isFillingWord: boolean) {\n const colorList = isFillingWord ? this._wordCloudShapeConfig.fillingColorList : this._colorList;\n const colorDomain = field ? this.getViewData()?.latestData.map((datum: Datum) => datum[field]) : [];\n const colorRange =\n colorList ??\n this._option.globalScale.getScale('color')?.range() ??\n getDataScheme(this._option.getTheme().colorScheme, this.type as any);\n return new ColorOrdinalScale().domain(colorDomain).range?.(colorRange);\n }\n\n getWordColorAttribute(field: string, isFillingWord: boolean) {\n if (this._colorMode === 'ordinal') {\n return {\n scale: this.getWordOrdinalColorScale(field, isFillingWord),\n field: this._seriesField ?? DEFAULT_DATA_SERIES_FIELD\n };\n }\n // const valueScale = new LinearScale()\n // .domain(extent(this.getViewData()?.latestData.map((datum: Datum) => datum[field])), true)\n // .range([0, 1]);\n let colorList =\n (isFillingWord ? this._colorList : this._wordCloudShapeConfig.fillingColorList) ??\n this._option.globalScale.getScale('color').range();\n // 如果用户只输入了一个 color,无法构成 colorRange,则进行兜底\n if (colorList.length === 1) {\n colorList = [colorList[0], colorList[0]];\n }\n // 颜色插值 todo@chensiji\n // const interpolate = interpolateColors(colorList)\n // return (datum: Datum) => interpolate(valueScale.scale(datum[field]))\n return (datum: Datum) => colorList[0];\n }\n\n compile(): void {\n super.compile();\n const wordCloudTransforms: any[] = [];\n const valueField = this._valueField;\n const valueScale = new LinearScale();\n const fontWeightRange = this._fontWeightRange;\n const rotateAngles = this._rotateAngles;\n const fontWeightField = this._fontWeightField;\n const fillingRotateAngles = this._wordCloudShapeConfig.fillingRotateAngles;\n\n // fontWeight处理\n if (valueField) {\n const [minValue, maxValue] = extent(this.getViewData()?.latestData.map((datum: any) => datum[valueField]));\n valueScale.domain([minValue, maxValue], true).range(fontWeightRange);\n wordCloudTransforms.push({\n type: 'map',\n as: WORD_CLOUD_WEIGHT,\n callback: (datum: any) => {\n if (minValue === maxValue) {\n return valueScale.scale(maxValue);\n }\n return valueScale.scale(datum[valueField]);\n }\n });\n }\n\n // rotateAngles处理\n wordCloudTransforms.push({\n type: 'map',\n as: WORD_CLOUD_ANGLE,\n callback: () => {\n return rotateAngles[Math.floor(Math.random() * rotateAngles.length)];\n }\n });\n wordCloudTransforms.push({\n type: 'map',\n as: WORD_CLOUD_FILLING_ANGLE,\n callback: () => {\n return fillingRotateAngles[Math.floor(Math.random() * fillingRotateAngles.length)];\n }\n });\n\n // text fromat method 处理\n if (this._spec.word?.formatMethod) {\n wordCloudTransforms.push({\n type: 'map',\n as: WORD_CLOUD_TEXT,\n callback: this._spec.word.formatMethod\n });\n }\n\n const textField = this._spec.word?.formatMethod ? WORD_CLOUD_TEXT : this._nameField;\n\n // 词云 transform\n if (!this._isWordCloudShape) {\n wordCloudTransforms.push({\n type: 'wordcloud',\n // TIP: 非浏览器环境下,使用 fast 布局,否则会出现兼容问题\n layoutType: !isTrueBrowser(this._option.mode) ? 'fast' : this._wordCloudConfig.layoutMode,\n size: [this._region.getLayoutRect().width, this._region.getLayoutRect().height],\n shape: this._maskShape,\n dataIndexKey: DEFAULT_DATA_KEY,\n text: { field: textField },\n fontSize: valueField ? { field: valueField } : this._fontSizeRange[0],\n fontSizeRange: this._fontSizeRange,\n padding: this._fontPadding,\n rotate: { field: WORD_CLOUD_ANGLE },\n fontFamily: this._fontFamilyField ?? this._spec.word?.style?.fontFamily,\n fontWeight: fontWeightField ? { field: fontWeightField } : valueField ? { field: WORD_CLOUD_WEIGHT } : null,\n fontStyle: this._fontStyleField ?? this._spec.word?.style?.fontStyle,\n\n randomVisible: this._random,\n clip: this._wordCloudConfig.drawOutOfBound === 'clip',\n shrink: this._wordCloudConfig.zoomToFit.shrink,\n enlarge: this._wordCloudConfig.zoomToFit.enlarge,\n minFontSize: this._wordCloudConfig.zoomToFit.fontSizeLimitMin,\n progressiveTime: this._wordCloudConfig.progressiveTime,\n progressiveStep: this._wordCloudConfig.progressiveStep\n });\n // 挂到mark的transform上\n (this._wordMark as ICompilableMark).getProduct().transform(wordCloudTransforms);\n }\n // 形状词云 transform\n else {\n wordCloudTransforms.push({\n type: 'wordcloudShape',\n // 形状词云中必须要传入dataIndexKey, 否则填充词无法绘制\n dataIndexKey: DEFAULT_DATA_KEY,\n\n size: [this._region.getLayoutRect().width, this._region.getLayoutRect().height],\n shape: this._maskShape,\n\n text: { field: this._spec.word?.formatMethod ? WORD_CLOUD_TEXT : this._nameField },\n fontSize: valueField ? { field: valueField } : this._fontSizeRange[0],\n fontSizeRange: this._fontSizeRange,\n padding: this._fontPadding,\n rotateList: rotateAngles,\n fontFamily: this._fontFamilyField ?? this._spec.word?.style?.fontFamily,\n fontWeight: fontWeightField ? { field: fontWeightField } : valueField ? { field: WORD_CLOUD_WEIGHT } : null,\n fontStyle: this._fontStyleField ?? this._spec.word?.style?.fontStyle,\n\n fillingFontFamily: this._wordCloudShapeConfig?.fillingFontFamilyField ?? this._spec.word?.style?.fontFamily,\n fillingPadding: this._fillingFontPadding,\n fillingFontStyle: this._wordCloudShapeConfig?.fillingFontStyleField ?? this._spec.word?.style?.fontStyle,\n fillingFontWeight: this._wordCloudShapeConfig?.fillingFontWeightField ?? this._spec.word?.style?.fontWeight, // 填充词fontWeight默认不跟随valueField\n fillingRotateList: fillingRotateAngles,\n\n fillingTimes: this._wordCloudShapeConfig?.fillingTimes,\n fillingXStep: this._wordCloudShapeConfig?.fillingXStep,\n fillingYStep: this._wordCloudShapeConfig?.fillingYStep,\n fillingXRatioStep: this._wordCloudShapeConfig?.fillingXRatioStep,\n fillingYRatioStep: this._wordCloudShapeConfig?.fillingYRatioStep,\n fillingInitialOpacity: this._wordCloudShapeConfig?.fillingInitialOpacity,\n fillingDeltaOpacity: this._wordCloudShapeConfig?.fillingDeltaOpacity,\n fillingInitialFontSize: this._wordCloudShapeConfig?.fillingInitialFontSize,\n fillingDeltaFontSize: this._wordCloudShapeConfig?.fillingDeltaFontSize,\n\n ratio: this._wordCloudShapeConfig?.ratio,\n fillingRatio: this._wordCloudShapeConfig?.fillingRatio,\n removeWhiteBorder: this._wordCloudShapeConfig?.removeWhiteBorder,\n textLayoutTimes: this._wordCloudShapeConfig?.textLayoutTimes,\n fontSizeShrinkFactor: this._wordCloudShapeConfig?.fontSizeShrinkFactor,\n stepFactor: this._wordCloudShapeConfig?.stepFactor,\n layoutMode: this._wordCloudShapeConfig?.layoutMode,\n importantWordCount: this._wordCloudShapeConfig?.importantWordCount,\n globalShinkLimit: this._wordCloudShapeConfig?.globalShinkLimit,\n fontSizeEnlargeFactor: this._wordCloudShapeConfig?.fontSizeEnlargeFactor,\n fillingDeltaFontSizeFactor: this._wordCloudShapeConfig?.fillingDeltaFontSizeFactor\n });\n }\n // 把transform挂载到data的product上\n this._data.getProduct().transform(wordCloudTransforms);\n }\n\n getStatisticFields() {\n const fields: { key: string; operations: Array<'max' | 'min' | 'values'> }[] = [];\n fields.push({ key: this._nameField, operations: ['values'] });\n fields.push({ key: this._valueField, operations: ['max', 'min'] });\n return fields;\n }\n dataToPosition(data: Datum): IPoint {\n return null;\n }\n dataToPositionX(data: any): number {\n return null;\n }\n dataToPositionY(data: any): number {\n return null;\n }\n dataToPositionZ(data: any): number {\n return null;\n }\n valueToPosition(value1: any, value2?: any): IPoint {\n return null;\n }\n setValueFieldToStackOffsetSilhouette(): void {\n // do nothing\n }\n\n getGroupFields(): string[] {\n // do nothing\n return [];\n }\n\n getStackGroupFields(): string[] {\n // do nothing\n return [];\n }\n\n getStackValueField(): string {\n // do nothing\n return '';\n }\n\n setValueFieldToStack(): void {\n // do nothing\n }\n\n setValueFieldToPercent(): void {\n //do nothing\n }\n\n onLayoutEnd(ctx: any): void {\n super.onLayoutEnd(ctx);\n this.compile();\n }\n\n updateSpec(spec: any) {\n const originalSpec = this._originalSpec;\n const result = super.updateSpec(spec);\n if (!isEqual(originalSpec, spec)) {\n result.reMake = true;\n result.reCompile = true;\n return result;\n }\n return result;\n }\n}\n"]}
|
|
@@ -19,7 +19,7 @@ export class WordCloud3dSeries extends BaseWordCloudSeries {
|
|
|
19
19
|
super(...arguments), this.type = SeriesTypeEnum.wordCloud3d;
|
|
20
20
|
}
|
|
21
21
|
compile() {
|
|
22
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24
|
|
22
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24;
|
|
23
23
|
super.compile();
|
|
24
24
|
const wordCloudTransforms = [], valueField = this._valueField, valueScale = new LinearScale, fontWeightRange = this._fontWeightRange, rotateAngles = this._rotateAngles, fontWeightField = this._fontWeightField, fillingRotateAngles = this._wordCloudShapeConfig.fillingRotateAngles;
|
|
25
25
|
if (valueField) {
|
|
@@ -43,12 +43,12 @@ export class WordCloud3dSeries extends BaseWordCloudSeries {
|
|
|
43
43
|
as: WORD_CLOUD_TEXT,
|
|
44
44
|
callback: this._spec.word.formatMethod
|
|
45
45
|
});
|
|
46
|
-
const textField = (null === (_c = this._spec.word) || void 0 === _c ? void 0 : _c.formatMethod) ? WORD_CLOUD_TEXT : this._nameField
|
|
46
|
+
const textField = (null === (_c = this._spec.word) || void 0 === _c ? void 0 : _c.formatMethod) ? WORD_CLOUD_TEXT : this._nameField;
|
|
47
47
|
this._isWordCloudShape ? wordCloudTransforms.push({
|
|
48
48
|
type: "wordcloudShape",
|
|
49
|
-
size: [
|
|
49
|
+
size: [ this._region.getLayoutRect().width, this._region.getLayoutRect().height ],
|
|
50
50
|
shape: this._maskShape,
|
|
51
|
-
postProjection: null !== (
|
|
51
|
+
postProjection: null !== (_l = this._spec.postProjection) && void 0 !== _l ? _l : "StereographicProjection",
|
|
52
52
|
dataIndexKey: DEFAULT_DATA_KEY,
|
|
53
53
|
text: {
|
|
54
54
|
field: textField
|
|
@@ -59,45 +59,45 @@ export class WordCloud3dSeries extends BaseWordCloudSeries {
|
|
|
59
59
|
fontSizeRange: this._fontSizeRange,
|
|
60
60
|
padding: this._fontPadding,
|
|
61
61
|
rotateList: rotateAngles,
|
|
62
|
-
fontFamily: null !== (
|
|
62
|
+
fontFamily: null !== (_m = this._fontFamilyField) && void 0 !== _m ? _m : null === (_p = null === (_o = this._spec.word) || void 0 === _o ? void 0 : _o.style) || void 0 === _p ? void 0 : _p.fontFamily,
|
|
63
63
|
fontWeight: fontWeightField ? {
|
|
64
64
|
field: fontWeightField
|
|
65
65
|
} : valueField ? {
|
|
66
66
|
field: WORD_CLOUD_WEIGHT
|
|
67
67
|
} : null,
|
|
68
|
-
fontStyle: null !== (
|
|
68
|
+
fontStyle: null !== (_q = this._fontStyleField) && void 0 !== _q ? _q : null === (_s = null === (_r = this._spec.word) || void 0 === _r ? void 0 : _r.style) || void 0 === _s ? void 0 : _s.fontStyle,
|
|
69
69
|
depth_3d: this._spec.depth_3d,
|
|
70
|
-
fillingFontFamily: null !== (
|
|
70
|
+
fillingFontFamily: null !== (_u = null === (_t = this._wordCloudShapeConfig) || void 0 === _t ? void 0 : _t.fillingFontFamilyField) && void 0 !== _u ? _u : null === (_w = null === (_v = this._spec.word) || void 0 === _v ? void 0 : _v.style) || void 0 === _w ? void 0 : _w.fontFamily,
|
|
71
71
|
fillingPadding: this._fillingFontPadding,
|
|
72
|
-
fillingFontStyle: null !== (
|
|
73
|
-
fillingFontWeight: null !== (
|
|
72
|
+
fillingFontStyle: null !== (_y = null === (_x = this._wordCloudShapeConfig) || void 0 === _x ? void 0 : _x.fillingFontStyleField) && void 0 !== _y ? _y : null === (_0 = null === (_z = this._spec.word) || void 0 === _z ? void 0 : _z.style) || void 0 === _0 ? void 0 : _0.fontStyle,
|
|
73
|
+
fillingFontWeight: null !== (_2 = null === (_1 = this._wordCloudShapeConfig) || void 0 === _1 ? void 0 : _1.fillingFontWeightField) && void 0 !== _2 ? _2 : null === (_4 = null === (_3 = this._spec.word) || void 0 === _3 ? void 0 : _3.style) || void 0 === _4 ? void 0 : _4.fontWeight,
|
|
74
74
|
fillingRotateList: fillingRotateAngles,
|
|
75
|
-
fillingTimes: null === (
|
|
76
|
-
fillingXStep: null === (
|
|
77
|
-
fillingYStep: null === (
|
|
78
|
-
fillingXRatioStep: null === (
|
|
79
|
-
fillingYRatioStep: null === (
|
|
80
|
-
fillingInitialOpacity: null === (
|
|
81
|
-
fillingDeltaOpacity: null === (
|
|
82
|
-
fillingInitialFontSize: null === (
|
|
83
|
-
fillingDeltaFontSize: null === (
|
|
84
|
-
ratio: null === (
|
|
85
|
-
fillingRatio: null === (
|
|
86
|
-
removeWhiteBorder: null === (
|
|
87
|
-
textLayoutTimes: null === (
|
|
88
|
-
fontSizeShrinkFactor: null === (
|
|
89
|
-
stepFactor: null === (
|
|
90
|
-
layoutMode: null === (
|
|
91
|
-
importantWordCount: null === (
|
|
92
|
-
globalShinkLimit: null === (
|
|
93
|
-
fontSizeEnlargeFactor: null === (
|
|
94
|
-
fillingDeltaFontSizeFactor: null === (
|
|
75
|
+
fillingTimes: null === (_5 = this._wordCloudShapeConfig) || void 0 === _5 ? void 0 : _5.fillingTimes,
|
|
76
|
+
fillingXStep: null === (_6 = this._wordCloudShapeConfig) || void 0 === _6 ? void 0 : _6.fillingXStep,
|
|
77
|
+
fillingYStep: null === (_7 = this._wordCloudShapeConfig) || void 0 === _7 ? void 0 : _7.fillingYStep,
|
|
78
|
+
fillingXRatioStep: null === (_8 = this._wordCloudShapeConfig) || void 0 === _8 ? void 0 : _8.fillingXRatioStep,
|
|
79
|
+
fillingYRatioStep: null === (_9 = this._wordCloudShapeConfig) || void 0 === _9 ? void 0 : _9.fillingYRatioStep,
|
|
80
|
+
fillingInitialOpacity: null === (_10 = this._wordCloudShapeConfig) || void 0 === _10 ? void 0 : _10.fillingInitialOpacity,
|
|
81
|
+
fillingDeltaOpacity: null === (_11 = this._wordCloudShapeConfig) || void 0 === _11 ? void 0 : _11.fillingDeltaOpacity,
|
|
82
|
+
fillingInitialFontSize: null === (_12 = this._wordCloudShapeConfig) || void 0 === _12 ? void 0 : _12.fillingInitialFontSize,
|
|
83
|
+
fillingDeltaFontSize: null === (_13 = this._wordCloudShapeConfig) || void 0 === _13 ? void 0 : _13.fillingDeltaFontSize,
|
|
84
|
+
ratio: null === (_14 = this._wordCloudShapeConfig) || void 0 === _14 ? void 0 : _14.ratio,
|
|
85
|
+
fillingRatio: null === (_15 = this._wordCloudShapeConfig) || void 0 === _15 ? void 0 : _15.fillingRatio,
|
|
86
|
+
removeWhiteBorder: null === (_16 = this._wordCloudShapeConfig) || void 0 === _16 ? void 0 : _16.removeWhiteBorder,
|
|
87
|
+
textLayoutTimes: null === (_17 = this._wordCloudShapeConfig) || void 0 === _17 ? void 0 : _17.textLayoutTimes,
|
|
88
|
+
fontSizeShrinkFactor: null === (_18 = this._wordCloudShapeConfig) || void 0 === _18 ? void 0 : _18.fontSizeShrinkFactor,
|
|
89
|
+
stepFactor: null === (_19 = this._wordCloudShapeConfig) || void 0 === _19 ? void 0 : _19.stepFactor,
|
|
90
|
+
layoutMode: null === (_20 = this._wordCloudShapeConfig) || void 0 === _20 ? void 0 : _20.layoutMode,
|
|
91
|
+
importantWordCount: null === (_21 = this._wordCloudShapeConfig) || void 0 === _21 ? void 0 : _21.importantWordCount,
|
|
92
|
+
globalShinkLimit: null === (_22 = this._wordCloudShapeConfig) || void 0 === _22 ? void 0 : _22.globalShinkLimit,
|
|
93
|
+
fontSizeEnlargeFactor: null === (_23 = this._wordCloudShapeConfig) || void 0 === _23 ? void 0 : _23.fontSizeEnlargeFactor,
|
|
94
|
+
fillingDeltaFontSizeFactor: null === (_24 = this._wordCloudShapeConfig) || void 0 === _24 ? void 0 : _24.fillingDeltaFontSizeFactor
|
|
95
95
|
}) : (wordCloudTransforms.push({
|
|
96
96
|
type: "wordcloud",
|
|
97
97
|
layoutType: this._wordCloudConfig.layoutMode,
|
|
98
|
-
size: [
|
|
98
|
+
size: [ this._region.getLayoutRect().width, this._region.getLayoutRect().height ],
|
|
99
99
|
shape: this._maskShape,
|
|
100
|
-
postProjection: null !== (
|
|
100
|
+
postProjection: null !== (_d = this._spec.postProjection) && void 0 !== _d ? _d : "StereographicProjection",
|
|
101
101
|
dataIndexKey: DEFAULT_DATA_KEY,
|
|
102
102
|
text: {
|
|
103
103
|
field: textField
|
|
@@ -110,13 +110,13 @@ export class WordCloud3dSeries extends BaseWordCloudSeries {
|
|
|
110
110
|
rotate: {
|
|
111
111
|
field: WORD_CLOUD_ANGLE
|
|
112
112
|
},
|
|
113
|
-
fontFamily: null !== (
|
|
113
|
+
fontFamily: null !== (_e = this._fontFamilyField) && void 0 !== _e ? _e : null === (_g = null === (_f = this._spec.word) || void 0 === _f ? void 0 : _f.style) || void 0 === _g ? void 0 : _g.fontFamily,
|
|
114
114
|
fontWeight: fontWeightField ? {
|
|
115
115
|
field: fontWeightField
|
|
116
116
|
} : valueField ? {
|
|
117
117
|
field: WORD_CLOUD_WEIGHT
|
|
118
118
|
} : null,
|
|
119
|
-
fontStyle: null !== (
|
|
119
|
+
fontStyle: null !== (_h = this._fontStyleField) && void 0 !== _h ? _h : null === (_k = null === (_j = this._spec.word) || void 0 === _j ? void 0 : _j.style) || void 0 === _k ? void 0 : _k.fontStyle,
|
|
120
120
|
depth_3d: this._spec.depth_3d,
|
|
121
121
|
randomVisible: this._random,
|
|
122
122
|
clip: "clip" === this._wordCloudConfig.drawOutOfBound,
|