@univerjs-pro/engine-chart 1.5.2 → 1.6.0
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/lib/cjs/facade.js +1 -1
- package/lib/cjs/index.js +40 -40
- package/lib/es/facade.js +1 -1
- package/lib/es/index.js +40 -40
- package/lib/facade.js +1 -1
- package/lib/index.js +40 -40
- package/lib/types/chart-3d/adapters/axes.d.ts +1 -1
- package/lib/types/chart-3d/adapters/element-events.d.ts +2 -1
- package/lib/types/chart-3d/adapters/render-input.d.ts +2 -2
- package/lib/types/chart-3d/adapters/transform.d.ts +2 -0
- package/lib/types/chart-3d/core/types.d.ts +1 -0
- package/lib/types/chart-3d/runtime/export-three-d-chart-image.d.ts +3 -0
- package/lib/types/chart-3d/runtime/three-d-chart-render-engine.d.ts +10 -0
- package/lib/types/chart-3d/{adapters/render-instance.d.ts → runtime/three-d-chart-render-instance.d.ts} +4 -4
- package/lib/types/chart-3d/runtime/types.d.ts +23 -0
- package/lib/types/chart-3d/{adapters/webgl-renderer.d.ts → runtime/webgl-scene-renderer.d.ts} +7 -4
- package/lib/types/chart-3d/webgl/chart-element-outline-item.d.ts +28 -0
- package/lib/types/chart-3d/webgl/draw-data.d.ts +4 -1
- package/lib/types/chart-3d/webgl/program.d.ts +1 -0
- package/lib/types/chart-3d/webgl/renderer.d.ts +6 -2
- package/lib/types/chart-3d/webgl/stroke.d.ts +3 -2
- package/lib/types/chart-builder/chart-types.d.ts +3 -1
- package/lib/types/chart-builder/configuration/radar.d.ts +3 -0
- package/lib/types/chart-element-interaction/chart-element-event.d.ts +28 -0
- package/lib/types/{models/chart-render/edit-overlay/resolve-chart-element-hit-layout.d.ts → chart-element-interaction/chart-element-hit-layout.d.ts} +4 -5
- package/lib/types/chart-element-interaction/chart-element-outline-controller.d.ts +24 -0
- package/lib/types/chart-element-interaction/geometry.d.ts +15 -0
- package/lib/types/chart-element-interaction/style.d.ts +4 -0
- package/lib/types/chart-element-interaction/three-d/types.d.ts +3 -0
- package/lib/types/{models/chart-render/edit-overlay/chart-element-edit-overlay.d.ts → chart-element-interaction/two-d/zrender-chart-element-outline.d.ts} +5 -7
- package/lib/types/chart-element-interaction/types.d.ts +6 -0
- package/lib/types/facade/builders/f-radar-chart-builder.d.ts +30 -1
- package/lib/types/index.d.ts +9 -2
- package/lib/types/models/chart-render/axes/chart-element-axis-id.d.ts +7 -4
- package/lib/types/models/chart-render/converter/render-spec-operators/trend-line/trendline-util.d.ts +9 -9
- package/lib/types/models/chart-render/converter/render-spec-operators/value-axis-scale.d.ts +0 -7
- package/lib/types/models/chart-render/echart-render-model/echart-render-engine.d.ts +13 -8
- package/lib/types/models/chart-render/echart-render-model/echart-render-model.d.ts +4 -1
- package/lib/types/models/common/constants/default-chart-style.d.ts +5 -1
- package/lib/types/plugin.d.ts +1 -1
- package/lib/types/source/chart-data-source-runtime.service.d.ts +55 -0
- package/lib/types/source/referenced-chart-data-source-binding.d.ts +23 -0
- package/lib/types/source/referenced-chart-data-source.d.ts +6 -0
- package/lib/types/source/resource-ref-chart-data-source.adapter.d.ts +22 -0
- package/lib/types/types.d.ts +52 -17
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +40 -40
- package/package.json +8 -7
- package/lib/types/chart-3d/adapters/echarts-adapter.d.ts +0 -10
- package/lib/types/chart-3d/adapters/export-image.d.ts +0 -2
- package/lib/types/chart-3d/adapters/types.d.ts +0 -40
- package/lib/types/models/chart-render/edit-overlay/palette.d.ts +0 -2
- package/lib/types/models/chart-render/edit-overlay/types.d.ts +0 -20
package/lib/cjs/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("@univerjs-pro/engine-chart"),t=require("@univerjs/core"),n=require("@univerjs/core/facade");function r(t){return t.forEach(t=>(0,e.setCategoryField)(t)),{mapping:{categoryIndexes:[...t]}}}function i(){return{mapping:{categoryIndexes:null}}}function a(e){"@babel/helpers - typeof";return a=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},a(e)}function o(e,t){if(a(e)!=`object`||!e)return e;var n;if(typeof Symbol<`u`&&(n=e[Symbol.toPrimitive])!==void 0){var r=n.call(e,t||`default`);if(a(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function s(e){var t=o(e,`string`);return a(t)==`symbol`?t:t+``}function c(e,t,n){return(t=s(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var l=class{constructor(e){this._context=e,c(this,`_builder`,void 0),c(this,`_info`,void 0),this._builder=e.builder,this._info=e.info}setSource(e){return this._info.dataSource=t.Tools.deepClone(this._context.normalizeSource(e)),this}setAbsolutePosition(e,t){return this._info.position={x:e,y:t},this}setSize(e,t){return this._info.size={width:e,height:t},this}build(){if(this._context.requireSource&&this._info.dataSource===void 0)throw Error(`Chart data source is required. Please call setSource() before build().`);let e=t.Tools.deepClone(this._info);return e.config=this._context.createConfig(this._builder),e}_record(e){return this._builder.mergePending(e),this}_describe(){return this._builder.describe()}setTitle(t){return this._builder.apply((0,e.setTitle)(t)),this}clearTitle(){return this._builder.apply((0,e.clearTitle)()),this}setSubtitle(t){return this._builder.apply((0,e.setSubtitle)(t)),this}clearSubtitle(){return this._builder.apply((0,e.clearSubtitle)()),this}setLegend(t){return this._builder.apply((0,e.setLegend)(t)),this}clearLegend(){return this._builder.apply((0,e.clearLegend)()),this}setTheme(t){return this._builder.apply((0,e.setTheme)(t)),this}clearTheme(){return this._builder.apply((0,e.clearTheme)()),this}setPalette(t){return this._builder.apply((0,e.setPalette)(t)),this}clearPalette(){return this._builder.apply((0,e.clearPalette)()),this}setAppearance(t){return this._builder.apply((0,e.setAppearance)(t)),this}clearAppearance(t){return this._builder.apply((0,e.clearAppearance)(t)),this}setAutoGradientFill(t){return this._builder.apply((0,e.setAutoGradientFill)(t)),this}resetAutoGradientFill(){return this._builder.apply((0,e.resetAutoGradientFill)()),this}setInvalidValueStrategy(t){return this._builder.apply((0,e.setInvalidValueStrategy)(t)),this}resetInvalidValueStrategy(){return this._builder.apply((0,e.resetInvalidValueStrategy)()),this}setCategoryField(t){return this._builder.apply((0,e.setCategoryField)(t)),this}setSeriesToCategory(t){return this._builder.mergePending({mapping:{seriesToCategory:(0,e.canonicalizeChartContext)({seriesToCategory:t}).seriesToCategory}}),this}setCategoryFields(e){return this._builder.mergePending(r(e)),this}clearCategoryFields(){return this._builder.mergePending(i()),this}setMultiLevelCategoryAxis(e){return this._builder.mergePending({mapping:{multiLevelCategoryAxis:e}}),this}clearCategoryField(){return this._builder.apply((0,e.clearCategoryField)()),this}setValueFields(t){return this._builder.apply((0,e.setValueFields)(t)),this}clearValueFields(){return this._builder.apply((0,e.clearValueFields)()),this}setAggregation(t){return this._builder.apply((0,e.setAggregation)(t)),this}clearAggregation(t){return this._builder.apply((0,e.clearAggregation)(t)),this}},u=class extends l{setMarkLines(t){return this._builder.apply((0,e.setMarkLines)(t)),this}clearMarkLines(){return this._builder.apply((0,e.clearMarkLines)()),this}setXAxis(t){return this._builder.apply((0,e.setXAxis)(t)),this}clearXAxis(t){return this._builder.apply((0,e.clearXAxis)(t)),this}setYAxis(t){return this._builder.apply((0,e.setYAxis)(t)),this}clearYAxis(t){return this._builder.apply((0,e.clearYAxis)(t)),this}setRightYAxis(t){return this._builder.apply((0,e.setRightYAxis)(t)),this}clearRightYAxis(t){return this._builder.apply((0,e.clearRightYAxis)(t)),this}setXAxisTitle(t){return this._builder.apply((0,e.setAxisTitle)(e.ChartAxisName.X,t)),this}clearXAxisTitle(){return this._builder.apply((0,e.clearAxisTitle)(e.ChartAxisName.X)),this}setYAxisTitle(t){return this._builder.apply((0,e.setAxisTitle)(e.ChartAxisName.Y,t)),this}clearYAxisTitle(){return this._builder.apply((0,e.clearAxisTitle)(e.ChartAxisName.Y)),this}setRightYAxisTitle(t){return this._builder.apply((0,e.setAxisTitle)(e.ChartAxisName.RightY,t)),this}clearRightYAxisTitle(){return this._builder.apply((0,e.clearAxisTitle)(e.ChartAxisName.RightY)),this}setUseDateAxis(t){return this._builder.apply((0,e.setUseDateAxis)(t)),this}resetUseDateAxis(){return this._builder.apply((0,e.resetUseDateAxis)()),this}},d=class extends u{setErrorBars(e){return this._builder.mergePending({errorBars:[...e]}),this}clearErrorBars(){return this._builder.mergePending({errorBars:[]}),this}setBar(t){return this._builder.apply((0,e.setBar)(t)),this}clearBar(){return this._builder.apply((0,e.clearBar)()),this}setSeries(t,n){return this._builder.apply((0,e.setSeries)(t,n)),this}clearSeries(t,n){return this._builder.apply((0,e.clearSeries)(t,n)),this}clearAllSeriesOverrides(){return this._builder.apply((0,e.clearAllSeriesOverrides)()),this}setAllSeriesStyle(t){return this._builder.apply((0,e.setAllSeriesStyle)(t)),this}clearAllSeriesStyle(t){return this._builder.apply((0,e.clearAllSeriesStyle)(t)),this}setTrendline(t,n){return this._builder.apply((0,e.setTrendline)(t,n)),this}removeTrendline(t,n){return this._builder.apply((0,e.removeTrendline)(this._builder.describe(),t,n)),this}clearTrendlines(t){return this._builder.apply((0,e.clearTrendlines)(this._builder.describe(),t)),this}setAxisPointer(t){return this._builder.apply((0,e.setAxisPointer)(t)),this}clearAxisPointer(t){return this._builder.apply((0,e.clearAxisPointer)(t)),this}},f=class extends d{setAreaLineStyle(t){return this._builder.apply((0,e.setAreaLineStyle)(t)),this}clearAreaLineStyle(){return this._builder.apply((0,e.clearAreaLineStyle)()),this}},p=class extends l{setThreeD(t){return this._builder.apply((0,e.setThreeD)(t)),this}clearThreeD(){return this._builder.apply((0,e.clearThreeD)()),this}},m=class extends p{setXAxis(t){return this._builder.apply((0,e.setXAxis)(t)),this}clearXAxis(t){return this._builder.apply((0,e.clearXAxis)(t)),this}setYAxis(t){return this._builder.apply((0,e.setYAxis)(t)),this}clearYAxis(t){return this._builder.apply((0,e.clearYAxis)(t)),this}setDepthAxis(t){return this._builder.apply((0,e.setDepthAxis)(t)),this}clearDepthAxis(){return this._builder.apply((0,e.clearDepthAxis)()),this}setSeries(t,n){return this._builder.apply((0,e.setSeries)(t,n)),this}clearSeries(t){return this._builder.apply((0,e.clearSeries)(t)),this}setAllSeriesStyle(t){return this._builder.apply((0,e.setAllSeriesStyle)(t)),this}clearAllSeriesStyle(){return this._builder.apply((0,e.clearAllSeriesStyle)()),this}clearAllSeriesOverrides(){return this._builder.apply((0,e.clearAllSeriesOverrides)()),this}},h=class extends m{setAreaLineStyle(t){return this._builder.apply((0,e.setAreaLineStyle)(t)),this}clearAreaLineStyle(){return this._builder.apply((0,e.clearAreaLineStyle)()),this}},g=class extends d{},_=class extends d{setBubbleMapping(t){return this._builder.apply((0,e.setBubbleMapping)(t)),this}clearBubbleMapping(){return this._builder.apply((0,e.clearBubbleMapping)()),this}},v=class extends u{setCandlestickFields(t){return this._builder.apply((0,e.setCandlestickFields)(t)),this}clearCandlestickFields(){return this._builder.apply((0,e.clearCandlestickFields)()),this}setRisingStyle(t){return this._builder.apply((0,e.setRisingStyle)(t)),this}clearRisingStyle(){return this._builder.apply((0,e.clearRisingStyle)()),this}setFallingStyle(t){return this._builder.apply((0,e.setFallingStyle)(t)),this}clearFallingStyle(){return this._builder.apply((0,e.clearFallingStyle)()),this}setDojiStyle(t){return this._builder.apply((0,e.setDojiStyle)(t)),this}clearDojiStyle(){return this._builder.apply((0,e.clearDojiStyle)()),this}setCandleWidth(t){return this._builder.apply((0,e.setCandleWidth)(t)),this}resetCandleWidth(){return this._builder.apply((0,e.resetCandleWidth)()),this}setHighLowLineStyle(e){return this._builder.mergePending({candlestick:{highLowLine:e}}),this}clearHighLowLineStyle(){return this._builder.mergePending({candlestick:{highLowLine:null}}),this}setCloseMarkerStyle(e){return this._builder.mergePending({candlestick:{closeMarker:e}}),this}clearCloseMarkerStyle(){return this._builder.mergePending({candlestick:{closeMarker:null}}),this}},y=class extends l{setChordMapping(t){return this._builder.apply((0,e.setChordMapping)(t)),this}setChordLayout(t){return this._builder.apply((0,e.setChordLayout)(t)),this}resetChordLayout(){return this._builder.apply((0,e.resetChordLayout)()),this}setChordNode(t){return this._builder.apply((0,e.setChordNode)(t)),this}resetChordNode(){return this._builder.apply((0,e.resetChordNode)()),this}setChordLabel(t){return this._builder.apply((0,e.setChordLabel)(t)),this}resetChordLabel(){return this._builder.apply((0,e.resetChordLabel)()),this}setChordRibbon(t){return this._builder.apply((0,e.setChordRibbon)(t)),this}resetChordRibbon(){return this._builder.apply((0,e.resetChordRibbon)()),this}setChordEmphasis(t){return this._builder.apply((0,e.setChordEmphasis)(t)),this}resetChordEmphasis(){return this._builder.apply((0,e.resetChordEmphasis)()),this}},b=class extends m{setBar(t){return this._builder.apply((0,e.setBar)(t)),this}clearBar(){return this._builder.apply((0,e.clearBar)()),this}},x=class extends d{setSeriesType(t,n){return this._builder.apply((0,e.setCombinationSeriesType)(t,n)),this}resetSeriesType(t){return this._builder.apply((0,e.resetCombinationSeriesType)(t)),this}setSeriesAxis(t,n){return this._builder.apply((0,e.setCombinationSeriesAxis)(t,n)),this}resetSeriesAxis(t){return this._builder.apply((0,e.resetCombinationSeriesAxis)(t)),this}},S=class extends l{setGap(t){return this._builder.apply((0,e.setFunnelGap)(t)),this}resetGap(){return this._builder.apply((0,e.resetFunnelGap)()),this}setUseAbsoluteValue(t){return this._builder.apply((0,e.setUseAbsoluteValue)(t)),this}resetUseAbsoluteValue(){return this._builder.apply((0,e.resetUseAbsoluteValue)()),this}},C=class extends l{setGaugeValueField(t){return this._builder.apply((0,e.setGaugeValueField)(t)),this}setGaugeMode(t){return this._builder.apply((0,e.setGaugeMode)(t)),this}resetGaugeMode(){return this._builder.apply((0,e.resetGaugeMode)()),this}setGaugeScale(t){return this._builder.apply((0,e.setGaugeScale)(t)),this}resetGaugeScale(){return this._builder.apply((0,e.resetGaugeScale)()),this}setGaugeTicks(t){return this._builder.apply((0,e.setGaugeTicks)(t)),this}setGaugeAngles(t){return this._builder.apply((0,e.setGaugeAngles)(t)),this}resetGaugeAngles(){return this._builder.apply((0,e.resetGaugeAngles)()),this}setGaugeRanges(t){return this._builder.apply((0,e.setGaugeRanges)(t)),this}resetGaugeRanges(){return this._builder.apply((0,e.resetGaugeRanges)()),this}setGaugeAxisLine(t){return this._builder.apply((0,e.setGaugeAxisLine)(t)),this}resetGaugeAxisLine(){return this._builder.apply((0,e.resetGaugeAxisLine)()),this}setGaugeAxisTick(t){return this._builder.apply((0,e.setGaugeAxisTick)(t)),this}resetGaugeAxisTick(){return this._builder.apply((0,e.resetGaugeAxisTick)()),this}setGaugeSplitLine(t){return this._builder.apply((0,e.setGaugeSplitLine)(t)),this}resetGaugeSplitLine(){return this._builder.apply((0,e.resetGaugeSplitLine)()),this}setGaugeAxisLabel(t){return this._builder.apply((0,e.setGaugeAxisLabel)(t)),this}resetGaugeAxisLabel(){return this._builder.apply((0,e.resetGaugeAxisLabel)()),this}setGaugePointer(t){return this._builder.apply((0,e.setGaugePointer)(t)),this}resetGaugePointer(){return this._builder.apply((0,e.resetGaugePointer)()),this}setGaugeAnchor(t){return this._builder.apply((0,e.setGaugeAnchor)(t)),this}resetGaugeAnchor(){return this._builder.apply((0,e.resetGaugeAnchor)()),this}setGaugeProgress(t){return this._builder.apply((0,e.setGaugeProgress)(t)),this}resetGaugeProgress(){return this._builder.apply((0,e.resetGaugeProgress)()),this}setGaugeTitle(t){return this._builder.apply((0,e.setGaugeTitle)(t)),this}resetGaugeTitle(){return this._builder.apply((0,e.resetGaugeTitle)()),this}setGaugeDetail(t){return this._builder.apply((0,e.setGaugeDetail)(t)),this}resetGaugeDetail(){return this._builder.apply((0,e.resetGaugeDetail)()),this}},w=class extends u{setVisualMapType(t){return this._builder.apply((0,e.setVisualMapType)(t)),this}resetVisualMapType(){return this._builder.apply((0,e.resetVisualMapType)()),this}setValueRange(t,n){return this._builder.apply((0,e.setValueRange)(t,n)),this}clearValueRange(){return this._builder.apply((0,e.clearValueRange)()),this}setCellLabel(t){return this._builder.apply((0,e.setCellLabel)(t)),this}clearCellLabel(){return this._builder.apply((0,e.clearCellLabel)()),this}setValueUnit(t){return this._builder.apply((0,e.setValueUnit)(t)),this}clearValueUnit(){return this._builder.apply((0,e.clearValueUnit)()),this}},T=class extends d{setHistogramField(t){return this._builder.apply((0,e.setHistogramField)(t)),this}clearHistogramField(){return this._builder.apply((0,e.clearHistogramField)()),this}setBinCount(t){return Number.isFinite(t)&&this._builder.apply((0,e.setHistogramBinCount)(t)),this}setBinWidth(t){return Number.isFinite(t)&&this._builder.apply((0,e.setHistogramBinWidth)(t)),this}resetBinning(){return this._builder.apply((0,e.resetHistogramBinning)()),this}setUnderflowThreshold(t){return Number.isFinite(t)&&this._builder.apply((0,e.setHistogramUnderflowThreshold)(t)),this}clearUnderflowThreshold(){return this._builder.apply((0,e.clearHistogramUnderflowThreshold)()),this}setOverflowThreshold(t){return Number.isFinite(t)&&this._builder.apply((0,e.setHistogramOverflowThreshold)(t)),this}clearOverflowThreshold(){return this._builder.apply((0,e.clearHistogramOverflowThreshold)()),this}setBinGap(t){return Number.isFinite(t)&&this._builder.apply((0,e.setHistogramBinGap)(t)),this}resetBinGap(){return this._builder.apply((0,e.resetHistogramBinGap)()),this}},E=class extends d{setLineStyle(t){return this._builder.apply((0,e.setLineStyle)(t)),this}clearLineStyle(){return this._builder.apply((0,e.clearLineStyle)()),this}},D=class extends m{setLineStyle(t){return this._builder.apply((0,e.setLineStyle)(t)),this}clearLineStyle(){return this._builder.apply((0,e.clearLineStyle)()),this}},O=class extends d{setBarStyle(t){return this._builder.apply((0,e.setParetoBarStyle)(t)),this}clearBarStyle(){return this._builder.apply((0,e.clearParetoBarStyle)()),this}setCumulativeLineStyle(t){return this._builder.apply((0,e.setCumulativeLineStyle)(t)),this}clearCumulativeLineStyle(){return this._builder.apply((0,e.clearCumulativeLineStyle)()),this}setIncludeZeroValues(t){return this._builder.apply((0,e.setIncludeZeroValues)(t)),this}resetIncludeZeroValues(){return this._builder.apply((0,e.resetIncludeZeroValues)()),this}},k=class extends l{setPieComposite(t){return this._builder.apply((0,e.setPieComposite)(t)),this}clearPieComposite(){return this._builder.apply((0,e.clearPieComposite)()),this}setSliceStyle(t,n){return this._builder.apply((0,e.setSliceStyle)(t,n)),this}clearSliceStyle(t){return this._builder.apply((0,e.clearSliceStyle)(t)),this}setDoughnutHole(t){return this._builder.apply((0,e.setDoughnutHole)(t)),this}clearDoughnutHole(){return this._builder.apply((0,e.clearDoughnutHole)()),this}setExplosion(t){return this._builder.apply((0,e.setExplosion)(t)),this}resetExplosion(){return this._builder.apply((0,e.resetExplosion)()),this}setSliceBorderColor(t){return this._builder.apply((0,e.setSliceBorderColor)(t)),this}clearSliceBorderColor(){return this._builder.apply((0,e.clearSliceBorderColor)()),this}setPaddingAngleEnabled(t){return this._builder.apply((0,e.setPaddingAngleEnabled)(t)),this}resetPaddingAngleEnabled(){return this._builder.apply((0,e.resetPaddingAngleEnabled)()),this}setHalfPie(t){return this._builder.apply((0,e.setHalfPie)(t)),this}resetHalfPie(){return this._builder.apply((0,e.resetHalfPie)()),this}setRosePie(t){return this._builder.apply((0,e.setRosePie)(t)),this}resetRosePie(){return this._builder.apply((0,e.resetRosePie)()),this}setLabelLineVisible(t){return this._builder.apply((0,e.setLabelLineVisible)(t)),this}resetLabelLineVisible(){return this._builder.apply((0,e.resetLabelLineVisible)()),this}setValueScale(t){return this._builder.apply((0,e.setValueScale)(t)),this}resetValueScale(){return this._builder.apply((0,e.resetValueScale)()),this}setPieLabel(t){return this._builder.apply((0,e.setPieLabel)(t)),this}clearPieLabel(){return this._builder.apply((0,e.clearPieLabel)()),this}},A=class extends p{setExplosion(t){return this._builder.apply((0,e.setExplosion)(t)),this}resetExplosion(){return this._builder.apply((0,e.resetExplosion)()),this}setSliceStyle(t,n){return this._builder.apply((0,e.setSliceStyle)(t,n)),this}clearSliceStyle(t){return this._builder.apply((0,e.clearSliceStyle)(t)),this}setPieLabel(t){return this._builder.apply((0,e.setPieLabel)(t)),this}clearPieLabel(){return this._builder.apply((0,e.clearPieLabel)()),this}setSliceBorderColor(t){return this._builder.apply((0,e.setSliceBorderColor)(t)),this}clearSliceBorderColor(){return this._builder.apply((0,e.clearSliceBorderColor)()),this}setLabelLineVisible(t){return this._builder.apply((0,e.setLabelLineVisible)(t)),this}resetLabelLineVisible(){return this._builder.apply((0,e.resetLabelLineVisible)()),this}},j=class extends l{setShape(t){return this._builder.apply((0,e.setRadarShape)(t)),this}resetShape(){return this._builder.apply((0,e.resetRadarShape)()),this}setFill(t){return this._builder.apply((0,e.setRadarFill)(t)),this}resetFill(){return this._builder.apply((0,e.resetRadarFill)()),this}},M=class extends l{setLayout(t){return this._builder.apply((0,e.setRelationLayout)(t)),this}resetLayout(){return this._builder.apply((0,e.resetRelationLayout)()),this}setUseValueAsSymbolSize(t){return this._builder.apply((0,e.setUseValueAsSymbolSize)(t)),this}resetUseValueAsSymbolSize(){return this._builder.apply((0,e.resetUseValueAsSymbolSize)()),this}setEmphasisEnabled(t){return this._builder.apply((0,e.setEmphasisEnabled)(t)),this}resetEmphasisEnabled(){return this._builder.apply((0,e.resetEmphasisEnabled)()),this}setForce(t){return this._builder.apply((0,e.setRelationForce)(t)),this}clearForce(){return this._builder.apply((0,e.clearRelationForce)()),this}setCircularLabelRotation(t){return this._builder.apply((0,e.setCircularLabelRotation)(t)),this}resetCircularLabelRotation(){return this._builder.apply((0,e.resetCircularLabelRotation)()),this}setNodeShape(t){return this._builder.apply((0,e.setRelationNodeShape)(t)),this}resetNodeShape(){return this._builder.apply((0,e.resetRelationNodeShape)()),this}},N=class extends d{},P=class extends l{setHierarchyFields(t){return this._builder.apply((0,e.setSunburstHierarchyFields)(t)),this}setValueField(t){return this._builder.apply((0,e.setSunburstValueField)(t)),this}setSunburstLabel(t){return this._builder.apply((0,e.setSunburstLabel)(t)),this}resetSunburstLabel(){return this._builder.apply((0,e.resetSunburstLabel)()),this}setCenterLabel(t){return this._builder.apply((0,e.setSunburstCenterLabel)(t)),this}resetCenterLabel(){return this._builder.apply((0,e.resetSunburstCenterLabel)()),this}},F=class extends l{setHierarchyFields(t){return this._builder.apply((0,e.setTreemapHierarchyFields)(t)),this}setValueField(t){return this._builder.apply((0,e.setTreemapValueField)(t)),this}setParentLabelLayout(t){return this._builder.apply((0,e.setTreemapParentLabelLayout)(t)),this}resetParentLabelLayout(){return this._builder.apply((0,e.resetTreemapParentLabelLayout)()),this}setTreemapLabel(t){return this._builder.apply((0,e.setTreemapLabel)(t)),this}resetTreemapLabel(){return this._builder.apply((0,e.resetTreemapLabel)()),this}},I=class extends d{setPointRoles(t){let n=this._describe().series,r=/* @__PURE__ */ new Map;t.forEach((e,t)=>{if(!Number.isInteger(e.dataPointIndex)||e.dataPointIndex<0)throw Error(`pointRoles.${t} has an invalid data-point index.`);let i=typeof e.series==`number`?L(e.series,t):R(e.series.name,n,t);r.set(`${i}:${e.dataPointIndex}`,{...e,series:i})});let i=[...r.values()].sort((e,t)=>e.series-t.series||e.dataPointIndex-t.dataPointIndex);return this._builder.apply((0,e.setWaterfallPointRoles)(i)),this}setConnector(t){return this._builder.apply((0,e.setWaterfallConnector)(t)),this}clearConnector(){return this._builder.apply((0,e.clearWaterfallConnector)()),this}setStackType(t){return this._builder.apply((0,e.setWaterfallStackType)(t)),this}resetStackType(){return this._builder.apply((0,e.resetWaterfallStackType)()),this}setUseSubtotal(t){return this._builder.apply((0,e.setUseSubtotal)(t)),this}resetUseSubtotal(){return this._builder.apply((0,e.resetUseSubtotal)()),this}setPositiveStyle(t,n){return this._builder.apply((0,e.setWaterfallStyle)(t,e.ChartWaterfallStyleTarget.Positive,n)),this}clearPositiveStyle(t){return this._builder.apply((0,e.clearWaterfallStyle)(t,e.ChartWaterfallStyleTarget.Positive)),this}setNegativeStyle(t,n){return this._builder.apply((0,e.setWaterfallStyle)(t,e.ChartWaterfallStyleTarget.Negative,n)),this}clearNegativeStyle(t){return this._builder.apply((0,e.clearWaterfallStyle)(t,e.ChartWaterfallStyleTarget.Negative)),this}setSubtotalStyle(t,n){return this._builder.apply((0,e.setWaterfallStyle)(t,e.ChartWaterfallStyleTarget.Subtotal,n)),this}clearSubtotalStyle(t){return this._builder.apply((0,e.clearWaterfallStyle)(t,e.ChartWaterfallStyleTarget.Subtotal)),this}};function L(e,t){if(!Number.isInteger(e)||e<0)throw Error(`pointRoles.${t} has an invalid series index.`);return e}function R(e,t,n){let r=Object.entries(t).filter(([,t])=>(t==null?void 0:t.name)===e);if(r.length!==1)throw Error(`pointRoles.${n} must resolve to exactly one series named "${e}".`);return Number(r[0][0])}var z=class extends l{setShape(t){return this._builder.apply((0,e.setWordCloudShape)(t)),this}resetShape(){return this._builder.apply((0,e.resetWordCloudShape)()),this}setMaskImage(t){return this._builder.apply((0,e.setMaskImage)(t)),this}clearMaskImage(){return this._builder.apply((0,e.clearMaskImage)()),this}setRepeat(t){return this._builder.apply((0,e.setWordCloudRepeat)(t)),this}resetRepeat(){return this._builder.apply((0,e.resetWordCloudRepeat)()),this}};const B=/* @__PURE__ */ new Map;function V(e,t){B.set(e,t)}function H(e){let t=B.get(e);if(!t)throw Error(`Chart builder is not registered: ${String(e)}`);return t}const U={[e.ChartTypeString.Line3D]:D,[e.ChartTypeString.Column3D]:b,[e.ChartTypeString.ColumnStacked3D]:b,[e.ChartTypeString.ColumnPercentStacked3D]:b,[e.ChartTypeString.Bar3D]:b,[e.ChartTypeString.BarStacked3D]:b,[e.ChartTypeString.BarPercentStacked3D]:b,[e.ChartTypeString.Pie3D]:A,[e.ChartTypeString.Area3D]:h,[e.ChartTypeString.AreaStacked3D]:h,[e.ChartTypeString.AreaPercentStacked3D]:h,[e.ChartTypeString.Line]:E,[e.ChartTypeString.LineStacked]:E,[e.ChartTypeString.LinePercentStacked]:E,[e.ChartTypeString.Column]:d,[e.ChartTypeString.ColumnStacked]:d,[e.ChartTypeString.ColumnPercentStacked]:d,[e.ChartTypeString.Bar]:d,[e.ChartTypeString.BarStacked]:d,[e.ChartTypeString.BarPercentStacked]:d,[e.ChartTypeString.Pie]:k,[e.ChartTypeString.Donut]:k,[e.ChartTypeString.Area]:f,[e.ChartTypeString.AreaStacked]:f,[e.ChartTypeString.AreaPercentStacked]:f,[e.ChartTypeString.Radar]:j,[e.ChartTypeString.Scatter]:N,[e.ChartTypeString.Combination]:x,[e.ChartTypeString.WordCloud]:z,[e.ChartTypeString.Funnel]:S,[e.ChartTypeString.Bubble]:_,[e.ChartTypeString.Relation]:M,[e.ChartTypeString.Waterfall]:I,[e.ChartTypeString.Pareto]:O,[e.ChartTypeString.Sankey]:l,[e.ChartTypeString.Heatmap]:w,[e.ChartTypeString.Boxplot]:g,[e.ChartTypeString.Candlestick]:v,[e.ChartTypeString.Histogram]:T,[e.ChartTypeString.Treemap]:F,[e.ChartTypeString.Sunburst]:P,[e.ChartTypeString.Gauge]:C,[e.ChartTypeString.Chord]:y};for(let e of Object.keys(U))V(e,U[e]);var W=/* @__PURE__ */ function(e){return e.Default=`default`,e.Univer1=`univer1`,e.Univer2=`univer2`,e.Univer3=`univer3`,e.Univer4=`univer4`,e.Univer5=`univer5`,e.Univer6=`univer6`,e.UniverGradient1=`univer gradient1`,e.UniverGradient2=`univer gradient2`,e.UniverGradient3=`univer gradient3`,e.UniverGradient4=`univer gradient4`,e.UniverGradient5=`univer gradient5`,e.UniverGradient6=`univer gradient6`,e}(W||{}),G=class extends n.FEnum{get ChartAggregationTarget(){return e.ChartAggregationTarget}get ChartTrendlineType(){return e.ChartTrendlineType}get ChartAppearanceTarget(){return e.ChartAppearanceTarget}get ChartAxisName(){return e.ChartAxisName}get ChartAxisPointerTarget(){return e.ChartAxisPointerTarget}get ChartAxisTarget(){return e.ChartAxisTarget}get ChartAxisTickPosition(){return e.ChartAxisTickPosition}get ChartMarkLineLabelPosition(){return e.ChartMarkLineLabelPosition}get ChartSemanticAxis(){return e.ChartSemanticAxis}get ChartChordFocusMode(){return e.ChartChordFocusMode}get ChartChordLabelPosition(){return e.ChartChordLabelPosition}get ChartChordRibbonColorMode(){return e.ChartChordRibbonColorMode}get ChartGaugeMode(){return e.ChartGaugeMode}get ChartGaugePointerShape(){return e.ChartGaugePointerShape}get ChartSeriesAxis(){return e.ChartSeriesAxis}get ChartSeriesClearTarget(){return e.ChartSeriesClearTarget}get ChartAllSeriesStyleTarget(){return e.ChartAllSeriesStyleTarget}get ChartSeriesTypeString(){return e.ChartSeriesTypeString}get ChartSunburstLabelPosition(){return e.ChartSunburstLabelPosition}get ChartTypeString(){return e.ChartTypeString}get ChartThemeName(){return W}get ChartVisualMapType(){return e.ChartVisualMapType}get ChartWaterfallStyleTarget(){return e.ChartWaterfallStyleTarget}get ChartWaterfallPointRole(){return e.ChartWaterfallPointRole}get ChartAreaLineStyle(){return e.AreaLineStyle}get ChartInvalidValueType(){return e.InvalidValueType}get ChartLabelAlignEnum(){return e.LabelAlignEnum}get ChartLegendPositionEnum(){return e.LegendPositionEnum}get ChartLinePointShape(){return e.LinePointShape}get ChartPieLabelPosition(){return e.PieLabelPosition}get ChartPieSecondaryPlotType(){return e.PieSecondaryPlotType}get ChartRadarShape(){return e.RadarShape}get ChartRelationChartLayoutEnum(){return e.RelationChartLayoutEnum}get ChartSelectModeEnum(){return e.SelectModeEnum}get ChartSeriesLabelPosition(){return e.SeriesLabelPosition}get ChartTitlePositionEnum(){return e.TitlePositionEnum}get ChartTreemapParentLabelLayout(){return e.TreemapParentLabelLayout}get ChartWaterfallStackTypeEnum(){return e.WaterfallStackTypeEnum}get ChartWordCloudShapeEnum(){return e.WordCloudShapeEnum}};n.FEnum.extend(G);var K=class extends n.FUniver{registerTheme(t,n){this._injector.get(e.ChartThemeService).registerTheme(t,n)}};n.FUniver.extend(K);function q(e,t,n=Y(e)){return new t({builder:e,...n})}function J(e,t,n=Y(e)){return q(e,H(t),n)}function Y(t){return{info:{dataSource:[]},normalizeSource:e=>e,createConfig:()=>(0,e.toChartCreateConfig)(t.describe(),t.getPendingConfig()),requireSource:!1}}function X(n){let r=`info`in n,i=r?n.description.id:(0,t.generateRandomId)(),a=r?{...t.Tools.deepClone(n.description),type:n.type}:{id:i,type:n.type,autoGradientFill:e.AREA_CHART_TYPES.has(n.type),series:{}};if(r){let t=[e.ChartTypeString.Bar,e.ChartTypeString.BarStacked,e.ChartTypeString.BarPercentStacked];if(t.includes(n.description.type)!==t.includes(n.type)){let e=a.axes;e&&(a.axes={...e,x:e.y,y:e.x})}}let o=r?Z(a):new e.DetachedChartBuilderAdapter(a,n.commitError,n.injector),s=new e.ChartBuilder(i,a,o),c=t.Tools.deepClone(r?n.info:{position:void 0,size:void 0,...n.createInfo()}),l=J(s,n.type,{info:c,normalizeSource:n.normalizeSource,createConfig:r?()=>(0,e.toChartCreateConfigSnapshot)(s.describe(),s.getPendingConfig()):()=>(0,e.toChartCreateConfig)(s.describe(),s.getPendingConfig()),requireSource:!r});return Object.assign(l,n.extension({getInfo:e=>t.Tools.deepClone(c[e]),setInfo:(e,n)=>{c[e]=t.Tools.deepClone(n)},setAbsolutePosition:(e,t)=>{l.setAbsolutePosition(e,t)},setSize:(e,t)=>{l.setSize(e,t)}}))}function Z(e){return{describe:()=>t.Tools.deepClone(e),commit:()=>{throw Error(`A detached Chart Builder cannot update an existing Chart.`)},resolveData:()=>{throw Error(`Chart data is unavailable from a detached Chart Builder.`)}}}var Q=class extends n.FBase{constructor(e,t,n,r){super(),this._id=e,this._createAdapter=t,this._createBuilder=n,this._injector=r}getId(){return this._id}getType(){return this._createAdapter().getInfo().config.type}getInfo(){return t.Tools.deepClone(this._createAdapter().getInfo())}toBuilder(e){let t=this._createAdapter(),n=t.describe(),r=e??n.type;return this._createBuilder(t.getInfo(),n,r)}async update(e){return await this._createAdapter().update(t.Tools.deepClone(e)),this}setType(e){return this._commit({type:e})}setTitle(t){return this._apply((0,e.setTitle)(t))}clearTitle(){return this._apply((0,e.clearTitle)())}setSubtitle(t){return this._apply((0,e.setSubtitle)(t))}clearSubtitle(){return this._apply((0,e.clearSubtitle)())}setLegend(t){return this._apply((0,e.setLegend)(t))}clearLegend(){return this._apply((0,e.clearLegend)())}setTheme(t){return this._apply((0,e.setTheme)(t))}clearTheme(){return this._apply((0,e.clearTheme)())}setPalette(t){return this._apply((0,e.setPalette)(t))}clearPalette(){return this._apply((0,e.clearPalette)())}setAppearance(t){return this._apply((0,e.setAppearance)(t))}clearAppearance(t){return this._apply((0,e.clearAppearance)(t))}setAutoGradientFill(t){return this._apply((0,e.setAutoGradientFill)(t))}resetAutoGradientFill(){return this._apply((0,e.resetAutoGradientFill)())}setInvalidValueStrategy(t){return this._apply((0,e.setInvalidValueStrategy)(t))}resetInvalidValueStrategy(){return this._apply((0,e.resetInvalidValueStrategy)())}setCategoryField(t){return this._apply((0,e.setCategoryField)(t))}setSeriesToCategory(t){return this._commit({mapping:{seriesToCategory:(0,e.canonicalizeChartContext)({seriesToCategory:t}).seriesToCategory}})}setCategoryFields(e){return this._commit(r(e))}clearCategoryFields(){return this._commit(i())}setMultiLevelCategoryAxis(e){return this._commit({mapping:{multiLevelCategoryAxis:e}})}clearCategoryField(){return this._apply((0,e.clearCategoryField)())}setValueFields(t){return this._apply((0,e.setValueFields)(t))}clearValueFields(){return this._apply((0,e.clearValueFields)())}setAggregation(t){return this._apply((0,e.setAggregation)(t))}clearAggregation(t){return this._apply((0,e.clearAggregation)(t))}async setDataSource(e){return await this._createAdapter().setDataSource(e),this}setAbsolutePosition(e,t){return this._createAdapter().setAbsolutePosition(e,t),this}setSize(e,t){return this._createAdapter().setSize(e,t),this}bringToFront(){return this._arrange(t.ArrangeTypeEnum.front)}bringForward(){return this._arrange(t.ArrangeTypeEnum.forward)}sendBackward(){return this._arrange(t.ArrangeTypeEnum.backward)}sendToBack(){return this._arrange(t.ArrangeTypeEnum.back)}setZOrder(e){return this._createAdapter().setZOrder(e),this}async remove(){return this._createAdapter().remove()}setErrorBars(e){return this._commit({errorBars:[...e]})}clearErrorBars(){return this._commit({errorBars:[]})}_arrange(e){return this._createAdapter().arrange(e),this}_apply(e){return this._commit(e.patch)}_commit(e){return this._createAdapter().commit(e),this}};exports.CHART_FACADE_RANDOM_ID_LENGTH=6,exports.FAreaChartBuilder=f,exports.FAxisChartBuilder=u,exports.FBoxplotChartBuilder=g,exports.FBubbleChartBuilder=_,exports.FCandlestickChartBuilder=v,exports.FCartesianChartBuilder=d,exports.FChart=Q,exports.FChartBuilderBase=l,exports.FChordChartBuilder=y,exports.FCombinationChartBuilder=x,exports.FFunnelChartBuilder=S,exports.FGaugeChartBuilder=C,exports.FHeatmapChartBuilder=w,exports.FHistogramChartBuilder=T,exports.FLineChartBuilder=E,exports.FParetoChartBuilder=O,exports.FPieChartBuilder=k,exports.FRadarChartBuilder=j,exports.FRelationChartBuilder=M,exports.FScatterChartBuilder=N,exports.FSunburstChartBuilder=P,exports.FTreemapChartBuilder=F,exports.FWaterfallChartBuilder=I,exports.FWordCloudChartBuilder=z,exports.createChartBuilder=X;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("@univerjs-pro/engine-chart"),t=require("@univerjs/core"),n=require("@univerjs/core/facade");function r(t){return t.forEach(t=>(0,e.setCategoryField)(t)),{mapping:{categoryIndexes:[...t]}}}function i(){return{mapping:{categoryIndexes:null}}}function a(e){"@babel/helpers - typeof";return a=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},a(e)}function o(e,t){if(a(e)!=`object`||!e)return e;var n;if(typeof Symbol<`u`&&(n=e[Symbol.toPrimitive])!==void 0){var r=n.call(e,t||`default`);if(a(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function s(e){var t=o(e,`string`);return a(t)==`symbol`?t:t+``}function c(e,t,n){return(t=s(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var l=class{constructor(e){this._context=e,c(this,`_builder`,void 0),c(this,`_info`,void 0),this._builder=e.builder,this._info=e.info}setSource(e){return this._info.dataSource=t.Tools.deepClone(this._context.normalizeSource(e)),this}setAbsolutePosition(e,t){return this._info.position={x:e,y:t},this}setSize(e,t){return this._info.size={width:e,height:t},this}build(){if(this._context.requireSource&&this._info.dataSource===void 0)throw Error(`Chart data source is required. Please call setSource() before build().`);let e=t.Tools.deepClone(this._info);return e.config=this._context.createConfig(this._builder),e}_record(e){return this._builder.mergePending(e),this}_describe(){return this._builder.describe()}setTitle(t){return this._builder.apply((0,e.setTitle)(t)),this}clearTitle(){return this._builder.apply((0,e.clearTitle)()),this}setSubtitle(t){return this._builder.apply((0,e.setSubtitle)(t)),this}clearSubtitle(){return this._builder.apply((0,e.clearSubtitle)()),this}setLegend(t){return this._builder.apply((0,e.setLegend)(t)),this}clearLegend(){return this._builder.apply((0,e.clearLegend)()),this}setTheme(t){return this._builder.apply((0,e.setTheme)(t)),this}clearTheme(){return this._builder.apply((0,e.clearTheme)()),this}setPalette(t){return this._builder.apply((0,e.setPalette)(t)),this}clearPalette(){return this._builder.apply((0,e.clearPalette)()),this}setAppearance(t){return this._builder.apply((0,e.setAppearance)(t)),this}clearAppearance(t){return this._builder.apply((0,e.clearAppearance)(t)),this}setAutoGradientFill(t){return this._builder.apply((0,e.setAutoGradientFill)(t)),this}resetAutoGradientFill(){return this._builder.apply((0,e.resetAutoGradientFill)()),this}setInvalidValueStrategy(t){return this._builder.apply((0,e.setInvalidValueStrategy)(t)),this}resetInvalidValueStrategy(){return this._builder.apply((0,e.resetInvalidValueStrategy)()),this}setCategoryField(t){return this._builder.apply((0,e.setCategoryField)(t)),this}setSeriesToCategory(t){return this._builder.mergePending({mapping:{seriesToCategory:(0,e.canonicalizeChartContext)({seriesToCategory:t}).seriesToCategory}}),this}setCategoryFields(e){return this._builder.mergePending(r(e)),this}clearCategoryFields(){return this._builder.mergePending(i()),this}setMultiLevelCategoryAxis(e){return this._builder.mergePending({mapping:{multiLevelCategoryAxis:e}}),this}clearCategoryField(){return this._builder.apply((0,e.clearCategoryField)()),this}setValueFields(t){return this._builder.apply((0,e.setValueFields)(t)),this}clearValueFields(){return this._builder.apply((0,e.clearValueFields)()),this}setAggregation(t){return this._builder.apply((0,e.setAggregation)(t)),this}clearAggregation(t){return this._builder.apply((0,e.clearAggregation)(t)),this}},u=class extends l{setMarkLines(t){return this._builder.apply((0,e.setMarkLines)(t)),this}clearMarkLines(){return this._builder.apply((0,e.clearMarkLines)()),this}setXAxis(t){return this._builder.apply((0,e.setXAxis)(t)),this}clearXAxis(t){return this._builder.apply((0,e.clearXAxis)(t)),this}setYAxis(t){return this._builder.apply((0,e.setYAxis)(t)),this}clearYAxis(t){return this._builder.apply((0,e.clearYAxis)(t)),this}setRightYAxis(t){return this._builder.apply((0,e.setRightYAxis)(t)),this}clearRightYAxis(t){return this._builder.apply((0,e.clearRightYAxis)(t)),this}setXAxisTitle(t){return this._builder.apply((0,e.setAxisTitle)(e.ChartAxisName.X,t)),this}clearXAxisTitle(){return this._builder.apply((0,e.clearAxisTitle)(e.ChartAxisName.X)),this}setYAxisTitle(t){return this._builder.apply((0,e.setAxisTitle)(e.ChartAxisName.Y,t)),this}clearYAxisTitle(){return this._builder.apply((0,e.clearAxisTitle)(e.ChartAxisName.Y)),this}setRightYAxisTitle(t){return this._builder.apply((0,e.setAxisTitle)(e.ChartAxisName.RightY,t)),this}clearRightYAxisTitle(){return this._builder.apply((0,e.clearAxisTitle)(e.ChartAxisName.RightY)),this}setUseDateAxis(t){return this._builder.apply((0,e.setUseDateAxis)(t)),this}resetUseDateAxis(){return this._builder.apply((0,e.resetUseDateAxis)()),this}},d=class extends u{setErrorBars(e){return this._builder.mergePending({errorBars:[...e]}),this}clearErrorBars(){return this._builder.mergePending({errorBars:[]}),this}setBar(t){return this._builder.apply((0,e.setBar)(t)),this}clearBar(){return this._builder.apply((0,e.clearBar)()),this}setSeries(t,n){return this._builder.apply((0,e.setSeries)(t,n)),this}clearSeries(t,n){return this._builder.apply((0,e.clearSeries)(t,n)),this}clearAllSeriesOverrides(){return this._builder.apply((0,e.clearAllSeriesOverrides)()),this}setAllSeriesStyle(t){return this._builder.apply((0,e.setAllSeriesStyle)(t)),this}clearAllSeriesStyle(t){return this._builder.apply((0,e.clearAllSeriesStyle)(t)),this}setTrendline(t,n){return this._builder.apply((0,e.setTrendline)(t,n)),this}removeTrendline(t,n){return this._builder.apply((0,e.removeTrendline)(this._builder.describe(),t,n)),this}clearTrendlines(t){return this._builder.apply((0,e.clearTrendlines)(this._builder.describe(),t)),this}setAxisPointer(t){return this._builder.apply((0,e.setAxisPointer)(t)),this}clearAxisPointer(t){return this._builder.apply((0,e.clearAxisPointer)(t)),this}},f=class extends d{setAreaLineStyle(t){return this._builder.apply((0,e.setAreaLineStyle)(t)),this}clearAreaLineStyle(){return this._builder.apply((0,e.clearAreaLineStyle)()),this}},p=class extends l{setThreeD(t){return this._builder.apply((0,e.setThreeD)(t)),this}clearThreeD(){return this._builder.apply((0,e.clearThreeD)()),this}},m=class extends p{setXAxis(t){return this._builder.apply((0,e.setXAxis)(t)),this}clearXAxis(t){return this._builder.apply((0,e.clearXAxis)(t)),this}setYAxis(t){return this._builder.apply((0,e.setYAxis)(t)),this}clearYAxis(t){return this._builder.apply((0,e.clearYAxis)(t)),this}setDepthAxis(t){return this._builder.apply((0,e.setDepthAxis)(t)),this}clearDepthAxis(){return this._builder.apply((0,e.clearDepthAxis)()),this}setSeries(t,n){return this._builder.apply((0,e.setSeries)(t,n)),this}clearSeries(t){return this._builder.apply((0,e.clearSeries)(t)),this}setAllSeriesStyle(t){return this._builder.apply((0,e.setAllSeriesStyle)(t)),this}clearAllSeriesStyle(){return this._builder.apply((0,e.clearAllSeriesStyle)()),this}clearAllSeriesOverrides(){return this._builder.apply((0,e.clearAllSeriesOverrides)()),this}},h=class extends m{setAreaLineStyle(t){return this._builder.apply((0,e.setAreaLineStyle)(t)),this}clearAreaLineStyle(){return this._builder.apply((0,e.clearAreaLineStyle)()),this}},g=class extends d{},_=class extends d{setBubbleMapping(t){return this._builder.apply((0,e.setBubbleMapping)(t)),this}clearBubbleMapping(){return this._builder.apply((0,e.clearBubbleMapping)()),this}},v=class extends u{setCandlestickFields(t){return this._builder.apply((0,e.setCandlestickFields)(t)),this}clearCandlestickFields(){return this._builder.apply((0,e.clearCandlestickFields)()),this}setRisingStyle(t){return this._builder.apply((0,e.setRisingStyle)(t)),this}clearRisingStyle(){return this._builder.apply((0,e.clearRisingStyle)()),this}setFallingStyle(t){return this._builder.apply((0,e.setFallingStyle)(t)),this}clearFallingStyle(){return this._builder.apply((0,e.clearFallingStyle)()),this}setDojiStyle(t){return this._builder.apply((0,e.setDojiStyle)(t)),this}clearDojiStyle(){return this._builder.apply((0,e.clearDojiStyle)()),this}setCandleWidth(t){return this._builder.apply((0,e.setCandleWidth)(t)),this}resetCandleWidth(){return this._builder.apply((0,e.resetCandleWidth)()),this}setHighLowLineStyle(e){return this._builder.mergePending({candlestick:{highLowLine:e}}),this}clearHighLowLineStyle(){return this._builder.mergePending({candlestick:{highLowLine:null}}),this}setCloseMarkerStyle(e){return this._builder.mergePending({candlestick:{closeMarker:e}}),this}clearCloseMarkerStyle(){return this._builder.mergePending({candlestick:{closeMarker:null}}),this}},y=class extends l{setChordMapping(t){return this._builder.apply((0,e.setChordMapping)(t)),this}setChordLayout(t){return this._builder.apply((0,e.setChordLayout)(t)),this}resetChordLayout(){return this._builder.apply((0,e.resetChordLayout)()),this}setChordNode(t){return this._builder.apply((0,e.setChordNode)(t)),this}resetChordNode(){return this._builder.apply((0,e.resetChordNode)()),this}setChordLabel(t){return this._builder.apply((0,e.setChordLabel)(t)),this}resetChordLabel(){return this._builder.apply((0,e.resetChordLabel)()),this}setChordRibbon(t){return this._builder.apply((0,e.setChordRibbon)(t)),this}resetChordRibbon(){return this._builder.apply((0,e.resetChordRibbon)()),this}setChordEmphasis(t){return this._builder.apply((0,e.setChordEmphasis)(t)),this}resetChordEmphasis(){return this._builder.apply((0,e.resetChordEmphasis)()),this}},b=class extends m{setBar(t){return this._builder.apply((0,e.setBar)(t)),this}clearBar(){return this._builder.apply((0,e.clearBar)()),this}},x=class extends d{setSeriesType(t,n){return this._builder.apply((0,e.setCombinationSeriesType)(t,n)),this}resetSeriesType(t){return this._builder.apply((0,e.resetCombinationSeriesType)(t)),this}setSeriesAxis(t,n){return this._builder.apply((0,e.setCombinationSeriesAxis)(t,n)),this}resetSeriesAxis(t){return this._builder.apply((0,e.resetCombinationSeriesAxis)(t)),this}},S=class extends l{setGap(t){return this._builder.apply((0,e.setFunnelGap)(t)),this}resetGap(){return this._builder.apply((0,e.resetFunnelGap)()),this}setUseAbsoluteValue(t){return this._builder.apply((0,e.setUseAbsoluteValue)(t)),this}resetUseAbsoluteValue(){return this._builder.apply((0,e.resetUseAbsoluteValue)()),this}},C=class extends l{setGaugeValueField(t){return this._builder.apply((0,e.setGaugeValueField)(t)),this}setGaugeMode(t){return this._builder.apply((0,e.setGaugeMode)(t)),this}resetGaugeMode(){return this._builder.apply((0,e.resetGaugeMode)()),this}setGaugeScale(t){return this._builder.apply((0,e.setGaugeScale)(t)),this}resetGaugeScale(){return this._builder.apply((0,e.resetGaugeScale)()),this}setGaugeTicks(t){return this._builder.apply((0,e.setGaugeTicks)(t)),this}setGaugeAngles(t){return this._builder.apply((0,e.setGaugeAngles)(t)),this}resetGaugeAngles(){return this._builder.apply((0,e.resetGaugeAngles)()),this}setGaugeRanges(t){return this._builder.apply((0,e.setGaugeRanges)(t)),this}resetGaugeRanges(){return this._builder.apply((0,e.resetGaugeRanges)()),this}setGaugeAxisLine(t){return this._builder.apply((0,e.setGaugeAxisLine)(t)),this}resetGaugeAxisLine(){return this._builder.apply((0,e.resetGaugeAxisLine)()),this}setGaugeAxisTick(t){return this._builder.apply((0,e.setGaugeAxisTick)(t)),this}resetGaugeAxisTick(){return this._builder.apply((0,e.resetGaugeAxisTick)()),this}setGaugeSplitLine(t){return this._builder.apply((0,e.setGaugeSplitLine)(t)),this}resetGaugeSplitLine(){return this._builder.apply((0,e.resetGaugeSplitLine)()),this}setGaugeAxisLabel(t){return this._builder.apply((0,e.setGaugeAxisLabel)(t)),this}resetGaugeAxisLabel(){return this._builder.apply((0,e.resetGaugeAxisLabel)()),this}setGaugePointer(t){return this._builder.apply((0,e.setGaugePointer)(t)),this}resetGaugePointer(){return this._builder.apply((0,e.resetGaugePointer)()),this}setGaugeAnchor(t){return this._builder.apply((0,e.setGaugeAnchor)(t)),this}resetGaugeAnchor(){return this._builder.apply((0,e.resetGaugeAnchor)()),this}setGaugeProgress(t){return this._builder.apply((0,e.setGaugeProgress)(t)),this}resetGaugeProgress(){return this._builder.apply((0,e.resetGaugeProgress)()),this}setGaugeTitle(t){return this._builder.apply((0,e.setGaugeTitle)(t)),this}resetGaugeTitle(){return this._builder.apply((0,e.resetGaugeTitle)()),this}setGaugeDetail(t){return this._builder.apply((0,e.setGaugeDetail)(t)),this}resetGaugeDetail(){return this._builder.apply((0,e.resetGaugeDetail)()),this}},w=class extends u{setVisualMapType(t){return this._builder.apply((0,e.setVisualMapType)(t)),this}resetVisualMapType(){return this._builder.apply((0,e.resetVisualMapType)()),this}setValueRange(t,n){return this._builder.apply((0,e.setValueRange)(t,n)),this}clearValueRange(){return this._builder.apply((0,e.clearValueRange)()),this}setCellLabel(t){return this._builder.apply((0,e.setCellLabel)(t)),this}clearCellLabel(){return this._builder.apply((0,e.clearCellLabel)()),this}setValueUnit(t){return this._builder.apply((0,e.setValueUnit)(t)),this}clearValueUnit(){return this._builder.apply((0,e.clearValueUnit)()),this}},T=class extends d{setHistogramField(t){return this._builder.apply((0,e.setHistogramField)(t)),this}clearHistogramField(){return this._builder.apply((0,e.clearHistogramField)()),this}setBinCount(t){return Number.isFinite(t)&&this._builder.apply((0,e.setHistogramBinCount)(t)),this}setBinWidth(t){return Number.isFinite(t)&&this._builder.apply((0,e.setHistogramBinWidth)(t)),this}resetBinning(){return this._builder.apply((0,e.resetHistogramBinning)()),this}setUnderflowThreshold(t){return Number.isFinite(t)&&this._builder.apply((0,e.setHistogramUnderflowThreshold)(t)),this}clearUnderflowThreshold(){return this._builder.apply((0,e.clearHistogramUnderflowThreshold)()),this}setOverflowThreshold(t){return Number.isFinite(t)&&this._builder.apply((0,e.setHistogramOverflowThreshold)(t)),this}clearOverflowThreshold(){return this._builder.apply((0,e.clearHistogramOverflowThreshold)()),this}setBinGap(t){return Number.isFinite(t)&&this._builder.apply((0,e.setHistogramBinGap)(t)),this}resetBinGap(){return this._builder.apply((0,e.resetHistogramBinGap)()),this}},E=class extends d{setLineStyle(t){return this._builder.apply((0,e.setLineStyle)(t)),this}clearLineStyle(){return this._builder.apply((0,e.clearLineStyle)()),this}},D=class extends m{setLineStyle(t){return this._builder.apply((0,e.setLineStyle)(t)),this}clearLineStyle(){return this._builder.apply((0,e.clearLineStyle)()),this}},O=class extends d{setBarStyle(t){return this._builder.apply((0,e.setParetoBarStyle)(t)),this}clearBarStyle(){return this._builder.apply((0,e.clearParetoBarStyle)()),this}setCumulativeLineStyle(t){return this._builder.apply((0,e.setCumulativeLineStyle)(t)),this}clearCumulativeLineStyle(){return this._builder.apply((0,e.clearCumulativeLineStyle)()),this}setIncludeZeroValues(t){return this._builder.apply((0,e.setIncludeZeroValues)(t)),this}resetIncludeZeroValues(){return this._builder.apply((0,e.resetIncludeZeroValues)()),this}},k=class extends l{setPieComposite(t){return this._builder.apply((0,e.setPieComposite)(t)),this}clearPieComposite(){return this._builder.apply((0,e.clearPieComposite)()),this}setSliceStyle(t,n){return this._builder.apply((0,e.setSliceStyle)(t,n)),this}clearSliceStyle(t){return this._builder.apply((0,e.clearSliceStyle)(t)),this}setDoughnutHole(t){return this._builder.apply((0,e.setDoughnutHole)(t)),this}clearDoughnutHole(){return this._builder.apply((0,e.clearDoughnutHole)()),this}setExplosion(t){return this._builder.apply((0,e.setExplosion)(t)),this}resetExplosion(){return this._builder.apply((0,e.resetExplosion)()),this}setSliceBorderColor(t){return this._builder.apply((0,e.setSliceBorderColor)(t)),this}clearSliceBorderColor(){return this._builder.apply((0,e.clearSliceBorderColor)()),this}setPaddingAngleEnabled(t){return this._builder.apply((0,e.setPaddingAngleEnabled)(t)),this}resetPaddingAngleEnabled(){return this._builder.apply((0,e.resetPaddingAngleEnabled)()),this}setHalfPie(t){return this._builder.apply((0,e.setHalfPie)(t)),this}resetHalfPie(){return this._builder.apply((0,e.resetHalfPie)()),this}setRosePie(t){return this._builder.apply((0,e.setRosePie)(t)),this}resetRosePie(){return this._builder.apply((0,e.resetRosePie)()),this}setLabelLineVisible(t){return this._builder.apply((0,e.setLabelLineVisible)(t)),this}resetLabelLineVisible(){return this._builder.apply((0,e.resetLabelLineVisible)()),this}setValueScale(t){return this._builder.apply((0,e.setValueScale)(t)),this}resetValueScale(){return this._builder.apply((0,e.resetValueScale)()),this}setPieLabel(t){return this._builder.apply((0,e.setPieLabel)(t)),this}clearPieLabel(){return this._builder.apply((0,e.clearPieLabel)()),this}},A=class extends p{setExplosion(t){return this._builder.apply((0,e.setExplosion)(t)),this}resetExplosion(){return this._builder.apply((0,e.resetExplosion)()),this}setSliceStyle(t,n){return this._builder.apply((0,e.setSliceStyle)(t,n)),this}clearSliceStyle(t){return this._builder.apply((0,e.clearSliceStyle)(t)),this}setPieLabel(t){return this._builder.apply((0,e.setPieLabel)(t)),this}clearPieLabel(){return this._builder.apply((0,e.clearPieLabel)()),this}setSliceBorderColor(t){return this._builder.apply((0,e.setSliceBorderColor)(t)),this}clearSliceBorderColor(){return this._builder.apply((0,e.clearSliceBorderColor)()),this}setLabelLineVisible(t){return this._builder.apply((0,e.setLabelLineVisible)(t)),this}resetLabelLineVisible(){return this._builder.apply((0,e.resetLabelLineVisible)()),this}},j=class extends l{setShape(t){return this._builder.apply((0,e.setRadarShape)(t)),this}resetShape(){return this._builder.apply((0,e.resetRadarShape)()),this}setFill(t){return this._builder.apply((0,e.setRadarFill)(t)),this}resetFill(){return this._builder.apply((0,e.resetRadarFill)()),this}setRadarAxisLabel(t){return this._builder.apply((0,e.setRadarAxisLabel)(t)),this}resetRadarAxisLabel(){return this._builder.apply((0,e.resetRadarAxisLabel)()),this}},M=class extends l{setLayout(t){return this._builder.apply((0,e.setRelationLayout)(t)),this}resetLayout(){return this._builder.apply((0,e.resetRelationLayout)()),this}setUseValueAsSymbolSize(t){return this._builder.apply((0,e.setUseValueAsSymbolSize)(t)),this}resetUseValueAsSymbolSize(){return this._builder.apply((0,e.resetUseValueAsSymbolSize)()),this}setEmphasisEnabled(t){return this._builder.apply((0,e.setEmphasisEnabled)(t)),this}resetEmphasisEnabled(){return this._builder.apply((0,e.resetEmphasisEnabled)()),this}setForce(t){return this._builder.apply((0,e.setRelationForce)(t)),this}clearForce(){return this._builder.apply((0,e.clearRelationForce)()),this}setCircularLabelRotation(t){return this._builder.apply((0,e.setCircularLabelRotation)(t)),this}resetCircularLabelRotation(){return this._builder.apply((0,e.resetCircularLabelRotation)()),this}setNodeShape(t){return this._builder.apply((0,e.setRelationNodeShape)(t)),this}resetNodeShape(){return this._builder.apply((0,e.resetRelationNodeShape)()),this}},N=class extends d{},P=class extends l{setHierarchyFields(t){return this._builder.apply((0,e.setSunburstHierarchyFields)(t)),this}setValueField(t){return this._builder.apply((0,e.setSunburstValueField)(t)),this}setSunburstLabel(t){return this._builder.apply((0,e.setSunburstLabel)(t)),this}resetSunburstLabel(){return this._builder.apply((0,e.resetSunburstLabel)()),this}setCenterLabel(t){return this._builder.apply((0,e.setSunburstCenterLabel)(t)),this}resetCenterLabel(){return this._builder.apply((0,e.resetSunburstCenterLabel)()),this}},F=class extends l{setHierarchyFields(t){return this._builder.apply((0,e.setTreemapHierarchyFields)(t)),this}setValueField(t){return this._builder.apply((0,e.setTreemapValueField)(t)),this}setParentLabelLayout(t){return this._builder.apply((0,e.setTreemapParentLabelLayout)(t)),this}resetParentLabelLayout(){return this._builder.apply((0,e.resetTreemapParentLabelLayout)()),this}setTreemapLabel(t){return this._builder.apply((0,e.setTreemapLabel)(t)),this}resetTreemapLabel(){return this._builder.apply((0,e.resetTreemapLabel)()),this}},I=class extends d{setPointRoles(t){let n=this._describe().series,r=/* @__PURE__ */ new Map;t.forEach((e,t)=>{if(!Number.isInteger(e.dataPointIndex)||e.dataPointIndex<0)throw Error(`pointRoles.${t} has an invalid data-point index.`);let i=typeof e.series==`number`?L(e.series,t):R(e.series.name,n,t);r.set(`${i}:${e.dataPointIndex}`,{...e,series:i})});let i=[...r.values()].sort((e,t)=>e.series-t.series||e.dataPointIndex-t.dataPointIndex);return this._builder.apply((0,e.setWaterfallPointRoles)(i)),this}setConnector(t){return this._builder.apply((0,e.setWaterfallConnector)(t)),this}clearConnector(){return this._builder.apply((0,e.clearWaterfallConnector)()),this}setStackType(t){return this._builder.apply((0,e.setWaterfallStackType)(t)),this}resetStackType(){return this._builder.apply((0,e.resetWaterfallStackType)()),this}setUseSubtotal(t){return this._builder.apply((0,e.setUseSubtotal)(t)),this}resetUseSubtotal(){return this._builder.apply((0,e.resetUseSubtotal)()),this}setPositiveStyle(t,n){return this._builder.apply((0,e.setWaterfallStyle)(t,e.ChartWaterfallStyleTarget.Positive,n)),this}clearPositiveStyle(t){return this._builder.apply((0,e.clearWaterfallStyle)(t,e.ChartWaterfallStyleTarget.Positive)),this}setNegativeStyle(t,n){return this._builder.apply((0,e.setWaterfallStyle)(t,e.ChartWaterfallStyleTarget.Negative,n)),this}clearNegativeStyle(t){return this._builder.apply((0,e.clearWaterfallStyle)(t,e.ChartWaterfallStyleTarget.Negative)),this}setSubtotalStyle(t,n){return this._builder.apply((0,e.setWaterfallStyle)(t,e.ChartWaterfallStyleTarget.Subtotal,n)),this}clearSubtotalStyle(t){return this._builder.apply((0,e.clearWaterfallStyle)(t,e.ChartWaterfallStyleTarget.Subtotal)),this}};function L(e,t){if(!Number.isInteger(e)||e<0)throw Error(`pointRoles.${t} has an invalid series index.`);return e}function R(e,t,n){let r=Object.entries(t).filter(([,t])=>(t==null?void 0:t.name)===e);if(r.length!==1)throw Error(`pointRoles.${n} must resolve to exactly one series named "${e}".`);return Number(r[0][0])}var z=class extends l{setShape(t){return this._builder.apply((0,e.setWordCloudShape)(t)),this}resetShape(){return this._builder.apply((0,e.resetWordCloudShape)()),this}setMaskImage(t){return this._builder.apply((0,e.setMaskImage)(t)),this}clearMaskImage(){return this._builder.apply((0,e.clearMaskImage)()),this}setRepeat(t){return this._builder.apply((0,e.setWordCloudRepeat)(t)),this}resetRepeat(){return this._builder.apply((0,e.resetWordCloudRepeat)()),this}};const B=/* @__PURE__ */ new Map;function V(e,t){B.set(e,t)}function H(e){let t=B.get(e);if(!t)throw Error(`Chart builder is not registered: ${String(e)}`);return t}const U={[e.ChartTypeString.Line3D]:D,[e.ChartTypeString.Column3D]:b,[e.ChartTypeString.ColumnStacked3D]:b,[e.ChartTypeString.ColumnPercentStacked3D]:b,[e.ChartTypeString.Bar3D]:b,[e.ChartTypeString.BarStacked3D]:b,[e.ChartTypeString.BarPercentStacked3D]:b,[e.ChartTypeString.Pie3D]:A,[e.ChartTypeString.Area3D]:h,[e.ChartTypeString.AreaStacked3D]:h,[e.ChartTypeString.AreaPercentStacked3D]:h,[e.ChartTypeString.Line]:E,[e.ChartTypeString.LineStacked]:E,[e.ChartTypeString.LinePercentStacked]:E,[e.ChartTypeString.Column]:d,[e.ChartTypeString.ColumnStacked]:d,[e.ChartTypeString.ColumnPercentStacked]:d,[e.ChartTypeString.Bar]:d,[e.ChartTypeString.BarStacked]:d,[e.ChartTypeString.BarPercentStacked]:d,[e.ChartTypeString.Pie]:k,[e.ChartTypeString.Donut]:k,[e.ChartTypeString.Area]:f,[e.ChartTypeString.AreaStacked]:f,[e.ChartTypeString.AreaPercentStacked]:f,[e.ChartTypeString.Radar]:j,[e.ChartTypeString.Scatter]:N,[e.ChartTypeString.Combination]:x,[e.ChartTypeString.WordCloud]:z,[e.ChartTypeString.Funnel]:S,[e.ChartTypeString.Bubble]:_,[e.ChartTypeString.Relation]:M,[e.ChartTypeString.Waterfall]:I,[e.ChartTypeString.Pareto]:O,[e.ChartTypeString.Sankey]:l,[e.ChartTypeString.Heatmap]:w,[e.ChartTypeString.Boxplot]:g,[e.ChartTypeString.Candlestick]:v,[e.ChartTypeString.Histogram]:T,[e.ChartTypeString.Treemap]:F,[e.ChartTypeString.Sunburst]:P,[e.ChartTypeString.Gauge]:C,[e.ChartTypeString.Chord]:y};for(let e of Object.keys(U))V(e,U[e]);var W=/* @__PURE__ */ function(e){return e.Default=`default`,e.Univer1=`univer1`,e.Univer2=`univer2`,e.Univer3=`univer3`,e.Univer4=`univer4`,e.Univer5=`univer5`,e.Univer6=`univer6`,e.UniverGradient1=`univer gradient1`,e.UniverGradient2=`univer gradient2`,e.UniverGradient3=`univer gradient3`,e.UniverGradient4=`univer gradient4`,e.UniverGradient5=`univer gradient5`,e.UniverGradient6=`univer gradient6`,e}(W||{}),G=class extends n.FEnum{get ChartAggregationTarget(){return e.ChartAggregationTarget}get ChartTrendlineType(){return e.ChartTrendlineType}get ChartAppearanceTarget(){return e.ChartAppearanceTarget}get ChartAxisName(){return e.ChartAxisName}get ChartAxisPointerTarget(){return e.ChartAxisPointerTarget}get ChartAxisTarget(){return e.ChartAxisTarget}get ChartAxisTickPosition(){return e.ChartAxisTickPosition}get ChartMarkLineLabelPosition(){return e.ChartMarkLineLabelPosition}get ChartSemanticAxis(){return e.ChartSemanticAxis}get ChartChordFocusMode(){return e.ChartChordFocusMode}get ChartChordLabelPosition(){return e.ChartChordLabelPosition}get ChartChordRibbonColorMode(){return e.ChartChordRibbonColorMode}get ChartGaugeMode(){return e.ChartGaugeMode}get ChartGaugePointerShape(){return e.ChartGaugePointerShape}get ChartSeriesAxis(){return e.ChartSeriesAxis}get ChartSeriesClearTarget(){return e.ChartSeriesClearTarget}get ChartAllSeriesStyleTarget(){return e.ChartAllSeriesStyleTarget}get ChartSeriesTypeString(){return e.ChartSeriesTypeString}get ChartSunburstLabelPosition(){return e.ChartSunburstLabelPosition}get ChartTypeString(){return e.ChartTypeString}get ChartThemeName(){return W}get ChartVisualMapType(){return e.ChartVisualMapType}get ChartWaterfallStyleTarget(){return e.ChartWaterfallStyleTarget}get ChartWaterfallPointRole(){return e.ChartWaterfallPointRole}get ChartAreaLineStyle(){return e.AreaLineStyle}get ChartInvalidValueType(){return e.InvalidValueType}get ChartLabelAlignEnum(){return e.LabelAlignEnum}get ChartLegendPositionEnum(){return e.LegendPositionEnum}get ChartLinePointShape(){return e.LinePointShape}get ChartPieLabelPosition(){return e.PieLabelPosition}get ChartPieSecondaryPlotType(){return e.PieSecondaryPlotType}get ChartRadarShape(){return e.RadarShape}get ChartRelationChartLayoutEnum(){return e.RelationChartLayoutEnum}get ChartSelectModeEnum(){return e.SelectModeEnum}get ChartSeriesLabelPosition(){return e.SeriesLabelPosition}get ChartTitlePositionEnum(){return e.TitlePositionEnum}get ChartTreemapParentLabelLayout(){return e.TreemapParentLabelLayout}get ChartWaterfallStackTypeEnum(){return e.WaterfallStackTypeEnum}get ChartWordCloudShapeEnum(){return e.WordCloudShapeEnum}};n.FEnum.extend(G);var K=class extends n.FUniver{registerTheme(t,n){this._injector.get(e.ChartThemeService).registerTheme(t,n)}};n.FUniver.extend(K);function q(e,t,n=Y(e)){return new t({builder:e,...n})}function J(e,t,n=Y(e)){return q(e,H(t),n)}function Y(t){return{info:{dataSource:[]},normalizeSource:e=>e,createConfig:()=>(0,e.toChartCreateConfig)(t.describe(),t.getPendingConfig()),requireSource:!1}}function X(n){let r=`info`in n,i=r?n.description.id:(0,t.generateRandomId)(),a=r?{...t.Tools.deepClone(n.description),type:n.type}:{id:i,type:n.type,autoGradientFill:e.AREA_CHART_TYPES.has(n.type),series:{}};if(r){let t=[e.ChartTypeString.Bar,e.ChartTypeString.BarStacked,e.ChartTypeString.BarPercentStacked];if(t.includes(n.description.type)!==t.includes(n.type)){let e=a.axes;e&&(a.axes={...e,x:e.y,y:e.x})}}let o=r?Z(a):new e.DetachedChartBuilderAdapter(a,n.commitError,n.injector),s=new e.ChartBuilder(i,a,o),c=t.Tools.deepClone(r?n.info:{position:void 0,size:void 0,...n.createInfo()}),l=J(s,n.type,{info:c,normalizeSource:n.normalizeSource,createConfig:r?()=>(0,e.toChartCreateConfigSnapshot)(s.describe(),s.getPendingConfig()):()=>(0,e.toChartCreateConfig)(s.describe(),s.getPendingConfig()),requireSource:!r});return Object.assign(l,n.extension({getInfo:e=>t.Tools.deepClone(c[e]),setInfo:(e,n)=>{c[e]=t.Tools.deepClone(n)},setAbsolutePosition:(e,t)=>{l.setAbsolutePosition(e,t)},setSize:(e,t)=>{l.setSize(e,t)}}))}function Z(e){return{describe:()=>t.Tools.deepClone(e),commit:()=>{throw Error(`A detached Chart Builder cannot update an existing Chart.`)},resolveData:()=>{throw Error(`Chart data is unavailable from a detached Chart Builder.`)}}}var Q=class extends n.FBase{constructor(e,t,n,r){super(),this._id=e,this._createAdapter=t,this._createBuilder=n,this._injector=r}getId(){return this._id}getType(){return this._createAdapter().getInfo().config.type}getInfo(){return t.Tools.deepClone(this._createAdapter().getInfo())}toBuilder(e){let t=this._createAdapter(),n=t.describe(),r=e??n.type;return this._createBuilder(t.getInfo(),n,r)}async update(e){return await this._createAdapter().update(t.Tools.deepClone(e)),this}setType(e){return this._commit({type:e})}setTitle(t){return this._apply((0,e.setTitle)(t))}clearTitle(){return this._apply((0,e.clearTitle)())}setSubtitle(t){return this._apply((0,e.setSubtitle)(t))}clearSubtitle(){return this._apply((0,e.clearSubtitle)())}setLegend(t){return this._apply((0,e.setLegend)(t))}clearLegend(){return this._apply((0,e.clearLegend)())}setTheme(t){return this._apply((0,e.setTheme)(t))}clearTheme(){return this._apply((0,e.clearTheme)())}setPalette(t){return this._apply((0,e.setPalette)(t))}clearPalette(){return this._apply((0,e.clearPalette)())}setAppearance(t){return this._apply((0,e.setAppearance)(t))}clearAppearance(t){return this._apply((0,e.clearAppearance)(t))}setAutoGradientFill(t){return this._apply((0,e.setAutoGradientFill)(t))}resetAutoGradientFill(){return this._apply((0,e.resetAutoGradientFill)())}setInvalidValueStrategy(t){return this._apply((0,e.setInvalidValueStrategy)(t))}resetInvalidValueStrategy(){return this._apply((0,e.resetInvalidValueStrategy)())}setCategoryField(t){return this._apply((0,e.setCategoryField)(t))}setSeriesToCategory(t){return this._commit({mapping:{seriesToCategory:(0,e.canonicalizeChartContext)({seriesToCategory:t}).seriesToCategory}})}setCategoryFields(e){return this._commit(r(e))}clearCategoryFields(){return this._commit(i())}setMultiLevelCategoryAxis(e){return this._commit({mapping:{multiLevelCategoryAxis:e}})}clearCategoryField(){return this._apply((0,e.clearCategoryField)())}setValueFields(t){return this._apply((0,e.setValueFields)(t))}clearValueFields(){return this._apply((0,e.clearValueFields)())}setAggregation(t){return this._apply((0,e.setAggregation)(t))}clearAggregation(t){return this._apply((0,e.clearAggregation)(t))}async setDataSource(e){return await this._createAdapter().setDataSource(e),this}setAbsolutePosition(e,t){return this._createAdapter().setAbsolutePosition(e,t),this}setSize(e,t){return this._createAdapter().setSize(e,t),this}bringToFront(){return this._arrange(t.ArrangeTypeEnum.front)}bringForward(){return this._arrange(t.ArrangeTypeEnum.forward)}sendBackward(){return this._arrange(t.ArrangeTypeEnum.backward)}sendToBack(){return this._arrange(t.ArrangeTypeEnum.back)}setZOrder(e){return this._createAdapter().setZOrder(e),this}async remove(){return this._createAdapter().remove()}setErrorBars(e){return this._commit({errorBars:[...e]})}clearErrorBars(){return this._commit({errorBars:[]})}_arrange(e){return this._createAdapter().arrange(e),this}_apply(e){return this._commit(e.patch)}_commit(e){return this._createAdapter().commit(e),this}};exports.CHART_FACADE_RANDOM_ID_LENGTH=6,exports.FAreaChartBuilder=f,exports.FAxisChartBuilder=u,exports.FBoxplotChartBuilder=g,exports.FBubbleChartBuilder=_,exports.FCandlestickChartBuilder=v,exports.FCartesianChartBuilder=d,exports.FChart=Q,exports.FChartBuilderBase=l,exports.FChordChartBuilder=y,exports.FCombinationChartBuilder=x,exports.FFunnelChartBuilder=S,exports.FGaugeChartBuilder=C,exports.FHeatmapChartBuilder=w,exports.FHistogramChartBuilder=T,exports.FLineChartBuilder=E,exports.FParetoChartBuilder=O,exports.FPieChartBuilder=k,exports.FRadarChartBuilder=j,exports.FRelationChartBuilder=M,exports.FScatterChartBuilder=N,exports.FSunburstChartBuilder=P,exports.FTreemapChartBuilder=F,exports.FWaterfallChartBuilder=I,exports.FWordCloudChartBuilder=z,exports.createChartBuilder=X;
|