@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/es/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{AREA_CHART_TYPES as e,AreaLineStyle as t,ChartAggregationTarget as n,ChartAllSeriesStyleTarget as r,ChartAppearanceTarget as i,ChartAxisName as a,ChartAxisPointerTarget as o,ChartAxisTarget as s,ChartAxisTickPosition as c,ChartBuilder as ee,ChartChordFocusMode as te,ChartChordLabelPosition as ne,ChartChordRibbonColorMode as re,ChartGaugeMode as ie,ChartGaugePointerShape as ae,ChartMarkLineLabelPosition as oe,ChartSemanticAxis as se,ChartSeriesAxis as ce,ChartSeriesClearTarget as le,ChartSeriesTypeString as ue,ChartSunburstLabelPosition as de,ChartThemeService as fe,ChartTrendlineType as pe,ChartTypeString as l,ChartVisualMapType as me,ChartWaterfallPointRole as he,ChartWaterfallStyleTarget as u,DetachedChartBuilderAdapter as ge,InvalidValueType as _e,LabelAlignEnum as ve,LegendPositionEnum as ye,LinePointShape as be,PieLabelPosition as xe,PieSecondaryPlotType as Se,RadarShape as Ce,RelationChartLayoutEnum as we,SelectModeEnum as Te,SeriesLabelPosition as Ee,TitlePositionEnum as De,TreemapParentLabelLayout as Oe,WaterfallStackTypeEnum as ke,WordCloudShapeEnum as Ae,canonicalizeChartContext as d,clearAggregation as f,clearAllSeriesOverrides as p,clearAllSeriesStyle as m,clearAppearance as h,clearAreaLineStyle as g,clearAxisPointer as je,clearAxisTitle as _,clearBar as v,clearBubbleMapping as Me,clearCandlestickFields as Ne,clearCategoryField as y,clearCellLabel as Pe,clearCumulativeLineStyle as Fe,clearDepthAxis as Ie,clearDojiStyle as Le,clearDoughnutHole as Re,clearFallingStyle as ze,clearHistogramField as Be,clearHistogramOverflowThreshold as Ve,clearHistogramUnderflowThreshold as He,clearLegend as b,clearLineStyle as x,clearMarkLines as Ue,clearMaskImage as We,clearPalette as S,clearParetoBarStyle as Ge,clearPieComposite as Ke,clearPieLabel as C,clearRelationForce as qe,clearRightYAxis as Je,clearRisingStyle as Ye,clearSeries as w,clearSliceBorderColor as T,clearSliceStyle as E,clearSubtitle as D,clearTheme as O,clearThreeD as Xe,clearTitle as k,clearTrendlines as Ze,clearValueFields as A,clearValueRange as Qe,clearValueUnit as $e,clearWaterfallConnector as et,clearWaterfallStyle as j,clearXAxis as M,clearYAxis as N,removeTrendline as tt,resetAutoGradientFill as P,resetCandleWidth as nt,resetChordEmphasis as rt,resetChordLabel as it,resetChordLayout as at,resetChordNode as ot,resetChordRibbon as st,resetCircularLabelRotation as ct,resetCombinationSeriesAxis as lt,resetCombinationSeriesType as ut,resetEmphasisEnabled as dt,resetExplosion as F,resetFunnelGap as ft,resetGaugeAnchor as pt,resetGaugeAngles as mt,resetGaugeAxisLabel as ht,resetGaugeAxisLine as gt,resetGaugeAxisTick as _t,resetGaugeDetail as vt,resetGaugeMode as yt,resetGaugePointer as bt,resetGaugeProgress as xt,resetGaugeRanges as St,resetGaugeScale as Ct,resetGaugeSplitLine as wt,resetGaugeTitle as Tt,resetHalfPie as Et,resetHistogramBinGap as Dt,resetHistogramBinning as Ot,resetIncludeZeroValues as kt,resetInvalidValueStrategy as I,resetLabelLineVisible as L,resetPaddingAngleEnabled as At,resetRadarFill as jt,resetRadarShape as Mt,resetRelationLayout as Nt,resetRelationNodeShape as Pt,resetRosePie as Ft,resetSunburstCenterLabel as It,resetSunburstLabel as Lt,resetTreemapLabel as Rt,resetTreemapParentLabelLayout as zt,resetUseAbsoluteValue as Bt,resetUseDateAxis as Vt,resetUseSubtotal as Ht,resetUseValueAsSymbolSize as Ut,resetValueScale as Wt,resetVisualMapType as Gt,resetWaterfallStackType as Kt,resetWordCloudRepeat as qt,resetWordCloudShape as Jt,setAggregation as Yt,setAllSeriesStyle as Xt,setAppearance as Zt,setAreaLineStyle as Qt,setAutoGradientFill as $t,setAxisPointer as en,setAxisTitle as R,setBar as tn,setBubbleMapping as nn,setCandleWidth as rn,setCandlestickFields as an,setCategoryField as z,setCellLabel as on,setChordEmphasis as sn,setChordLabel as cn,setChordLayout as ln,setChordMapping as un,setChordNode as dn,setChordRibbon as fn,setCircularLabelRotation as pn,setCombinationSeriesAxis as mn,setCombinationSeriesType as hn,setCumulativeLineStyle as gn,setDepthAxis as _n,setDojiStyle as vn,setDoughnutHole as yn,setEmphasisEnabled as bn,setExplosion as B,setFallingStyle as xn,setFunnelGap as Sn,setGaugeAnchor as Cn,setGaugeAngles as wn,setGaugeAxisLabel as Tn,setGaugeAxisLine as En,setGaugeAxisTick as Dn,setGaugeDetail as On,setGaugeMode as kn,setGaugePointer as An,setGaugeProgress as jn,setGaugeRanges as Mn,setGaugeScale as Nn,setGaugeSplitLine as Pn,setGaugeTicks as Fn,setGaugeTitle as In,setGaugeValueField as Ln,setHalfPie as Rn,setHistogramBinCount as zn,setHistogramBinGap as Bn,setHistogramBinWidth as Vn,setHistogramField as Hn,setHistogramOverflowThreshold as Un,setHistogramUnderflowThreshold as Wn,setIncludeZeroValues as Gn,setInvalidValueStrategy as Kn,setLabelLineVisible as qn,setLegend as Jn,setLineStyle as Yn,setMarkLines as Xn,setMaskImage as Zn,setPaddingAngleEnabled as Qn,setPalette as $n,setParetoBarStyle as er,setPieComposite as tr,setPieLabel as nr,setRadarFill as rr,setRadarShape as ir,setRelationForce as ar,setRelationLayout as or,setRelationNodeShape as sr,setRightYAxis as cr,setRisingStyle as lr,setRosePie as ur,setSeries as dr,setSliceBorderColor as fr,setSliceStyle as pr,setSubtitle as mr,setSunburstCenterLabel as hr,setSunburstHierarchyFields as gr,setSunburstLabel as _r,setSunburstValueField as vr,setTheme as yr,setThreeD as br,setTitle as xr,setTreemapHierarchyFields as Sr,setTreemapLabel as Cr,setTreemapParentLabelLayout as wr,setTreemapValueField as Tr,setTrendline as Er,setUseAbsoluteValue as Dr,setUseDateAxis as Or,setUseSubtotal as kr,setUseValueAsSymbolSize as Ar,setValueFields as jr,setValueRange as Mr,setValueScale as Nr,setValueUnit as Pr,setVisualMapType as Fr,setWaterfallConnector as Ir,setWaterfallPointRoles as Lr,setWaterfallStackType as Rr,setWaterfallStyle as V,setWordCloudRepeat as zr,setWordCloudShape as Br,setXAxis as Vr,setYAxis as Hr,toChartCreateConfig as Ur,toChartCreateConfigSnapshot as Wr}from"@univerjs-pro/engine-chart";import{ArrangeTypeEnum as H,Tools as U,generateRandomId as Gr}from"@univerjs/core";import{FBase as Kr,FEnum as qr,FUniver as Jr}from"@univerjs/core/facade";function Yr(e){return e.forEach(e=>z(e)),{mapping:{categoryIndexes:[...e]}}}function Xr(){return{mapping:{categoryIndexes:null}}}function W(e){"@babel/helpers - typeof";return W=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},W(e)}function Zr(e,t){if(W(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(W(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Qr(e){var t=Zr(e,`string`);return W(t)==`symbol`?t:t+``}function $r(e,t,n){return(t=Qr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var G=class{constructor(e){this._context=e,$r(this,`_builder`,void 0),$r(this,`_info`,void 0),this._builder=e.builder,this._info=e.info}setSource(e){return this._info.dataSource=U.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=U.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(e){return this._builder.apply(xr(e)),this}clearTitle(){return this._builder.apply(k()),this}setSubtitle(e){return this._builder.apply(mr(e)),this}clearSubtitle(){return this._builder.apply(D()),this}setLegend(e){return this._builder.apply(Jn(e)),this}clearLegend(){return this._builder.apply(b()),this}setTheme(e){return this._builder.apply(yr(e)),this}clearTheme(){return this._builder.apply(O()),this}setPalette(e){return this._builder.apply($n(e)),this}clearPalette(){return this._builder.apply(S()),this}setAppearance(e){return this._builder.apply(Zt(e)),this}clearAppearance(e){return this._builder.apply(h(e)),this}setAutoGradientFill(e){return this._builder.apply($t(e)),this}resetAutoGradientFill(){return this._builder.apply(P()),this}setInvalidValueStrategy(e){return this._builder.apply(Kn(e)),this}resetInvalidValueStrategy(){return this._builder.apply(I()),this}setCategoryField(e){return this._builder.apply(z(e)),this}setSeriesToCategory(e){return this._builder.mergePending({mapping:{seriesToCategory:d({seriesToCategory:e}).seriesToCategory}}),this}setCategoryFields(e){return this._builder.mergePending(Yr(e)),this}clearCategoryFields(){return this._builder.mergePending(Xr()),this}setMultiLevelCategoryAxis(e){return this._builder.mergePending({mapping:{multiLevelCategoryAxis:e}}),this}clearCategoryField(){return this._builder.apply(y()),this}setValueFields(e){return this._builder.apply(jr(e)),this}clearValueFields(){return this._builder.apply(A()),this}setAggregation(e){return this._builder.apply(Yt(e)),this}clearAggregation(e){return this._builder.apply(f(e)),this}},K=class extends G{setMarkLines(e){return this._builder.apply(Xn(e)),this}clearMarkLines(){return this._builder.apply(Ue()),this}setXAxis(e){return this._builder.apply(Vr(e)),this}clearXAxis(e){return this._builder.apply(M(e)),this}setYAxis(e){return this._builder.apply(Hr(e)),this}clearYAxis(e){return this._builder.apply(N(e)),this}setRightYAxis(e){return this._builder.apply(cr(e)),this}clearRightYAxis(e){return this._builder.apply(Je(e)),this}setXAxisTitle(e){return this._builder.apply(R(a.X,e)),this}clearXAxisTitle(){return this._builder.apply(_(a.X)),this}setYAxisTitle(e){return this._builder.apply(R(a.Y,e)),this}clearYAxisTitle(){return this._builder.apply(_(a.Y)),this}setRightYAxisTitle(e){return this._builder.apply(R(a.RightY,e)),this}clearRightYAxisTitle(){return this._builder.apply(_(a.RightY)),this}setUseDateAxis(e){return this._builder.apply(Or(e)),this}resetUseDateAxis(){return this._builder.apply(Vt()),this}},q=class extends K{setErrorBars(e){return this._builder.mergePending({errorBars:[...e]}),this}clearErrorBars(){return this._builder.mergePending({errorBars:[]}),this}setBar(e){return this._builder.apply(tn(e)),this}clearBar(){return this._builder.apply(v()),this}setSeries(e,t){return this._builder.apply(dr(e,t)),this}clearSeries(e,t){return this._builder.apply(w(e,t)),this}clearAllSeriesOverrides(){return this._builder.apply(p()),this}setAllSeriesStyle(e){return this._builder.apply(Xt(e)),this}clearAllSeriesStyle(e){return this._builder.apply(m(e)),this}setTrendline(e,t){return this._builder.apply(Er(e,t)),this}removeTrendline(e,t){return this._builder.apply(tt(this._builder.describe(),e,t)),this}clearTrendlines(e){return this._builder.apply(Ze(this._builder.describe(),e)),this}setAxisPointer(e){return this._builder.apply(en(e)),this}clearAxisPointer(e){return this._builder.apply(je(e)),this}},J=class extends q{setAreaLineStyle(e){return this._builder.apply(Qt(e)),this}clearAreaLineStyle(){return this._builder.apply(g()),this}},ei=class extends G{setThreeD(e){return this._builder.apply(br(e)),this}clearThreeD(){return this._builder.apply(Xe()),this}},Y=class extends ei{setXAxis(e){return this._builder.apply(Vr(e)),this}clearXAxis(e){return this._builder.apply(M(e)),this}setYAxis(e){return this._builder.apply(Hr(e)),this}clearYAxis(e){return this._builder.apply(N(e)),this}setDepthAxis(e){return this._builder.apply(_n(e)),this}clearDepthAxis(){return this._builder.apply(Ie()),this}setSeries(e,t){return this._builder.apply(dr(e,t)),this}clearSeries(e){return this._builder.apply(w(e)),this}setAllSeriesStyle(e){return this._builder.apply(Xt(e)),this}clearAllSeriesStyle(){return this._builder.apply(m()),this}clearAllSeriesOverrides(){return this._builder.apply(p()),this}},X=class extends Y{setAreaLineStyle(e){return this._builder.apply(Qt(e)),this}clearAreaLineStyle(){return this._builder.apply(g()),this}},ti=class extends q{},ni=class extends q{setBubbleMapping(e){return this._builder.apply(nn(e)),this}clearBubbleMapping(){return this._builder.apply(Me()),this}},ri=class extends K{setCandlestickFields(e){return this._builder.apply(an(e)),this}clearCandlestickFields(){return this._builder.apply(Ne()),this}setRisingStyle(e){return this._builder.apply(lr(e)),this}clearRisingStyle(){return this._builder.apply(Ye()),this}setFallingStyle(e){return this._builder.apply(xn(e)),this}clearFallingStyle(){return this._builder.apply(ze()),this}setDojiStyle(e){return this._builder.apply(vn(e)),this}clearDojiStyle(){return this._builder.apply(Le()),this}setCandleWidth(e){return this._builder.apply(rn(e)),this}resetCandleWidth(){return this._builder.apply(nt()),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}},ii=class extends G{setChordMapping(e){return this._builder.apply(un(e)),this}setChordLayout(e){return this._builder.apply(ln(e)),this}resetChordLayout(){return this._builder.apply(at()),this}setChordNode(e){return this._builder.apply(dn(e)),this}resetChordNode(){return this._builder.apply(ot()),this}setChordLabel(e){return this._builder.apply(cn(e)),this}resetChordLabel(){return this._builder.apply(it()),this}setChordRibbon(e){return this._builder.apply(fn(e)),this}resetChordRibbon(){return this._builder.apply(st()),this}setChordEmphasis(e){return this._builder.apply(sn(e)),this}resetChordEmphasis(){return this._builder.apply(rt()),this}},Z=class extends Y{setBar(e){return this._builder.apply(tn(e)),this}clearBar(){return this._builder.apply(v()),this}},ai=class extends q{setSeriesType(e,t){return this._builder.apply(hn(e,t)),this}resetSeriesType(e){return this._builder.apply(ut(e)),this}setSeriesAxis(e,t){return this._builder.apply(mn(e,t)),this}resetSeriesAxis(e){return this._builder.apply(lt(e)),this}},oi=class extends G{setGap(e){return this._builder.apply(Sn(e)),this}resetGap(){return this._builder.apply(ft()),this}setUseAbsoluteValue(e){return this._builder.apply(Dr(e)),this}resetUseAbsoluteValue(){return this._builder.apply(Bt()),this}},si=class extends G{setGaugeValueField(e){return this._builder.apply(Ln(e)),this}setGaugeMode(e){return this._builder.apply(kn(e)),this}resetGaugeMode(){return this._builder.apply(yt()),this}setGaugeScale(e){return this._builder.apply(Nn(e)),this}resetGaugeScale(){return this._builder.apply(Ct()),this}setGaugeTicks(e){return this._builder.apply(Fn(e)),this}setGaugeAngles(e){return this._builder.apply(wn(e)),this}resetGaugeAngles(){return this._builder.apply(mt()),this}setGaugeRanges(e){return this._builder.apply(Mn(e)),this}resetGaugeRanges(){return this._builder.apply(St()),this}setGaugeAxisLine(e){return this._builder.apply(En(e)),this}resetGaugeAxisLine(){return this._builder.apply(gt()),this}setGaugeAxisTick(e){return this._builder.apply(Dn(e)),this}resetGaugeAxisTick(){return this._builder.apply(_t()),this}setGaugeSplitLine(e){return this._builder.apply(Pn(e)),this}resetGaugeSplitLine(){return this._builder.apply(wt()),this}setGaugeAxisLabel(e){return this._builder.apply(Tn(e)),this}resetGaugeAxisLabel(){return this._builder.apply(ht()),this}setGaugePointer(e){return this._builder.apply(An(e)),this}resetGaugePointer(){return this._builder.apply(bt()),this}setGaugeAnchor(e){return this._builder.apply(Cn(e)),this}resetGaugeAnchor(){return this._builder.apply(pt()),this}setGaugeProgress(e){return this._builder.apply(jn(e)),this}resetGaugeProgress(){return this._builder.apply(xt()),this}setGaugeTitle(e){return this._builder.apply(In(e)),this}resetGaugeTitle(){return this._builder.apply(Tt()),this}setGaugeDetail(e){return this._builder.apply(On(e)),this}resetGaugeDetail(){return this._builder.apply(vt()),this}},ci=class extends K{setVisualMapType(e){return this._builder.apply(Fr(e)),this}resetVisualMapType(){return this._builder.apply(Gt()),this}setValueRange(e,t){return this._builder.apply(Mr(e,t)),this}clearValueRange(){return this._builder.apply(Qe()),this}setCellLabel(e){return this._builder.apply(on(e)),this}clearCellLabel(){return this._builder.apply(Pe()),this}setValueUnit(e){return this._builder.apply(Pr(e)),this}clearValueUnit(){return this._builder.apply($e()),this}},li=class extends q{setHistogramField(e){return this._builder.apply(Hn(e)),this}clearHistogramField(){return this._builder.apply(Be()),this}setBinCount(e){return Number.isFinite(e)&&this._builder.apply(zn(e)),this}setBinWidth(e){return Number.isFinite(e)&&this._builder.apply(Vn(e)),this}resetBinning(){return this._builder.apply(Ot()),this}setUnderflowThreshold(e){return Number.isFinite(e)&&this._builder.apply(Wn(e)),this}clearUnderflowThreshold(){return this._builder.apply(He()),this}setOverflowThreshold(e){return Number.isFinite(e)&&this._builder.apply(Un(e)),this}clearOverflowThreshold(){return this._builder.apply(Ve()),this}setBinGap(e){return Number.isFinite(e)&&this._builder.apply(Bn(e)),this}resetBinGap(){return this._builder.apply(Dt()),this}},Q=class extends q{setLineStyle(e){return this._builder.apply(Yn(e)),this}clearLineStyle(){return this._builder.apply(x()),this}},ui=class extends Y{setLineStyle(e){return this._builder.apply(Yn(e)),this}clearLineStyle(){return this._builder.apply(x()),this}},di=class extends q{setBarStyle(e){return this._builder.apply(er(e)),this}clearBarStyle(){return this._builder.apply(Ge()),this}setCumulativeLineStyle(e){return this._builder.apply(gn(e)),this}clearCumulativeLineStyle(){return this._builder.apply(Fe()),this}setIncludeZeroValues(e){return this._builder.apply(Gn(e)),this}resetIncludeZeroValues(){return this._builder.apply(kt()),this}},$=class extends G{setPieComposite(e){return this._builder.apply(tr(e)),this}clearPieComposite(){return this._builder.apply(Ke()),this}setSliceStyle(e,t){return this._builder.apply(pr(e,t)),this}clearSliceStyle(e){return this._builder.apply(E(e)),this}setDoughnutHole(e){return this._builder.apply(yn(e)),this}clearDoughnutHole(){return this._builder.apply(Re()),this}setExplosion(e){return this._builder.apply(B(e)),this}resetExplosion(){return this._builder.apply(F()),this}setSliceBorderColor(e){return this._builder.apply(fr(e)),this}clearSliceBorderColor(){return this._builder.apply(T()),this}setPaddingAngleEnabled(e){return this._builder.apply(Qn(e)),this}resetPaddingAngleEnabled(){return this._builder.apply(At()),this}setHalfPie(e){return this._builder.apply(Rn(e)),this}resetHalfPie(){return this._builder.apply(Et()),this}setRosePie(e){return this._builder.apply(ur(e)),this}resetRosePie(){return this._builder.apply(Ft()),this}setLabelLineVisible(e){return this._builder.apply(qn(e)),this}resetLabelLineVisible(){return this._builder.apply(L()),this}setValueScale(e){return this._builder.apply(Nr(e)),this}resetValueScale(){return this._builder.apply(Wt()),this}setPieLabel(e){return this._builder.apply(nr(e)),this}clearPieLabel(){return this._builder.apply(C()),this}},fi=class extends ei{setExplosion(e){return this._builder.apply(B(e)),this}resetExplosion(){return this._builder.apply(F()),this}setSliceStyle(e,t){return this._builder.apply(pr(e,t)),this}clearSliceStyle(e){return this._builder.apply(E(e)),this}setPieLabel(e){return this._builder.apply(nr(e)),this}clearPieLabel(){return this._builder.apply(C()),this}setSliceBorderColor(e){return this._builder.apply(fr(e)),this}clearSliceBorderColor(){return this._builder.apply(T()),this}setLabelLineVisible(e){return this._builder.apply(qn(e)),this}resetLabelLineVisible(){return this._builder.apply(L()),this}},pi=class extends G{setShape(e){return this._builder.apply(ir(e)),this}resetShape(){return this._builder.apply(Mt()),this}setFill(e){return this._builder.apply(rr(e)),this}resetFill(){return this._builder.apply(jt()),this}},mi=class extends G{setLayout(e){return this._builder.apply(or(e)),this}resetLayout(){return this._builder.apply(Nt()),this}setUseValueAsSymbolSize(e){return this._builder.apply(Ar(e)),this}resetUseValueAsSymbolSize(){return this._builder.apply(Ut()),this}setEmphasisEnabled(e){return this._builder.apply(bn(e)),this}resetEmphasisEnabled(){return this._builder.apply(dt()),this}setForce(e){return this._builder.apply(ar(e)),this}clearForce(){return this._builder.apply(qe()),this}setCircularLabelRotation(e){return this._builder.apply(pn(e)),this}resetCircularLabelRotation(){return this._builder.apply(ct()),this}setNodeShape(e){return this._builder.apply(sr(e)),this}resetNodeShape(){return this._builder.apply(Pt()),this}},hi=class extends q{},gi=class extends G{setHierarchyFields(e){return this._builder.apply(gr(e)),this}setValueField(e){return this._builder.apply(vr(e)),this}setSunburstLabel(e){return this._builder.apply(_r(e)),this}resetSunburstLabel(){return this._builder.apply(Lt()),this}setCenterLabel(e){return this._builder.apply(hr(e)),this}resetCenterLabel(){return this._builder.apply(It()),this}},_i=class extends G{setHierarchyFields(e){return this._builder.apply(Sr(e)),this}setValueField(e){return this._builder.apply(Tr(e)),this}setParentLabelLayout(e){return this._builder.apply(wr(e)),this}resetParentLabelLayout(){return this._builder.apply(zt()),this}setTreemapLabel(e){return this._builder.apply(Cr(e)),this}resetTreemapLabel(){return this._builder.apply(Rt()),this}},vi=class extends q{setPointRoles(e){let t=this._describe().series,n=/* @__PURE__ */ new Map;e.forEach((e,r)=>{if(!Number.isInteger(e.dataPointIndex)||e.dataPointIndex<0)throw Error(`pointRoles.${r} has an invalid data-point index.`);let i=typeof e.series==`number`?yi(e.series,r):bi(e.series.name,t,r);n.set(`${i}:${e.dataPointIndex}`,{...e,series:i})});let r=[...n.values()].sort((e,t)=>e.series-t.series||e.dataPointIndex-t.dataPointIndex);return this._builder.apply(Lr(r)),this}setConnector(e){return this._builder.apply(Ir(e)),this}clearConnector(){return this._builder.apply(et()),this}setStackType(e){return this._builder.apply(Rr(e)),this}resetStackType(){return this._builder.apply(Kt()),this}setUseSubtotal(e){return this._builder.apply(kr(e)),this}resetUseSubtotal(){return this._builder.apply(Ht()),this}setPositiveStyle(e,t){return this._builder.apply(V(e,u.Positive,t)),this}clearPositiveStyle(e){return this._builder.apply(j(e,u.Positive)),this}setNegativeStyle(e,t){return this._builder.apply(V(e,u.Negative,t)),this}clearNegativeStyle(e){return this._builder.apply(j(e,u.Negative)),this}setSubtotalStyle(e,t){return this._builder.apply(V(e,u.Subtotal,t)),this}clearSubtotalStyle(e){return this._builder.apply(j(e,u.Subtotal)),this}};function yi(e,t){if(!Number.isInteger(e)||e<0)throw Error(`pointRoles.${t} has an invalid series index.`);return e}function bi(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 xi=class extends G{setShape(e){return this._builder.apply(Br(e)),this}resetShape(){return this._builder.apply(Jt()),this}setMaskImage(e){return this._builder.apply(Zn(e)),this}clearMaskImage(){return this._builder.apply(We()),this}setRepeat(e){return this._builder.apply(zr(e)),this}resetRepeat(){return this._builder.apply(qt()),this}};const Si=/* @__PURE__ */ new Map;function Ci(e,t){Si.set(e,t)}function wi(e){let t=Si.get(e);if(!t)throw Error(`Chart builder is not registered: ${String(e)}`);return t}const Ti={[l.Line3D]:ui,[l.Column3D]:Z,[l.ColumnStacked3D]:Z,[l.ColumnPercentStacked3D]:Z,[l.Bar3D]:Z,[l.BarStacked3D]:Z,[l.BarPercentStacked3D]:Z,[l.Pie3D]:fi,[l.Area3D]:X,[l.AreaStacked3D]:X,[l.AreaPercentStacked3D]:X,[l.Line]:Q,[l.LineStacked]:Q,[l.LinePercentStacked]:Q,[l.Column]:q,[l.ColumnStacked]:q,[l.ColumnPercentStacked]:q,[l.Bar]:q,[l.BarStacked]:q,[l.BarPercentStacked]:q,[l.Pie]:$,[l.Donut]:$,[l.Area]:J,[l.AreaStacked]:J,[l.AreaPercentStacked]:J,[l.Radar]:pi,[l.Scatter]:hi,[l.Combination]:ai,[l.WordCloud]:xi,[l.Funnel]:oi,[l.Bubble]:ni,[l.Relation]:mi,[l.Waterfall]:vi,[l.Pareto]:di,[l.Sankey]:G,[l.Heatmap]:ci,[l.Boxplot]:ti,[l.Candlestick]:ri,[l.Histogram]:li,[l.Treemap]:_i,[l.Sunburst]:gi,[l.Gauge]:si,[l.Chord]:ii};for(let e of Object.keys(Ti))Ci(e,Ti[e]);var Ei=/* @__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}(Ei||{}),Di=class extends qr{get ChartAggregationTarget(){return n}get ChartTrendlineType(){return pe}get ChartAppearanceTarget(){return i}get ChartAxisName(){return a}get ChartAxisPointerTarget(){return o}get ChartAxisTarget(){return s}get ChartAxisTickPosition(){return c}get ChartMarkLineLabelPosition(){return oe}get ChartSemanticAxis(){return se}get ChartChordFocusMode(){return te}get ChartChordLabelPosition(){return ne}get ChartChordRibbonColorMode(){return re}get ChartGaugeMode(){return ie}get ChartGaugePointerShape(){return ae}get ChartSeriesAxis(){return ce}get ChartSeriesClearTarget(){return le}get ChartAllSeriesStyleTarget(){return r}get ChartSeriesTypeString(){return ue}get ChartSunburstLabelPosition(){return de}get ChartTypeString(){return l}get ChartThemeName(){return Ei}get ChartVisualMapType(){return me}get ChartWaterfallStyleTarget(){return u}get ChartWaterfallPointRole(){return he}get ChartAreaLineStyle(){return t}get ChartInvalidValueType(){return _e}get ChartLabelAlignEnum(){return ve}get ChartLegendPositionEnum(){return ye}get ChartLinePointShape(){return be}get ChartPieLabelPosition(){return xe}get ChartPieSecondaryPlotType(){return Se}get ChartRadarShape(){return Ce}get ChartRelationChartLayoutEnum(){return we}get ChartSelectModeEnum(){return Te}get ChartSeriesLabelPosition(){return Ee}get ChartTitlePositionEnum(){return De}get ChartTreemapParentLabelLayout(){return Oe}get ChartWaterfallStackTypeEnum(){return ke}get ChartWordCloudShapeEnum(){return Ae}};qr.extend(Di);var Oi=class extends Jr{registerTheme(e,t){this._injector.get(fe).registerTheme(e,t)}};Jr.extend(Oi);function ki(e,t,n=ji(e)){return new t({builder:e,...n})}function Ai(e,t,n=ji(e)){return ki(e,wi(t),n)}function ji(e){return{info:{dataSource:[]},normalizeSource:e=>e,createConfig:()=>Ur(e.describe(),e.getPendingConfig()),requireSource:!1}}function Mi(t){let n=`info`in t,r=n?t.description.id:Gr(),i=n?{...U.deepClone(t.description),type:t.type}:{id:r,type:t.type,autoGradientFill:e.has(t.type),series:{}};if(n){let e=[l.Bar,l.BarStacked,l.BarPercentStacked];if(e.includes(t.description.type)!==e.includes(t.type)){let e=i.axes;e&&(i.axes={...e,x:e.y,y:e.x})}}let a=n?Ni(i):new ge(i,t.commitError,t.injector),o=new ee(r,i,a),s=U.deepClone(n?t.info:{position:void 0,size:void 0,...t.createInfo()}),c=Ai(o,t.type,{info:s,normalizeSource:t.normalizeSource,createConfig:n?()=>Wr(o.describe(),o.getPendingConfig()):()=>Ur(o.describe(),o.getPendingConfig()),requireSource:!n});return Object.assign(c,t.extension({getInfo:e=>U.deepClone(s[e]),setInfo:(e,t)=>{s[e]=U.deepClone(t)},setAbsolutePosition:(e,t)=>{c.setAbsolutePosition(e,t)},setSize:(e,t)=>{c.setSize(e,t)}}))}function Ni(e){return{describe:()=>U.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 Pi=class extends Kr{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 U.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(U.deepClone(e)),this}setType(e){return this._commit({type:e})}setTitle(e){return this._apply(xr(e))}clearTitle(){return this._apply(k())}setSubtitle(e){return this._apply(mr(e))}clearSubtitle(){return this._apply(D())}setLegend(e){return this._apply(Jn(e))}clearLegend(){return this._apply(b())}setTheme(e){return this._apply(yr(e))}clearTheme(){return this._apply(O())}setPalette(e){return this._apply($n(e))}clearPalette(){return this._apply(S())}setAppearance(e){return this._apply(Zt(e))}clearAppearance(e){return this._apply(h(e))}setAutoGradientFill(e){return this._apply($t(e))}resetAutoGradientFill(){return this._apply(P())}setInvalidValueStrategy(e){return this._apply(Kn(e))}resetInvalidValueStrategy(){return this._apply(I())}setCategoryField(e){return this._apply(z(e))}setSeriesToCategory(e){return this._commit({mapping:{seriesToCategory:d({seriesToCategory:e}).seriesToCategory}})}setCategoryFields(e){return this._commit(Yr(e))}clearCategoryFields(){return this._commit(Xr())}setMultiLevelCategoryAxis(e){return this._commit({mapping:{multiLevelCategoryAxis:e}})}clearCategoryField(){return this._apply(y())}setValueFields(e){return this._apply(jr(e))}clearValueFields(){return this._apply(A())}setAggregation(e){return this._apply(Yt(e))}clearAggregation(e){return this._apply(f(e))}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(H.front)}bringForward(){return this._arrange(H.forward)}sendBackward(){return this._arrange(H.backward)}sendToBack(){return this._arrange(H.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}};const Fi=6;export{Fi as CHART_FACADE_RANDOM_ID_LENGTH,J as FAreaChartBuilder,K as FAxisChartBuilder,ti as FBoxplotChartBuilder,ni as FBubbleChartBuilder,ri as FCandlestickChartBuilder,q as FCartesianChartBuilder,Pi as FChart,G as FChartBuilderBase,ii as FChordChartBuilder,ai as FCombinationChartBuilder,oi as FFunnelChartBuilder,si as FGaugeChartBuilder,ci as FHeatmapChartBuilder,li as FHistogramChartBuilder,Q as FLineChartBuilder,di as FParetoChartBuilder,$ as FPieChartBuilder,pi as FRadarChartBuilder,mi as FRelationChartBuilder,hi as FScatterChartBuilder,gi as FSunburstChartBuilder,_i as FTreemapChartBuilder,vi as FWaterfallChartBuilder,xi as FWordCloudChartBuilder,Mi as createChartBuilder};
|
|
1
|
+
import{AREA_CHART_TYPES as e,AreaLineStyle as t,ChartAggregationTarget as n,ChartAllSeriesStyleTarget as r,ChartAppearanceTarget as i,ChartAxisName as a,ChartAxisPointerTarget as o,ChartAxisTarget as s,ChartAxisTickPosition as c,ChartBuilder as ee,ChartChordFocusMode as te,ChartChordLabelPosition as ne,ChartChordRibbonColorMode as re,ChartGaugeMode as ie,ChartGaugePointerShape as ae,ChartMarkLineLabelPosition as oe,ChartSemanticAxis as se,ChartSeriesAxis as ce,ChartSeriesClearTarget as le,ChartSeriesTypeString as ue,ChartSunburstLabelPosition as de,ChartThemeService as fe,ChartTrendlineType as pe,ChartTypeString as l,ChartVisualMapType as me,ChartWaterfallPointRole as he,ChartWaterfallStyleTarget as u,DetachedChartBuilderAdapter as ge,InvalidValueType as _e,LabelAlignEnum as ve,LegendPositionEnum as ye,LinePointShape as be,PieLabelPosition as xe,PieSecondaryPlotType as Se,RadarShape as Ce,RelationChartLayoutEnum as we,SelectModeEnum as Te,SeriesLabelPosition as Ee,TitlePositionEnum as De,TreemapParentLabelLayout as Oe,WaterfallStackTypeEnum as ke,WordCloudShapeEnum as Ae,canonicalizeChartContext as je,clearAggregation as d,clearAllSeriesOverrides as f,clearAllSeriesStyle as p,clearAppearance as m,clearAreaLineStyle as Me,clearAxisPointer as Ne,clearAxisTitle as h,clearBar as Pe,clearBubbleMapping as Fe,clearCandlestickFields as Ie,clearCategoryField as Le,clearCellLabel as Re,clearCumulativeLineStyle as ze,clearDepthAxis as Be,clearDojiStyle as Ve,clearDoughnutHole as He,clearFallingStyle as Ue,clearHistogramField as We,clearHistogramOverflowThreshold as Ge,clearHistogramUnderflowThreshold as Ke,clearLegend as qe,clearLineStyle as Je,clearMarkLines as Ye,clearMaskImage as Xe,clearPalette as Ze,clearParetoBarStyle as Qe,clearPieComposite as $e,clearPieLabel as et,clearRelationForce as tt,clearRightYAxis as nt,clearRisingStyle as rt,clearSeries as it,clearSliceBorderColor as at,clearSliceStyle as ot,clearSubtitle as st,clearTheme as ct,clearThreeD as lt,clearTitle as ut,clearTrendlines as dt,clearValueFields as ft,clearValueRange as pt,clearValueUnit as mt,clearWaterfallConnector as ht,clearWaterfallStyle as g,clearXAxis as _,clearYAxis as v,removeTrendline as gt,resetAutoGradientFill as y,resetCandleWidth as _t,resetChordEmphasis as vt,resetChordLabel as yt,resetChordLayout as bt,resetChordNode as xt,resetChordRibbon as St,resetCircularLabelRotation as Ct,resetCombinationSeriesAxis as wt,resetCombinationSeriesType as Tt,resetEmphasisEnabled as Et,resetExplosion as b,resetFunnelGap as Dt,resetGaugeAnchor as Ot,resetGaugeAngles as kt,resetGaugeAxisLabel as At,resetGaugeAxisLine as jt,resetGaugeAxisTick as Mt,resetGaugeDetail as Nt,resetGaugeMode as Pt,resetGaugePointer as Ft,resetGaugeProgress as It,resetGaugeRanges as Lt,resetGaugeScale as Rt,resetGaugeSplitLine as zt,resetGaugeTitle as Bt,resetHalfPie as Vt,resetHistogramBinGap as Ht,resetHistogramBinning as Ut,resetIncludeZeroValues as Wt,resetInvalidValueStrategy as x,resetLabelLineVisible as S,resetPaddingAngleEnabled as Gt,resetRadarAxisLabel as Kt,resetRadarFill as qt,resetRadarShape as Jt,resetRelationLayout as Yt,resetRelationNodeShape as Xt,resetRosePie as Zt,resetSunburstCenterLabel as Qt,resetSunburstLabel as $t,resetTreemapLabel as en,resetTreemapParentLabelLayout as tn,resetUseAbsoluteValue as nn,resetUseDateAxis as rn,resetUseSubtotal as an,resetUseValueAsSymbolSize as on,resetValueScale as sn,resetVisualMapType as cn,resetWaterfallStackType as ln,resetWordCloudRepeat as un,resetWordCloudShape as dn,setAggregation as C,setAllSeriesStyle as w,setAppearance as T,setAreaLineStyle as E,setAutoGradientFill as D,setAxisPointer as fn,setAxisTitle as O,setBar as k,setBubbleMapping as pn,setCandleWidth as mn,setCandlestickFields as hn,setCategoryField as A,setCellLabel as gn,setChordEmphasis as _n,setChordLabel as vn,setChordLayout as yn,setChordMapping as bn,setChordNode as xn,setChordRibbon as Sn,setCircularLabelRotation as Cn,setCombinationSeriesAxis as wn,setCombinationSeriesType as Tn,setCumulativeLineStyle as En,setDepthAxis as Dn,setDojiStyle as On,setDoughnutHole as kn,setEmphasisEnabled as An,setExplosion as j,setFallingStyle as jn,setFunnelGap as Mn,setGaugeAnchor as Nn,setGaugeAngles as Pn,setGaugeAxisLabel as Fn,setGaugeAxisLine as In,setGaugeAxisTick as Ln,setGaugeDetail as Rn,setGaugeMode as zn,setGaugePointer as Bn,setGaugeProgress as Vn,setGaugeRanges as Hn,setGaugeScale as Un,setGaugeSplitLine as Wn,setGaugeTicks as Gn,setGaugeTitle as Kn,setGaugeValueField as qn,setHalfPie as Jn,setHistogramBinCount as Yn,setHistogramBinGap as Xn,setHistogramBinWidth as Zn,setHistogramField as Qn,setHistogramOverflowThreshold as $n,setHistogramUnderflowThreshold as er,setIncludeZeroValues as tr,setInvalidValueStrategy as M,setLabelLineVisible as N,setLegend as P,setLineStyle as F,setMarkLines as nr,setMaskImage as rr,setPaddingAngleEnabled as ir,setPalette as I,setParetoBarStyle as ar,setPieComposite as or,setPieLabel as L,setRadarAxisLabel as sr,setRadarFill as cr,setRadarShape as lr,setRelationForce as ur,setRelationLayout as dr,setRelationNodeShape as fr,setRightYAxis as pr,setRisingStyle as mr,setRosePie as hr,setSeries as R,setSliceBorderColor as z,setSliceStyle as gr,setSubtitle as _r,setSunburstCenterLabel as vr,setSunburstHierarchyFields as yr,setSunburstLabel as br,setSunburstValueField as xr,setTheme as Sr,setThreeD as Cr,setTitle as wr,setTreemapHierarchyFields as Tr,setTreemapLabel as Er,setTreemapParentLabelLayout as Dr,setTreemapValueField as Or,setTrendline as kr,setUseAbsoluteValue as Ar,setUseDateAxis as jr,setUseSubtotal as Mr,setUseValueAsSymbolSize as Nr,setValueFields as Pr,setValueRange as Fr,setValueScale as Ir,setValueUnit as Lr,setVisualMapType as Rr,setWaterfallConnector as zr,setWaterfallPointRoles as Br,setWaterfallStackType as Vr,setWaterfallStyle as B,setWordCloudRepeat as Hr,setWordCloudShape as Ur,setXAxis as Wr,setYAxis as Gr,toChartCreateConfig as Kr,toChartCreateConfigSnapshot as qr}from"@univerjs-pro/engine-chart";import{ArrangeTypeEnum as V,Tools as H,generateRandomId as Jr}from"@univerjs/core";import{FBase as Yr,FEnum as Xr,FUniver as Zr}from"@univerjs/core/facade";function Qr(e){return e.forEach(e=>A(e)),{mapping:{categoryIndexes:[...e]}}}function $r(){return{mapping:{categoryIndexes:null}}}function U(e){"@babel/helpers - typeof";return U=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},U(e)}function ei(e,t){if(U(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(U(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function ti(e){var t=ei(e,`string`);return U(t)==`symbol`?t:t+``}function ni(e,t,n){return(t=ti(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var W=class{constructor(e){this._context=e,ni(this,`_builder`,void 0),ni(this,`_info`,void 0),this._builder=e.builder,this._info=e.info}setSource(e){return this._info.dataSource=H.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=H.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(e){return this._builder.apply(wr(e)),this}clearTitle(){return this._builder.apply(ut()),this}setSubtitle(e){return this._builder.apply(_r(e)),this}clearSubtitle(){return this._builder.apply(st()),this}setLegend(e){return this._builder.apply(P(e)),this}clearLegend(){return this._builder.apply(qe()),this}setTheme(e){return this._builder.apply(Sr(e)),this}clearTheme(){return this._builder.apply(ct()),this}setPalette(e){return this._builder.apply(I(e)),this}clearPalette(){return this._builder.apply(Ze()),this}setAppearance(e){return this._builder.apply(T(e)),this}clearAppearance(e){return this._builder.apply(m(e)),this}setAutoGradientFill(e){return this._builder.apply(D(e)),this}resetAutoGradientFill(){return this._builder.apply(y()),this}setInvalidValueStrategy(e){return this._builder.apply(M(e)),this}resetInvalidValueStrategy(){return this._builder.apply(x()),this}setCategoryField(e){return this._builder.apply(A(e)),this}setSeriesToCategory(e){return this._builder.mergePending({mapping:{seriesToCategory:je({seriesToCategory:e}).seriesToCategory}}),this}setCategoryFields(e){return this._builder.mergePending(Qr(e)),this}clearCategoryFields(){return this._builder.mergePending($r()),this}setMultiLevelCategoryAxis(e){return this._builder.mergePending({mapping:{multiLevelCategoryAxis:e}}),this}clearCategoryField(){return this._builder.apply(Le()),this}setValueFields(e){return this._builder.apply(Pr(e)),this}clearValueFields(){return this._builder.apply(ft()),this}setAggregation(e){return this._builder.apply(C(e)),this}clearAggregation(e){return this._builder.apply(d(e)),this}},G=class extends W{setMarkLines(e){return this._builder.apply(nr(e)),this}clearMarkLines(){return this._builder.apply(Ye()),this}setXAxis(e){return this._builder.apply(Wr(e)),this}clearXAxis(e){return this._builder.apply(_(e)),this}setYAxis(e){return this._builder.apply(Gr(e)),this}clearYAxis(e){return this._builder.apply(v(e)),this}setRightYAxis(e){return this._builder.apply(pr(e)),this}clearRightYAxis(e){return this._builder.apply(nt(e)),this}setXAxisTitle(e){return this._builder.apply(O(a.X,e)),this}clearXAxisTitle(){return this._builder.apply(h(a.X)),this}setYAxisTitle(e){return this._builder.apply(O(a.Y,e)),this}clearYAxisTitle(){return this._builder.apply(h(a.Y)),this}setRightYAxisTitle(e){return this._builder.apply(O(a.RightY,e)),this}clearRightYAxisTitle(){return this._builder.apply(h(a.RightY)),this}setUseDateAxis(e){return this._builder.apply(jr(e)),this}resetUseDateAxis(){return this._builder.apply(rn()),this}},K=class extends G{setErrorBars(e){return this._builder.mergePending({errorBars:[...e]}),this}clearErrorBars(){return this._builder.mergePending({errorBars:[]}),this}setBar(e){return this._builder.apply(k(e)),this}clearBar(){return this._builder.apply(Pe()),this}setSeries(e,t){return this._builder.apply(R(e,t)),this}clearSeries(e,t){return this._builder.apply(it(e,t)),this}clearAllSeriesOverrides(){return this._builder.apply(f()),this}setAllSeriesStyle(e){return this._builder.apply(w(e)),this}clearAllSeriesStyle(e){return this._builder.apply(p(e)),this}setTrendline(e,t){return this._builder.apply(kr(e,t)),this}removeTrendline(e,t){return this._builder.apply(gt(this._builder.describe(),e,t)),this}clearTrendlines(e){return this._builder.apply(dt(this._builder.describe(),e)),this}setAxisPointer(e){return this._builder.apply(fn(e)),this}clearAxisPointer(e){return this._builder.apply(Ne(e)),this}},q=class extends K{setAreaLineStyle(e){return this._builder.apply(E(e)),this}clearAreaLineStyle(){return this._builder.apply(Me()),this}},ri=class extends W{setThreeD(e){return this._builder.apply(Cr(e)),this}clearThreeD(){return this._builder.apply(lt()),this}},J=class extends ri{setXAxis(e){return this._builder.apply(Wr(e)),this}clearXAxis(e){return this._builder.apply(_(e)),this}setYAxis(e){return this._builder.apply(Gr(e)),this}clearYAxis(e){return this._builder.apply(v(e)),this}setDepthAxis(e){return this._builder.apply(Dn(e)),this}clearDepthAxis(){return this._builder.apply(Be()),this}setSeries(e,t){return this._builder.apply(R(e,t)),this}clearSeries(e){return this._builder.apply(it(e)),this}setAllSeriesStyle(e){return this._builder.apply(w(e)),this}clearAllSeriesStyle(){return this._builder.apply(p()),this}clearAllSeriesOverrides(){return this._builder.apply(f()),this}},Y=class extends J{setAreaLineStyle(e){return this._builder.apply(E(e)),this}clearAreaLineStyle(){return this._builder.apply(Me()),this}},ii=class extends K{},ai=class extends K{setBubbleMapping(e){return this._builder.apply(pn(e)),this}clearBubbleMapping(){return this._builder.apply(Fe()),this}},oi=class extends G{setCandlestickFields(e){return this._builder.apply(hn(e)),this}clearCandlestickFields(){return this._builder.apply(Ie()),this}setRisingStyle(e){return this._builder.apply(mr(e)),this}clearRisingStyle(){return this._builder.apply(rt()),this}setFallingStyle(e){return this._builder.apply(jn(e)),this}clearFallingStyle(){return this._builder.apply(Ue()),this}setDojiStyle(e){return this._builder.apply(On(e)),this}clearDojiStyle(){return this._builder.apply(Ve()),this}setCandleWidth(e){return this._builder.apply(mn(e)),this}resetCandleWidth(){return this._builder.apply(_t()),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}},si=class extends W{setChordMapping(e){return this._builder.apply(bn(e)),this}setChordLayout(e){return this._builder.apply(yn(e)),this}resetChordLayout(){return this._builder.apply(bt()),this}setChordNode(e){return this._builder.apply(xn(e)),this}resetChordNode(){return this._builder.apply(xt()),this}setChordLabel(e){return this._builder.apply(vn(e)),this}resetChordLabel(){return this._builder.apply(yt()),this}setChordRibbon(e){return this._builder.apply(Sn(e)),this}resetChordRibbon(){return this._builder.apply(St()),this}setChordEmphasis(e){return this._builder.apply(_n(e)),this}resetChordEmphasis(){return this._builder.apply(vt()),this}},X=class extends J{setBar(e){return this._builder.apply(k(e)),this}clearBar(){return this._builder.apply(Pe()),this}},ci=class extends K{setSeriesType(e,t){return this._builder.apply(Tn(e,t)),this}resetSeriesType(e){return this._builder.apply(Tt(e)),this}setSeriesAxis(e,t){return this._builder.apply(wn(e,t)),this}resetSeriesAxis(e){return this._builder.apply(wt(e)),this}},li=class extends W{setGap(e){return this._builder.apply(Mn(e)),this}resetGap(){return this._builder.apply(Dt()),this}setUseAbsoluteValue(e){return this._builder.apply(Ar(e)),this}resetUseAbsoluteValue(){return this._builder.apply(nn()),this}},ui=class extends W{setGaugeValueField(e){return this._builder.apply(qn(e)),this}setGaugeMode(e){return this._builder.apply(zn(e)),this}resetGaugeMode(){return this._builder.apply(Pt()),this}setGaugeScale(e){return this._builder.apply(Un(e)),this}resetGaugeScale(){return this._builder.apply(Rt()),this}setGaugeTicks(e){return this._builder.apply(Gn(e)),this}setGaugeAngles(e){return this._builder.apply(Pn(e)),this}resetGaugeAngles(){return this._builder.apply(kt()),this}setGaugeRanges(e){return this._builder.apply(Hn(e)),this}resetGaugeRanges(){return this._builder.apply(Lt()),this}setGaugeAxisLine(e){return this._builder.apply(In(e)),this}resetGaugeAxisLine(){return this._builder.apply(jt()),this}setGaugeAxisTick(e){return this._builder.apply(Ln(e)),this}resetGaugeAxisTick(){return this._builder.apply(Mt()),this}setGaugeSplitLine(e){return this._builder.apply(Wn(e)),this}resetGaugeSplitLine(){return this._builder.apply(zt()),this}setGaugeAxisLabel(e){return this._builder.apply(Fn(e)),this}resetGaugeAxisLabel(){return this._builder.apply(At()),this}setGaugePointer(e){return this._builder.apply(Bn(e)),this}resetGaugePointer(){return this._builder.apply(Ft()),this}setGaugeAnchor(e){return this._builder.apply(Nn(e)),this}resetGaugeAnchor(){return this._builder.apply(Ot()),this}setGaugeProgress(e){return this._builder.apply(Vn(e)),this}resetGaugeProgress(){return this._builder.apply(It()),this}setGaugeTitle(e){return this._builder.apply(Kn(e)),this}resetGaugeTitle(){return this._builder.apply(Bt()),this}setGaugeDetail(e){return this._builder.apply(Rn(e)),this}resetGaugeDetail(){return this._builder.apply(Nt()),this}},di=class extends G{setVisualMapType(e){return this._builder.apply(Rr(e)),this}resetVisualMapType(){return this._builder.apply(cn()),this}setValueRange(e,t){return this._builder.apply(Fr(e,t)),this}clearValueRange(){return this._builder.apply(pt()),this}setCellLabel(e){return this._builder.apply(gn(e)),this}clearCellLabel(){return this._builder.apply(Re()),this}setValueUnit(e){return this._builder.apply(Lr(e)),this}clearValueUnit(){return this._builder.apply(mt()),this}},Z=class extends K{setHistogramField(e){return this._builder.apply(Qn(e)),this}clearHistogramField(){return this._builder.apply(We()),this}setBinCount(e){return Number.isFinite(e)&&this._builder.apply(Yn(e)),this}setBinWidth(e){return Number.isFinite(e)&&this._builder.apply(Zn(e)),this}resetBinning(){return this._builder.apply(Ut()),this}setUnderflowThreshold(e){return Number.isFinite(e)&&this._builder.apply(er(e)),this}clearUnderflowThreshold(){return this._builder.apply(Ke()),this}setOverflowThreshold(e){return Number.isFinite(e)&&this._builder.apply($n(e)),this}clearOverflowThreshold(){return this._builder.apply(Ge()),this}setBinGap(e){return Number.isFinite(e)&&this._builder.apply(Xn(e)),this}resetBinGap(){return this._builder.apply(Ht()),this}},Q=class extends K{setLineStyle(e){return this._builder.apply(F(e)),this}clearLineStyle(){return this._builder.apply(Je()),this}},fi=class extends J{setLineStyle(e){return this._builder.apply(F(e)),this}clearLineStyle(){return this._builder.apply(Je()),this}},pi=class extends K{setBarStyle(e){return this._builder.apply(ar(e)),this}clearBarStyle(){return this._builder.apply(Qe()),this}setCumulativeLineStyle(e){return this._builder.apply(En(e)),this}clearCumulativeLineStyle(){return this._builder.apply(ze()),this}setIncludeZeroValues(e){return this._builder.apply(tr(e)),this}resetIncludeZeroValues(){return this._builder.apply(Wt()),this}},$=class extends W{setPieComposite(e){return this._builder.apply(or(e)),this}clearPieComposite(){return this._builder.apply($e()),this}setSliceStyle(e,t){return this._builder.apply(gr(e,t)),this}clearSliceStyle(e){return this._builder.apply(ot(e)),this}setDoughnutHole(e){return this._builder.apply(kn(e)),this}clearDoughnutHole(){return this._builder.apply(He()),this}setExplosion(e){return this._builder.apply(j(e)),this}resetExplosion(){return this._builder.apply(b()),this}setSliceBorderColor(e){return this._builder.apply(z(e)),this}clearSliceBorderColor(){return this._builder.apply(at()),this}setPaddingAngleEnabled(e){return this._builder.apply(ir(e)),this}resetPaddingAngleEnabled(){return this._builder.apply(Gt()),this}setHalfPie(e){return this._builder.apply(Jn(e)),this}resetHalfPie(){return this._builder.apply(Vt()),this}setRosePie(e){return this._builder.apply(hr(e)),this}resetRosePie(){return this._builder.apply(Zt()),this}setLabelLineVisible(e){return this._builder.apply(N(e)),this}resetLabelLineVisible(){return this._builder.apply(S()),this}setValueScale(e){return this._builder.apply(Ir(e)),this}resetValueScale(){return this._builder.apply(sn()),this}setPieLabel(e){return this._builder.apply(L(e)),this}clearPieLabel(){return this._builder.apply(et()),this}},mi=class extends ri{setExplosion(e){return this._builder.apply(j(e)),this}resetExplosion(){return this._builder.apply(b()),this}setSliceStyle(e,t){return this._builder.apply(gr(e,t)),this}clearSliceStyle(e){return this._builder.apply(ot(e)),this}setPieLabel(e){return this._builder.apply(L(e)),this}clearPieLabel(){return this._builder.apply(et()),this}setSliceBorderColor(e){return this._builder.apply(z(e)),this}clearSliceBorderColor(){return this._builder.apply(at()),this}setLabelLineVisible(e){return this._builder.apply(N(e)),this}resetLabelLineVisible(){return this._builder.apply(S()),this}},hi=class extends W{setShape(e){return this._builder.apply(lr(e)),this}resetShape(){return this._builder.apply(Jt()),this}setFill(e){return this._builder.apply(cr(e)),this}resetFill(){return this._builder.apply(qt()),this}setRadarAxisLabel(e){return this._builder.apply(sr(e)),this}resetRadarAxisLabel(){return this._builder.apply(Kt()),this}},gi=class extends W{setLayout(e){return this._builder.apply(dr(e)),this}resetLayout(){return this._builder.apply(Yt()),this}setUseValueAsSymbolSize(e){return this._builder.apply(Nr(e)),this}resetUseValueAsSymbolSize(){return this._builder.apply(on()),this}setEmphasisEnabled(e){return this._builder.apply(An(e)),this}resetEmphasisEnabled(){return this._builder.apply(Et()),this}setForce(e){return this._builder.apply(ur(e)),this}clearForce(){return this._builder.apply(tt()),this}setCircularLabelRotation(e){return this._builder.apply(Cn(e)),this}resetCircularLabelRotation(){return this._builder.apply(Ct()),this}setNodeShape(e){return this._builder.apply(fr(e)),this}resetNodeShape(){return this._builder.apply(Xt()),this}},_i=class extends K{},vi=class extends W{setHierarchyFields(e){return this._builder.apply(yr(e)),this}setValueField(e){return this._builder.apply(xr(e)),this}setSunburstLabel(e){return this._builder.apply(br(e)),this}resetSunburstLabel(){return this._builder.apply($t()),this}setCenterLabel(e){return this._builder.apply(vr(e)),this}resetCenterLabel(){return this._builder.apply(Qt()),this}},yi=class extends W{setHierarchyFields(e){return this._builder.apply(Tr(e)),this}setValueField(e){return this._builder.apply(Or(e)),this}setParentLabelLayout(e){return this._builder.apply(Dr(e)),this}resetParentLabelLayout(){return this._builder.apply(tn()),this}setTreemapLabel(e){return this._builder.apply(Er(e)),this}resetTreemapLabel(){return this._builder.apply(en()),this}},bi=class extends K{setPointRoles(e){let t=this._describe().series,n=/* @__PURE__ */ new Map;e.forEach((e,r)=>{if(!Number.isInteger(e.dataPointIndex)||e.dataPointIndex<0)throw Error(`pointRoles.${r} has an invalid data-point index.`);let i=typeof e.series==`number`?xi(e.series,r):Si(e.series.name,t,r);n.set(`${i}:${e.dataPointIndex}`,{...e,series:i})});let r=[...n.values()].sort((e,t)=>e.series-t.series||e.dataPointIndex-t.dataPointIndex);return this._builder.apply(Br(r)),this}setConnector(e){return this._builder.apply(zr(e)),this}clearConnector(){return this._builder.apply(ht()),this}setStackType(e){return this._builder.apply(Vr(e)),this}resetStackType(){return this._builder.apply(ln()),this}setUseSubtotal(e){return this._builder.apply(Mr(e)),this}resetUseSubtotal(){return this._builder.apply(an()),this}setPositiveStyle(e,t){return this._builder.apply(B(e,u.Positive,t)),this}clearPositiveStyle(e){return this._builder.apply(g(e,u.Positive)),this}setNegativeStyle(e,t){return this._builder.apply(B(e,u.Negative,t)),this}clearNegativeStyle(e){return this._builder.apply(g(e,u.Negative)),this}setSubtotalStyle(e,t){return this._builder.apply(B(e,u.Subtotal,t)),this}clearSubtotalStyle(e){return this._builder.apply(g(e,u.Subtotal)),this}};function xi(e,t){if(!Number.isInteger(e)||e<0)throw Error(`pointRoles.${t} has an invalid series index.`);return e}function Si(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 Ci=class extends W{setShape(e){return this._builder.apply(Ur(e)),this}resetShape(){return this._builder.apply(dn()),this}setMaskImage(e){return this._builder.apply(rr(e)),this}clearMaskImage(){return this._builder.apply(Xe()),this}setRepeat(e){return this._builder.apply(Hr(e)),this}resetRepeat(){return this._builder.apply(un()),this}};const wi=/* @__PURE__ */ new Map;function Ti(e,t){wi.set(e,t)}function Ei(e){let t=wi.get(e);if(!t)throw Error(`Chart builder is not registered: ${String(e)}`);return t}const Di={[l.Line3D]:fi,[l.Column3D]:X,[l.ColumnStacked3D]:X,[l.ColumnPercentStacked3D]:X,[l.Bar3D]:X,[l.BarStacked3D]:X,[l.BarPercentStacked3D]:X,[l.Pie3D]:mi,[l.Area3D]:Y,[l.AreaStacked3D]:Y,[l.AreaPercentStacked3D]:Y,[l.Line]:Q,[l.LineStacked]:Q,[l.LinePercentStacked]:Q,[l.Column]:K,[l.ColumnStacked]:K,[l.ColumnPercentStacked]:K,[l.Bar]:K,[l.BarStacked]:K,[l.BarPercentStacked]:K,[l.Pie]:$,[l.Donut]:$,[l.Area]:q,[l.AreaStacked]:q,[l.AreaPercentStacked]:q,[l.Radar]:hi,[l.Scatter]:_i,[l.Combination]:ci,[l.WordCloud]:Ci,[l.Funnel]:li,[l.Bubble]:ai,[l.Relation]:gi,[l.Waterfall]:bi,[l.Pareto]:pi,[l.Sankey]:W,[l.Heatmap]:di,[l.Boxplot]:ii,[l.Candlestick]:oi,[l.Histogram]:Z,[l.Treemap]:yi,[l.Sunburst]:vi,[l.Gauge]:ui,[l.Chord]:si};for(let e of Object.keys(Di))Ti(e,Di[e]);var Oi=/* @__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}(Oi||{}),ki=class extends Xr{get ChartAggregationTarget(){return n}get ChartTrendlineType(){return pe}get ChartAppearanceTarget(){return i}get ChartAxisName(){return a}get ChartAxisPointerTarget(){return o}get ChartAxisTarget(){return s}get ChartAxisTickPosition(){return c}get ChartMarkLineLabelPosition(){return oe}get ChartSemanticAxis(){return se}get ChartChordFocusMode(){return te}get ChartChordLabelPosition(){return ne}get ChartChordRibbonColorMode(){return re}get ChartGaugeMode(){return ie}get ChartGaugePointerShape(){return ae}get ChartSeriesAxis(){return ce}get ChartSeriesClearTarget(){return le}get ChartAllSeriesStyleTarget(){return r}get ChartSeriesTypeString(){return ue}get ChartSunburstLabelPosition(){return de}get ChartTypeString(){return l}get ChartThemeName(){return Oi}get ChartVisualMapType(){return me}get ChartWaterfallStyleTarget(){return u}get ChartWaterfallPointRole(){return he}get ChartAreaLineStyle(){return t}get ChartInvalidValueType(){return _e}get ChartLabelAlignEnum(){return ve}get ChartLegendPositionEnum(){return ye}get ChartLinePointShape(){return be}get ChartPieLabelPosition(){return xe}get ChartPieSecondaryPlotType(){return Se}get ChartRadarShape(){return Ce}get ChartRelationChartLayoutEnum(){return we}get ChartSelectModeEnum(){return Te}get ChartSeriesLabelPosition(){return Ee}get ChartTitlePositionEnum(){return De}get ChartTreemapParentLabelLayout(){return Oe}get ChartWaterfallStackTypeEnum(){return ke}get ChartWordCloudShapeEnum(){return Ae}};Xr.extend(ki);var Ai=class extends Zr{registerTheme(e,t){this._injector.get(fe).registerTheme(e,t)}};Zr.extend(Ai);function ji(e,t,n=Ni(e)){return new t({builder:e,...n})}function Mi(e,t,n=Ni(e)){return ji(e,Ei(t),n)}function Ni(e){return{info:{dataSource:[]},normalizeSource:e=>e,createConfig:()=>Kr(e.describe(),e.getPendingConfig()),requireSource:!1}}function Pi(t){let n=`info`in t,r=n?t.description.id:Jr(),i=n?{...H.deepClone(t.description),type:t.type}:{id:r,type:t.type,autoGradientFill:e.has(t.type),series:{}};if(n){let e=[l.Bar,l.BarStacked,l.BarPercentStacked];if(e.includes(t.description.type)!==e.includes(t.type)){let e=i.axes;e&&(i.axes={...e,x:e.y,y:e.x})}}let a=n?Fi(i):new ge(i,t.commitError,t.injector),o=new ee(r,i,a),s=H.deepClone(n?t.info:{position:void 0,size:void 0,...t.createInfo()}),c=Mi(o,t.type,{info:s,normalizeSource:t.normalizeSource,createConfig:n?()=>qr(o.describe(),o.getPendingConfig()):()=>Kr(o.describe(),o.getPendingConfig()),requireSource:!n});return Object.assign(c,t.extension({getInfo:e=>H.deepClone(s[e]),setInfo:(e,t)=>{s[e]=H.deepClone(t)},setAbsolutePosition:(e,t)=>{c.setAbsolutePosition(e,t)},setSize:(e,t)=>{c.setSize(e,t)}}))}function Fi(e){return{describe:()=>H.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 Ii=class extends Yr{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 H.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(H.deepClone(e)),this}setType(e){return this._commit({type:e})}setTitle(e){return this._apply(wr(e))}clearTitle(){return this._apply(ut())}setSubtitle(e){return this._apply(_r(e))}clearSubtitle(){return this._apply(st())}setLegend(e){return this._apply(P(e))}clearLegend(){return this._apply(qe())}setTheme(e){return this._apply(Sr(e))}clearTheme(){return this._apply(ct())}setPalette(e){return this._apply(I(e))}clearPalette(){return this._apply(Ze())}setAppearance(e){return this._apply(T(e))}clearAppearance(e){return this._apply(m(e))}setAutoGradientFill(e){return this._apply(D(e))}resetAutoGradientFill(){return this._apply(y())}setInvalidValueStrategy(e){return this._apply(M(e))}resetInvalidValueStrategy(){return this._apply(x())}setCategoryField(e){return this._apply(A(e))}setSeriesToCategory(e){return this._commit({mapping:{seriesToCategory:je({seriesToCategory:e}).seriesToCategory}})}setCategoryFields(e){return this._commit(Qr(e))}clearCategoryFields(){return this._commit($r())}setMultiLevelCategoryAxis(e){return this._commit({mapping:{multiLevelCategoryAxis:e}})}clearCategoryField(){return this._apply(Le())}setValueFields(e){return this._apply(Pr(e))}clearValueFields(){return this._apply(ft())}setAggregation(e){return this._apply(C(e))}clearAggregation(e){return this._apply(d(e))}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(V.front)}bringForward(){return this._arrange(V.forward)}sendBackward(){return this._arrange(V.backward)}sendToBack(){return this._arrange(V.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}};const Li=6;export{Li as CHART_FACADE_RANDOM_ID_LENGTH,q as FAreaChartBuilder,G as FAxisChartBuilder,ii as FBoxplotChartBuilder,ai as FBubbleChartBuilder,oi as FCandlestickChartBuilder,K as FCartesianChartBuilder,Ii as FChart,W as FChartBuilderBase,si as FChordChartBuilder,ci as FCombinationChartBuilder,li as FFunnelChartBuilder,ui as FGaugeChartBuilder,di as FHeatmapChartBuilder,Z as FHistogramChartBuilder,Q as FLineChartBuilder,pi as FParetoChartBuilder,$ as FPieChartBuilder,hi as FRadarChartBuilder,gi as FRelationChartBuilder,_i as FScatterChartBuilder,vi as FSunburstChartBuilder,yi as FTreemapChartBuilder,bi as FWaterfallChartBuilder,Ci as FWordCloudChartBuilder,Pi as createChartBuilder};
|