@univerjs-pro/engine-chart 1.0.0-beta.0 → 1.0.0-beta.1
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/README.md +9 -0
- package/lib/cjs/facade.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/locale/ar-SA.js +1 -1
- package/lib/cjs/locale/ca-ES.js +1 -1
- package/lib/cjs/locale/de-DE.js +1 -1
- package/lib/cjs/locale/en-US.js +1 -1
- package/lib/cjs/locale/es-ES.js +1 -1
- package/lib/cjs/locale/fa-IR.js +1 -1
- package/lib/cjs/locale/fr-FR.js +1 -1
- package/lib/cjs/locale/id-ID.js +1 -1
- package/lib/cjs/locale/it-IT.js +1 -1
- package/lib/cjs/locale/ja-JP.js +1 -1
- package/lib/cjs/locale/ko-KR.js +1 -1
- package/lib/cjs/locale/pl-PL.js +1 -1
- package/lib/cjs/locale/pt-BR.js +1 -1
- package/lib/cjs/locale/ru-RU.js +1 -1
- package/lib/cjs/locale/sk-SK.js +1 -1
- package/lib/cjs/locale/vi-VN.js +1 -1
- package/lib/cjs/locale/zh-CN.js +1 -1
- package/lib/cjs/locale/zh-HK.js +1 -1
- package/lib/cjs/locale/zh-TW.js +1 -1
- package/lib/es/facade.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/es/locale/ar-SA.js +1 -1
- package/lib/es/locale/ca-ES.js +1 -1
- package/lib/es/locale/de-DE.js +1 -1
- package/lib/es/locale/en-US.js +1 -1
- package/lib/es/locale/es-ES.js +1 -1
- package/lib/es/locale/fa-IR.js +1 -1
- package/lib/es/locale/fr-FR.js +1 -1
- package/lib/es/locale/id-ID.js +1 -1
- package/lib/es/locale/it-IT.js +1 -1
- package/lib/es/locale/ja-JP.js +1 -1
- package/lib/es/locale/ko-KR.js +1 -1
- package/lib/es/locale/pl-PL.js +1 -1
- package/lib/es/locale/pt-BR.js +1 -1
- package/lib/es/locale/ru-RU.js +1 -1
- package/lib/es/locale/sk-SK.js +1 -1
- package/lib/es/locale/vi-VN.js +1 -1
- package/lib/es/locale/zh-CN.js +1 -1
- package/lib/es/locale/zh-HK.js +1 -1
- package/lib/es/locale/zh-TW.js +1 -1
- package/lib/facade.js +1 -1
- package/lib/index.js +1 -1
- package/lib/locale/ar-SA.js +1 -1
- package/lib/locale/ca-ES.js +1 -1
- package/lib/locale/de-DE.js +1 -1
- package/lib/locale/en-US.js +1 -1
- package/lib/locale/es-ES.js +1 -1
- package/lib/locale/fa-IR.js +1 -1
- package/lib/locale/fr-FR.js +1 -1
- package/lib/locale/id-ID.js +1 -1
- package/lib/locale/it-IT.js +1 -1
- package/lib/locale/ja-JP.js +1 -1
- package/lib/locale/ko-KR.js +1 -1
- package/lib/locale/pl-PL.js +1 -1
- package/lib/locale/pt-BR.js +1 -1
- package/lib/locale/ru-RU.js +1 -1
- package/lib/locale/sk-SK.js +1 -1
- package/lib/locale/vi-VN.js +1 -1
- package/lib/locale/zh-CN.js +1 -1
- package/lib/locale/zh-HK.js +1 -1
- package/lib/locale/zh-TW.js +1 -1
- package/lib/types/chart-builder/chart-builder-adapter.d.ts +1 -3
- package/lib/types/chart-builder/chart-builder.d.ts +2 -5
- package/lib/types/chart-builder/chart-live-adapter.d.ts +15 -0
- package/lib/types/chart-builder/chart-types.d.ts +17 -0
- package/lib/types/chart-builder/configuration/cartesian-series.d.ts +1 -0
- package/lib/types/chart-builder/configuration/chart-config-group.d.ts +38 -0
- package/lib/types/chart-builder/configuration/chart-config-operation.d.ts +1 -38
- package/lib/types/chart-builder/configuration/gauge.d.ts +1 -1
- package/lib/types/chart-builder/conversion/chart-config-converter.d.ts +24 -11
- package/lib/types/chart-builder/conversion/chart-create-config.d.ts +6 -0
- package/lib/types/chart-builder/conversion/chart-model-fields.d.ts +17 -0
- package/lib/types/chart-builder/conversion/describe-chart-model.d.ts +0 -127
- package/lib/types/chart-builder/detached-chart-builder-adapter.d.ts +1 -10
- package/lib/types/chart-builder/internal/apply-pending-to-description.d.ts +2 -0
- package/lib/types/chart-builder/internal/chart-host-config-adapter.d.ts +3 -0
- package/lib/types/chart-builder/internal/chart-pending-patch.d.ts +11 -0
- package/lib/types/chart-builder/internal/patch-interpreter.d.ts +17 -0
- package/lib/types/facade/builders/f-area-chart-builder.d.ts +52 -7
- package/lib/types/facade/builders/f-boxplot-chart-builder.d.ts +88 -3
- package/lib/types/facade/builders/f-bubble-chart-builder.d.ts +59 -6
- package/lib/types/facade/builders/f-candlestick-chart-builder.d.ts +90 -31
- package/lib/types/facade/builders/f-chord-chart-builder.d.ts +180 -8
- package/lib/types/facade/builders/f-combination-chart-builder.d.ts +55 -10
- package/lib/types/facade/builders/f-funnel-chart-builder.d.ts +55 -9
- package/lib/types/facade/builders/f-gauge-chart-builder.d.ts +378 -10
- package/lib/types/facade/builders/f-heatmap-chart-builder.d.ts +83 -26
- package/lib/types/facade/builders/f-histogram-chart-builder.d.ts +142 -16
- package/lib/types/facade/builders/f-line-chart-builder.d.ts +51 -6
- package/lib/types/facade/builders/f-pareto-chart-builder.d.ts +83 -20
- package/lib/types/facade/builders/f-pie-chart-builder.d.ts +131 -47
- package/lib/types/facade/builders/f-radar-chart-builder.d.ts +64 -11
- package/lib/types/facade/builders/f-relation-chart-builder.d.ts +72 -38
- package/lib/types/facade/builders/f-scatter-chart-builder.d.ts +58 -6
- package/lib/types/facade/builders/f-sunburst-chart-builder.d.ts +122 -8
- package/lib/types/facade/builders/f-treemap-chart-builder.d.ts +115 -13
- package/lib/types/facade/builders/f-waterfall-chart-builder.d.ts +87 -53
- package/lib/types/facade/builders/f-word-cloud-chart-builder.d.ts +64 -15
- package/lib/types/facade/chart-builder-registry.d.ts +4 -4
- package/lib/types/facade/chart-builder-type-map.d.ts +35 -32
- package/lib/types/facade/chart-host-builder-types.d.ts +2 -21
- package/lib/types/facade/create-chart-builder.d.ts +46 -0
- package/lib/types/facade/f-axis-chart-builder.d.ts +21 -38
- package/lib/types/facade/f-cartesian-chart-builder.d.ts +32 -20
- package/lib/types/facade/f-chart-builder-base.d.ts +202 -73
- package/lib/types/facade/f-chart.d.ts +652 -0
- package/lib/types/facade/f-enum.d.ts +684 -31
- package/lib/types/facade/f-univer.d.ts +51 -0
- package/lib/types/facade/index.d.ts +7 -9
- package/lib/types/facade/internal/chart-builder-facade-context.d.ts +11 -10
- package/lib/types/index.d.ts +25 -15
- package/lib/types/models/chart-context/resolve-chart-context.d.ts +3 -0
- package/lib/types/models/chart-data/chart-field-consumption-validator.d.ts +1 -1
- package/lib/types/models/chart-host/config/chart-config-interpreter.d.ts +13 -0
- package/lib/types/models/chart-host/resource/chart-data-source-resolver.d.ts +58 -0
- package/lib/types/models/chart-host/resource/chart-resource-repository.d.ts +111 -0
- package/lib/types/models/chart-host/resource/chart-resource-serializer.d.ts +2 -1
- package/lib/types/models/chart-host/resource/inline-chart-table.d.ts +4 -3
- package/lib/types/models/chart-host/resource/persisted-chart-style.d.ts +3 -0
- package/lib/types/models/chart-host/resource/resource-ref-chart-data-source.adapter.d.ts +22 -0
- package/lib/types/models/chart-host/resource/resource-ref-chart-data-source.provider.d.ts +12 -0
- package/lib/types/models/chart-host/static/chart-model-store.d.ts +56 -0
- package/lib/types/models/chart-host/static/{static-chart-runtime.d.ts → chart-runtime.d.ts} +6 -5
- package/lib/types/models/chart-model/chart-model.d.ts +2 -383
- package/lib/types/models/chart-render/axes/chart-runtime-axes.d.ts +2 -2
- package/lib/types/models/chart-render/chart-render-input-resolver.d.ts +2 -2
- package/lib/types/models/chart-render/converter/converters/gauge-chart-converter.d.ts +5 -3
- package/lib/types/models/chart-render/converter/echart-text-overflow.d.ts +7 -0
- package/lib/types/models/chart-render/converter/render-spec-operators/grid-operator.d.ts +3 -3
- package/lib/types/models/chart-render/converter/render-spec-operators/legend-size.d.ts +1 -2
- package/lib/types/models/chart-render/converter/render-spec-operators/series-style-operator/series-style-operator.d.ts +2 -2
- package/lib/types/models/chart-render/converter/render-spec-operators/tool-tip-operator.d.ts +3 -13
- package/lib/types/models/chart-render/converter/render-spec-operators/tools.d.ts +4 -4
- package/lib/types/models/chart-render/converter/render-spec-operators/visual-map-operator.d.ts +4 -0
- package/lib/types/models/chart-render/echart-render-model.d.ts +7 -0
- package/lib/types/models/chart-render/edit-overlay/chart-element-edit-overlay.d.ts +1 -1
- package/lib/types/models/chart-render/edit-overlay/resolve-chart-element-hit-layout.d.ts +1 -1
- package/lib/types/models/chart-render/style/chart-runtime-style.d.ts +0 -1
- package/lib/types/models/common/constants/default-chart-style.d.ts +53 -53
- package/lib/types/models/common/constants/default.d.ts +3 -2
- package/lib/types/plugin.d.ts +1 -1
- package/lib/types/types.d.ts +2 -4
- package/lib/types/utils/compact.d.ts +6 -0
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/ar-SA.js +1 -1
- package/lib/umd/locale/ca-ES.js +1 -1
- package/lib/umd/locale/de-DE.js +1 -1
- package/lib/umd/locale/en-US.js +1 -1
- package/lib/umd/locale/es-ES.js +1 -1
- package/lib/umd/locale/fa-IR.js +1 -1
- package/lib/umd/locale/fr-FR.js +1 -1
- package/lib/umd/locale/id-ID.js +1 -1
- package/lib/umd/locale/it-IT.js +1 -1
- package/lib/umd/locale/ja-JP.js +1 -1
- package/lib/umd/locale/ko-KR.js +1 -1
- package/lib/umd/locale/pl-PL.js +1 -1
- package/lib/umd/locale/pt-BR.js +1 -1
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/sk-SK.js +1 -1
- package/lib/umd/locale/vi-VN.js +1 -1
- package/lib/umd/locale/zh-CN.js +1 -1
- package/lib/umd/locale/zh-HK.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +6 -5
- package/lib/types/chart-builder/internal/host-builder-runtime.d.ts +0 -3
- package/lib/types/chart-builder/internal/merge-description.d.ts +0 -2
- package/lib/types/facade/f-chart-base.d.ts +0 -82
- package/lib/types/facade/f-charts-base.d.ts +0 -74
- package/lib/types/facade/internal/host-builder-composer.d.ts +0 -16
- package/lib/types/models/chart-host/resource/static-chart-resource-repository.d.ts +0 -75
- package/lib/types/models/chart-host/static/static-chart-model-store.d.ts +0 -43
package/lib/locale/zh-CN.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function _0x5ade(_0x456bb3,_0x1dcbbd){_0x456bb3=_0x456bb3-0x1a3;const _0x4958d5=_0x4958();let _0x5aded5=_0x4958d5[_0x456bb3];return _0x5aded5;}const _0x3c8d7e=_0x5ade;(function(_0x364508,_0x4d05e8){const _0x9174af=_0x5ade,_0x2bbfe2=_0x364508();while(!![]){try{const _0xfa2111=-parseInt(_0x9174af(0x1b0))/0x1*(-parseInt(_0x9174af(0x1bc))/0x2)+-parseInt(_0x9174af(0x1bb))/0x3+parseInt(_0x9174af(0x1ba))/0x4+parseInt(_0x9174af(0x1a4))/0x5*(parseInt(_0x9174af(0x1a5))/0x6)+parseInt(_0x9174af(0x1ae))/0x7+-parseInt(_0x9174af(0x1b8))/0x8*(parseInt(_0x9174af(0x1be))/0x9)+parseInt(_0x9174af(0x1b2))/0xa*(-parseInt(_0x9174af(0x1ad))/0xb);if(_0xfa2111===_0x4d05e8)break;else _0x2bbfe2['push'](_0x2bbfe2['shift']());}catch(_0x3845dc){_0x2bbfe2['push'](_0x2bbfe2['shift']());}}}(_0x4958,0x2af9b));function _0x4958(){const _0x4d92ce=['183872xZFmGi','累积占比','27droszc','自身值','302905sdXGpU','30mBtTry','关系图数据源为额外添加类型列在第二列的共词矩阵','中位数','最小值','弦图需要不同的来源字段和目标字段,并可选一个与二者不同的数值字段。','(空)','系列\x20{0}','矩形树图至少需要一个层级字段和一个数值字段。','11OWTTMx','1770377NByMVf','关联值','2gDLtWL','关系计数','3786820ROBcXJ','成员数','最大值','第一四分位数','桑基图不能包含循环数据','旭日图至少需要一个层级字段和一个数值字段。','179672OtsnCM','弦图至少需要两个不同节点之间的一条正权重关系。','550620GNbLPk','765771lGwaHd'];_0x4958=function(){return _0x4d92ce;};return _0x4958();}const e={'engine-chart':{'seriesDefaultName':_0x3c8d7e(0x1ab),'categoryDefaultName':'类别\x20{0}','blank':_0x3c8d7e(0x1aa),'boxplotMin':_0x3c8d7e(0x1a8),'boxplotQ1':_0x3c8d7e(0x1b5),'boxplotMedian':_0x3c8d7e(0x1a7),'boxplotQ3':'第三四分位数','boxplotMax':_0x3c8d7e(0x1b4),'bubbleEmptyTips':'气泡图至少需要2列,X轴、Y轴。','cloudWord':'词语','cloudFrequency':'频率','msgEmptyTips':'请先添加系列开始数据可视化','msgSankeyCircularTips':_0x3c8d7e(0x1b6),'paretoLineName':_0x3c8d7e(0x1bd),'pieAggregateOther':'其他','pieAggregateMembers':_0x3c8d7e(0x1b3),'relationEmptyTips':_0x3c8d7e(0x1a6),'waterfallPositive':'正值','waterfallNegative':'负值','waterfallSubtotal':'小计','candlestickSeries':'OHLC\x20系列','candlestickCategory':'类别','candlestickOpen':'开盘','candlestickHigh':'最高','candlestickLow':'最低','candlestickClose':'收盘','histogramFrequency':'频数','treemapEmptyTips':_0x3c8d7e(0x1ac),'treemapOwnValue':_0x3c8d7e(0x1a3),'treemapChildren':'子项','sunburstEmptyTips':_0x3c8d7e(0x1b7),'sunburstOwnValue':_0x3c8d7e(0x1a3),'sunburstChildren':'子项','gaugeEmptyTips':'仪表图至少需要一个有限数值。','gaugeInvalidMapping':'仪表图需要一个标签字段且只能有一个数值字段。','gaugeInvalidConfig':'仪表图配置无效,请检查刻度范围、分段区间、比例和尺寸。','chordEmptyTips':_0x3c8d7e(0x1b9),'chordInvalidMapping':_0x3c8d7e(0x1a9),'chordInvalidConfig':'弦图配置无效,请检查角度、半径、不透明度和尺寸。','chordCount':_0x3c8d7e(0x1b1),'chordAssociatedValue':_0x3c8d7e(0x1af)}};export{e as default};
|
package/lib/locale/zh-HK.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function _0x4bc1(_0x3e1da4,_0x2c107d){_0x3e1da4=_0x3e1da4-0x192;const _0xcd961e=_0xcd96();let _0x4bc15d=_0xcd961e[_0x3e1da4];return _0x4bc15d;}const _0x53de37=_0x4bc1;(function(_0x232925,_0x2994b0){const _0xcf61e0=_0x4bc1,_0x2e0d0b=_0x232925();while(!![]){try{const _0xd6edb7=-parseInt(_0xcf61e0(0x193))/0x1+-parseInt(_0xcf61e0(0x195))/0x2*(-parseInt(_0xcf61e0(0x19a))/0x3)+parseInt(_0xcf61e0(0x1a9))/0x4+parseInt(_0xcf61e0(0x1ad))/0x5+-parseInt(_0xcf61e0(0x19f))/0x6+parseInt(_0xcf61e0(0x1a2))/0x7*(parseInt(_0xcf61e0(0x1ac))/0x8)+parseInt(_0xcf61e0(0x194))/0x9*(-parseInt(_0xcf61e0(0x1a5))/0xa);if(_0xd6edb7===_0x2994b0)break;else _0x2e0d0b['push'](_0x2e0d0b['shift']());}catch(_0x3be9c2){_0x2e0d0b['push'](_0x2e0d0b['shift']());}}}(_0xcd96,0xcf85b));const e={'engine-chart':{'seriesDefaultName':_0x53de37(0x197),'categoryDefaultName':'類別\x20{0}','blank':_0x53de37(0x19b),'boxplotMin':_0x53de37(0x1a7),'boxplotQ1':'第一四分位數','boxplotMedian':'中位數','boxplotQ3':_0x53de37(0x1a3),'boxplotMax':_0x53de37(0x198),'bubbleEmptyTips':_0x53de37(0x1a6),'cloudWord':'詞','cloudFrequency':'頻率','msgEmptyTips':'請先添加系列開始數據可視化','msgSankeyCircularTips':'桑基圖不能包含循環數據','paretoLineName':_0x53de37(0x1a1),'pieAggregateOther':'其他','pieAggregateMembers':'成員','relationEmptyTips':'關係圖資料來源為額外新增類型欄在第二欄的共詞矩陣','waterfallPositive':'正值','waterfallNegative':'負值','waterfallSubtotal':'小計','candlestickSeries':_0x53de37(0x1a4),'candlestickCategory':'類別','candlestickOpen':'開盤價','candlestickHigh':_0x53de37(0x196),'candlestickLow':_0x53de37(0x1ab),'candlestickClose':_0x53de37(0x1a8),'histogramFrequency':'頻數','treemapEmptyTips':_0x53de37(0x199),'treemapOwnValue':_0x53de37(0x19e),'treemapChildren':'子項','sunburstEmptyTips':_0x53de37(0x1aa),'sunburstOwnValue':_0x53de37(0x19e),'sunburstChildren':'子項','gaugeEmptyTips':_0x53de37(0x192),'gaugeInvalidMapping':_0x53de37(0x19c),'gaugeInvalidConfig':'儀表圖設定無效,請檢查刻度範圍、分段區間、比例和尺寸。','chordEmptyTips':'弦圖至少需要兩個不同節點之間的一條正權重關係。','chordInvalidMapping':_0x53de37(0x1a0),'chordInvalidConfig':'弦圖設定無效,請檢查角度、半徑、不透明度和尺寸。','chordCount':_0x53de37(0x19d),'chordAssociatedValue':'關聯值'}};function _0xcd96(){const _0x511e1d=['第三四分位數','OHLC\x20數列','84650ZCyScL','氣泡圖至少需要2欄,X軸、Y軸。','最小值','收盤價','4562060RcUyGQ','旭日圖至少需要一個階層欄位和一個數值欄位。','最低價','2664dgguHG','1463375graqGx','儀表圖至少需要一個有限數值。','771161nQuNVw','333muYlVn','650092uuDHDM','最高價','系列\x20{0}','最大值','矩形樹圖至少需要一個階層欄位和一個數值欄位。','15OFULZI','(空)','儀表圖需要一個標籤欄位,而且只能有一個數值欄位。','關係數','自身值','8216784ZOxCho','弦圖需要不同的來源與目標欄位,並可選擇一個與兩者不同的數值欄位。','累積占比','5159mGpQbJ'];_0xcd96=function(){return _0x511e1d;};return _0xcd96();}export{e as default};
|
package/lib/locale/zh-TW.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const _0x180935=_0x199f;(function(_0x57b8fb,_0x3672db){const _0x1e7a51=_0x199f,_0x4f1653=_0x57b8fb();while(!![]){try{const _0x2ce9c8=parseInt(_0x1e7a51(0xbd))/0x1+parseInt(_0x1e7a51(0xce))/0x2*(parseInt(_0x1e7a51(0xc6))/0x3)+-parseInt(_0x1e7a51(0xd4))/0x4+parseInt(_0x1e7a51(0xc0))/0x5+parseInt(_0x1e7a51(0xcf))/0x6*(parseInt(_0x1e7a51(0xd3))/0x7)+-parseInt(_0x1e7a51(0xc9))/0x8+parseInt(_0x1e7a51(0xc1))/0x9*(-parseInt(_0x1e7a51(0xc3))/0xa);if(_0x2ce9c8===_0x3672db)break;else _0x4f1653['push'](_0x4f1653['shift']());}catch(_0x99fe79){_0x4f1653['push'](_0x4f1653['shift']());}}}(_0x44ce,0x26910));const e={'engine-chart':{'seriesDefaultName':_0x180935(0xbc),'categoryDefaultName':'類別\x20{0}','blank':'(空)','boxplotMin':_0x180935(0xbe),'boxplotQ1':'第一四分位數','boxplotMedian':'中位數','boxplotQ3':_0x180935(0xcd),'boxplotMax':_0x180935(0xb9),'bubbleEmptyTips':_0x180935(0xc5),'cloudWord':'詞','cloudFrequency':'頻率','msgEmptyTips':'請先添加系列開始數據可視化','msgSankeyCircularTips':'桑基圖不能包含循環數據','paretoLineName':'累積占比','pieAggregateOther':'其他','pieAggregateMembers':'成員','relationEmptyTips':_0x180935(0xd2),'waterfallPositive':'正值','waterfallNegative':'負值','waterfallSubtotal':'小計','candlestickSeries':_0x180935(0xc7),'candlestickCategory':'類別','candlestickOpen':_0x180935(0xd1),'candlestickHigh':_0x180935(0xcb),'candlestickLow':_0x180935(0xcc),'candlestickClose':_0x180935(0xb8),'histogramFrequency':'頻數','treemapEmptyTips':'矩形樹圖至少需要一個階層欄位和一個數值欄位。','treemapOwnValue':'自身值','treemapChildren':'子項','sunburstEmptyTips':'旭日圖至少需要一個階層欄位和一個數值欄位。','sunburstOwnValue':_0x180935(0xc8),'sunburstChildren':'子項','gaugeEmptyTips':_0x180935(0xc4),'gaugeInvalidMapping':_0x180935(0xba),'gaugeInvalidConfig':_0x180935(0xc2),'chordEmptyTips':_0x180935(0xca),'chordInvalidMapping':_0x180935(0xbb),'chordInvalidConfig':'弦圖設定無效,請檢查角度、半徑、不透明度和尺寸。','chordCount':_0x180935(0xd0),'chordAssociatedValue':_0x180935(0xbf)}};function _0x44ce(){const _0x273ba0=['儀表圖至少需要一個有限數值。','氣泡圖至少需要2欄,X軸、Y軸。','102oRVgbb','OHLC\x20數列','自身值','955272NPAcEe','弦圖至少需要兩個不同節點之間的一條正權重關係。','最高價','最低價','第三四分位數','15102KmAvof','6aMKmtQ','關係數','開盤價','關係圖資料來源為額外新增類型欄在第二欄的共詞矩陣','2075059uZcdPM','358240upDpZl','收盤價','最大值','儀表圖需要一個標籤欄位,而且只能有一個數值欄位。','弦圖需要不同的來源與目標欄位,並可選擇一個與兩者不同的數值欄位。','系列\x20{0}','259486yQFxwr','最小值','關聯值','1295950KIsvnp','27FLyirY','儀表圖設定無效,請檢查刻度範圍、分段區間、比例和尺寸。','2349700ezgGuO'];_0x44ce=function(){return _0x273ba0;};return _0x44ce();}function _0x199f(_0x5193ef,_0x1c46fd){_0x5193ef=_0x5193ef-0xb8;const _0x44ce18=_0x44ce();let _0x199f08=_0x44ce18[_0x5193ef];return _0x199f08;}export{e as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IChartData,
|
|
1
|
+
import type { IChartData, IUniverDataSet } from '../types';
|
|
2
2
|
import type { ChartPendingConfig, IChartDescription } from './chart-types';
|
|
3
3
|
/** Host-owned persistence and rendering capabilities used by a chart builder. */
|
|
4
4
|
export interface IChartBuilderAdapter<THostDescription extends object = object> {
|
|
@@ -8,6 +8,4 @@ export interface IChartBuilderAdapter<THostDescription extends object = object>
|
|
|
8
8
|
commit(config: ChartPendingConfig): void;
|
|
9
9
|
/** Materializes fresh engine semantic data for the effective pending state without mutating the host. */
|
|
10
10
|
resolveData(config: ChartPendingConfig): IChartData;
|
|
11
|
-
/** Renders the hosted chart as an image when rendering is available. */
|
|
12
|
-
exportImage(options?: IChartRenderModelImageExportOptions): Promise<IChartRenderModelImageExportResult | null>;
|
|
13
11
|
}
|
|
@@ -12,10 +12,8 @@ export declare class ChartBuilder<THostDescription extends object = object> {
|
|
|
12
12
|
protected _pending: ChartPendingConfig;
|
|
13
13
|
/** Creates a builder for one chart identity and host adapter. */
|
|
14
14
|
constructor(id: string, baseline: IChartDescription & THostDescription, adapter: IChartBuilderAdapter<THostDescription>);
|
|
15
|
-
/** Returns the
|
|
15
|
+
/** Returns the chart type fixed by the builder baseline. */
|
|
16
16
|
get type(): ChartTypeString;
|
|
17
|
-
/** Changes the chart type and discards pending options that the new type cannot represent. */
|
|
18
|
-
setType(type: ChartTypeString): void;
|
|
19
17
|
/** Merges a semantic patch into the pending configuration. */
|
|
20
18
|
mergePending(patch: ChartPendingConfig): void;
|
|
21
19
|
/** Applies one typed configuration operation to the pending state. */
|
|
@@ -25,12 +23,11 @@ export declare class ChartBuilder<THostDescription extends object = object> {
|
|
|
25
23
|
/** Materializes a fresh deeply read-only engine data result for this hosted builder. */
|
|
26
24
|
resolveData(): DeepReadonly<IChartData>;
|
|
27
25
|
/** Persists pending changes through the host adapter and refreshes the baseline. */
|
|
28
|
-
commit(): void
|
|
26
|
+
commit(): void | Promise<void>;
|
|
29
27
|
protected refreshBaseline(): void;
|
|
30
28
|
/** Supplies host-owned pending data when `describe()` needs to refresh source metadata. */
|
|
31
29
|
protected getDescriptionDataSetOverride(): IUniverDataSet | undefined;
|
|
32
30
|
/** Adds host-owned pending fields before the public description is frozen. */
|
|
33
31
|
protected composeHostDescription(description: IChartDescription & THostDescription): IChartDescription & THostDescription;
|
|
34
32
|
private _assertValidPieCompositePatch;
|
|
35
|
-
private _discardIncompatiblePending;
|
|
36
33
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ArrangeTypeEnum } from '@univerjs/core';
|
|
2
|
+
import type { ChartPendingConfig, IChartDescription, IChartInfo } from './chart-types';
|
|
3
|
+
/** Host persistence boundary used by the common live Chart facade. */
|
|
4
|
+
export interface IChartLiveAdapter<TSource, TInfo = IChartInfo<TSource>> {
|
|
5
|
+
describe(): IChartDescription;
|
|
6
|
+
getInfo(): TInfo;
|
|
7
|
+
update(info: TInfo): Promise<void> | void;
|
|
8
|
+
commit(config: ChartPendingConfig): void;
|
|
9
|
+
setDataSource(source: TSource): Promise<void> | void;
|
|
10
|
+
setAbsolutePosition(x: number, y: number): void;
|
|
11
|
+
setSize(width: number, height: number): void;
|
|
12
|
+
arrange(type: ArrangeTypeEnum): void;
|
|
13
|
+
setZOrder(index: number): void;
|
|
14
|
+
remove(): Promise<boolean> | boolean;
|
|
15
|
+
}
|
|
@@ -555,6 +555,23 @@ interface IChartSemanticConfig {
|
|
|
555
555
|
/** Persisted absolute series colors. A non-empty value overrides theme colors. */
|
|
556
556
|
palette?: string[];
|
|
557
557
|
}
|
|
558
|
+
/** Absolute Chart position in host coordinates. */
|
|
559
|
+
export interface IChartPosition {
|
|
560
|
+
x: number;
|
|
561
|
+
y: number;
|
|
562
|
+
}
|
|
563
|
+
/** Chart frame size in host coordinates. */
|
|
564
|
+
export interface IChartSize {
|
|
565
|
+
width: number;
|
|
566
|
+
height: number;
|
|
567
|
+
}
|
|
568
|
+
/** Detached information shared by host-specific Chart insertion APIs. */
|
|
569
|
+
export interface IChartInfo<TSource> {
|
|
570
|
+
config: IChartCreateConfig;
|
|
571
|
+
dataSource: TSource;
|
|
572
|
+
position?: IChartPosition;
|
|
573
|
+
size?: IChartSize;
|
|
574
|
+
}
|
|
558
575
|
/** Pending chart edits; `null` is a runtime-only delete marker consumed before persistence. */
|
|
559
576
|
export type ChartPendingConfig = Pick<IChartSemanticConfig, 'type'> & DeepNullish<Omit<IChartSemanticConfig, 'type' | 'series'>> & {
|
|
560
577
|
series?: Array<{
|
|
@@ -22,5 +22,6 @@ export type ChartPublicSeriesSelector = number | {
|
|
|
22
22
|
};
|
|
23
23
|
export declare const setSeries: (selector: ChartPublicSeriesSelector, patch: Omit<NonNullable<ChartPendingConfig["series"]>[number], "selector">) => import("./chart-config-operation").IChartConfigOperation;
|
|
24
24
|
export declare const clearSeries: (selector: ChartPublicSeriesSelector, target?: ChartSeriesClearTarget) => import("./chart-config-operation").IChartConfigOperation;
|
|
25
|
+
export declare const clearAllSeriesOverrides: () => import("./chart-config-operation").IChartConfigOperation;
|
|
25
26
|
export declare const setAllSeriesStyle: (style: DeepNullish<IChartSeriesStyleSpec>) => import("./chart-config-operation").IChartConfigOperation;
|
|
26
27
|
export declare const clearAllSeriesStyle: (target?: ChartAllSeriesStyleTarget) => import("./chart-config-operation").IChartConfigOperation;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/** Top-level semantic groups accepted by the fluent chart builder. */
|
|
2
|
+
export declare enum ChartConfigGroup {
|
|
3
|
+
AllSeriesStyle = "allSeriesStyle",
|
|
4
|
+
Area = "area",
|
|
5
|
+
AutoGradientFill = "autoGradientFill",
|
|
6
|
+
AxisPointer = "axisPointer",
|
|
7
|
+
Aggregation = "aggregation",
|
|
8
|
+
Appearance = "appearance",
|
|
9
|
+
Candlestick = "candlestick",
|
|
10
|
+
Histogram = "histogram",
|
|
11
|
+
Treemap = "treemap",
|
|
12
|
+
Sunburst = "sunburst",
|
|
13
|
+
Gauge = "gauge",
|
|
14
|
+
Chord = "chord",
|
|
15
|
+
Axes = "axes",
|
|
16
|
+
Bar = "bar",
|
|
17
|
+
Bubble = "bubble",
|
|
18
|
+
Heatmap = "heatmap",
|
|
19
|
+
Funnel = "funnel",
|
|
20
|
+
InvalidValueStrategy = "invalidValueStrategy",
|
|
21
|
+
Legend = "legend",
|
|
22
|
+
Mapping = "mapping",
|
|
23
|
+
MarkLines = "markLines",
|
|
24
|
+
Palette = "palette",
|
|
25
|
+
Pareto = "pareto",
|
|
26
|
+
Pie = "pie",
|
|
27
|
+
PlotArea = "plotArea",
|
|
28
|
+
Radar = "radar",
|
|
29
|
+
Relation = "relation",
|
|
30
|
+
Series = "series",
|
|
31
|
+
Subtitle = "subtitle",
|
|
32
|
+
Theme = "theme",
|
|
33
|
+
Title = "title",
|
|
34
|
+
Type = "type",
|
|
35
|
+
Trendlines = "trendlines",
|
|
36
|
+
WordCloud = "wordCloud",
|
|
37
|
+
Waterfall = "waterfall"
|
|
38
|
+
}
|
|
@@ -1,41 +1,5 @@
|
|
|
1
1
|
import type { ChartPendingConfig } from '../chart-types';
|
|
2
|
-
|
|
3
|
-
export declare enum ChartConfigGroup {
|
|
4
|
-
AllSeriesStyle = "allSeriesStyle",
|
|
5
|
-
Area = "area",
|
|
6
|
-
AutoGradientFill = "autoGradientFill",
|
|
7
|
-
AxisPointer = "axisPointer",
|
|
8
|
-
Aggregation = "aggregation",
|
|
9
|
-
Appearance = "appearance",
|
|
10
|
-
Candlestick = "candlestick",
|
|
11
|
-
Histogram = "histogram",
|
|
12
|
-
Treemap = "treemap",
|
|
13
|
-
Sunburst = "sunburst",
|
|
14
|
-
Gauge = "gauge",
|
|
15
|
-
Chord = "chord",
|
|
16
|
-
Axes = "axes",
|
|
17
|
-
Bar = "bar",
|
|
18
|
-
Bubble = "bubble",
|
|
19
|
-
Heatmap = "heatmap",
|
|
20
|
-
Funnel = "funnel",
|
|
21
|
-
InvalidValueStrategy = "invalidValueStrategy",
|
|
22
|
-
Legend = "legend",
|
|
23
|
-
Mapping = "mapping",
|
|
24
|
-
MarkLines = "markLines",
|
|
25
|
-
Palette = "palette",
|
|
26
|
-
Pareto = "pareto",
|
|
27
|
-
Pie = "pie",
|
|
28
|
-
PlotArea = "plotArea",
|
|
29
|
-
Radar = "radar",
|
|
30
|
-
Relation = "relation",
|
|
31
|
-
Series = "series",
|
|
32
|
-
Subtitle = "subtitle",
|
|
33
|
-
Theme = "theme",
|
|
34
|
-
Title = "title",
|
|
35
|
-
Trendlines = "trendlines",
|
|
36
|
-
WordCloud = "wordCloud",
|
|
37
|
-
Waterfall = "waterfall"
|
|
38
|
-
}
|
|
2
|
+
import type { ChartConfigGroup } from './chart-config-group';
|
|
39
3
|
export declare enum ChartConfigOperationMode {
|
|
40
4
|
Merge = "merge",
|
|
41
5
|
Replace = "replace"
|
|
@@ -46,4 +10,3 @@ export interface IChartConfigOperation {
|
|
|
46
10
|
readonly patch: ChartPendingConfig;
|
|
47
11
|
}
|
|
48
12
|
export declare function chartConfigOperation<K extends ChartConfigGroup>(group: K, value: ChartPendingConfig[K], mode?: ChartConfigOperationMode): IChartConfigOperation;
|
|
49
|
-
export declare function mergeChartPendingConfig(current: ChartPendingConfig, next: ChartPendingConfig, path?: readonly string[]): ChartPendingConfig;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { DeepNullish, IChartGaugeAnchorSpec, IChartGaugeAnglesSpec, IChartGaugeAxisLabelSpec, IChartGaugeAxisLineSpec, IChartGaugeAxisTickSpec, IChartGaugeDetailSpec, IChartGaugePointerSpec, IChartGaugeProgressSpec, IChartGaugeRangeSpec, IChartGaugeScaleSpec, IChartGaugeSplitLineSpec, IChartGaugeTitleSpec } from '../../types';
|
|
2
1
|
import type { ChartGaugeMode } from '../../enum';
|
|
2
|
+
import type { DeepNullish, IChartGaugeAnchorSpec, IChartGaugeAnglesSpec, IChartGaugeAxisLabelSpec, IChartGaugeAxisLineSpec, IChartGaugeAxisTickSpec, IChartGaugeDetailSpec, IChartGaugePointerSpec, IChartGaugeProgressSpec, IChartGaugeRangeSpec, IChartGaugeScaleSpec, IChartGaugeSplitLineSpec, IChartGaugeTitleSpec } from '../../types';
|
|
3
3
|
import type { IChartGaugeTicksPatch } from '../chart-types';
|
|
4
4
|
export declare function setGaugeValueField(index: number): import("./chart-config-operation").IChartConfigOperation;
|
|
5
5
|
export declare const setGaugeMode: (value: ChartGaugeMode) => import("./chart-config-operation").IChartConfigOperation;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IChartDataAggregation } from '../../chart-data-aggregation';
|
|
2
|
-
import type { ChartStyle,
|
|
3
|
-
import type { ChartPendingConfig, IChartDescription } from '../chart-types';
|
|
2
|
+
import type { ChartStyle, IChartContext, IChartDataSeries } from '../../types';
|
|
3
|
+
import type { ChartPendingConfig, IChartCreateConfig, IChartDescription } from '../chart-types';
|
|
4
4
|
import { ChartTypeBits } from '../../enum';
|
|
5
5
|
interface IChartConfigConversionOptions {
|
|
6
6
|
series?: IChartDataSeries[];
|
|
@@ -9,23 +9,36 @@ interface IChartConfigConversionOptions {
|
|
|
9
9
|
currentContext?: IChartContext;
|
|
10
10
|
currentDataAggregation?: IChartDataAggregation;
|
|
11
11
|
}
|
|
12
|
-
|
|
13
|
-
interface IChartModelConfigPendingUpdate {
|
|
12
|
+
interface IChartModelConfigUpdate {
|
|
14
13
|
chartType?: ChartTypeBits;
|
|
15
14
|
style?: ChartStyle;
|
|
16
|
-
context?: ChartContextPendingPatch;
|
|
17
|
-
dataAggregation?: Partial<IChartDataAggregation>;
|
|
18
|
-
}
|
|
19
|
-
interface IChartModelConfigUpdate extends Omit<IChartModelConfigPendingUpdate, 'context'> {
|
|
20
15
|
context?: IChartContext;
|
|
16
|
+
dataAggregation?: Partial<IChartDataAggregation>;
|
|
21
17
|
}
|
|
22
|
-
export interface
|
|
18
|
+
export interface IResolvedChartModelConfigUpdate {
|
|
23
19
|
chartType?: ChartTypeBits;
|
|
24
20
|
style?: ChartStyle;
|
|
25
21
|
context?: IChartContext;
|
|
26
22
|
dataAggregation?: Partial<IChartDataAggregation>;
|
|
27
23
|
}
|
|
28
24
|
export declare function toChartModelConfig(config: ChartPendingConfig | IChartDescription, options?: IChartConfigConversionOptions): IChartModelConfigUpdate;
|
|
29
|
-
|
|
30
|
-
export declare function
|
|
25
|
+
/** Replaces the complete public semantic configuration while preserving engine-owned style fields. */
|
|
26
|
+
export declare function toChartModelConfigReplacement(config: IChartCreateConfig, options?: IChartConfigConversionOptions): Required<IResolvedChartModelConfigUpdate>;
|
|
27
|
+
interface IChartModelApplicationState {
|
|
28
|
+
chartType?: ChartTypeBits;
|
|
29
|
+
chartTypeChanged?: boolean;
|
|
30
|
+
style?: ChartStyle;
|
|
31
|
+
styleChanged?: boolean;
|
|
32
|
+
context?: IChartContext;
|
|
33
|
+
contextChanged?: boolean;
|
|
34
|
+
dataAggregation?: IChartDataAggregation;
|
|
35
|
+
dataAggregationChanged?: boolean;
|
|
36
|
+
series?: IChartDataSeries[];
|
|
37
|
+
}
|
|
38
|
+
interface IChartPendingApplicationState {
|
|
39
|
+
description: IChartDescription;
|
|
40
|
+
model?: IChartModelApplicationState;
|
|
41
|
+
}
|
|
42
|
+
export declare const chartPendingPatchInterpreter: import("../internal/patch-interpreter").IPatchInterpreter<IChartPendingApplicationState, ChartPendingConfig>;
|
|
43
|
+
export declare function resolveChartModelConfigUpdate(configChange: ChartPendingConfig, options?: IChartConfigConversionOptions): IResolvedChartModelConfigUpdate;
|
|
31
44
|
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { DeepReadonly } from '@univerjs/core';
|
|
2
|
+
import type { ChartPendingConfig, IChartCreateConfig, IChartDescription } from '../chart-types';
|
|
3
|
+
/** Converts an effective builder description into detached creation configuration. */
|
|
4
|
+
export declare function toChartCreateConfig<TDescription extends IChartDescription>(description: DeepReadonly<TDescription>, pending: DeepReadonly<ChartPendingConfig>): IChartCreateConfig;
|
|
5
|
+
/** Converts a complete live description into a reusable creation configuration. */
|
|
6
|
+
export declare function toChartCreateConfigSnapshot<TDescription extends IChartDescription>(description: DeepReadonly<TDescription>, pending?: DeepReadonly<ChartPendingConfig>): IChartCreateConfig;
|
|
@@ -43,6 +43,23 @@ export declare enum ChartContextField {
|
|
|
43
43
|
SeriesIndexes = "seriesIndexes",
|
|
44
44
|
UseDateAxis = "useDateAxis"
|
|
45
45
|
}
|
|
46
|
+
export declare enum ChartMappingField {
|
|
47
|
+
Bubble = "bubble",
|
|
48
|
+
Candlestick = "candlestick",
|
|
49
|
+
CategoryIndex = "categoryIndex",
|
|
50
|
+
Chord = "chord",
|
|
51
|
+
Edge = "edge",
|
|
52
|
+
HierarchyIndexes = "hierarchyIndexes",
|
|
53
|
+
Scatter = "scatter",
|
|
54
|
+
SeriesIndexes = "seriesIndexes",
|
|
55
|
+
UseDateAxis = "useDateAxis"
|
|
56
|
+
}
|
|
57
|
+
export declare enum ChartHistogramField {
|
|
58
|
+
BinGap = "binGap",
|
|
59
|
+
Binning = "binning",
|
|
60
|
+
OverflowThreshold = "overflowThreshold",
|
|
61
|
+
UnderflowThreshold = "underflowThreshold"
|
|
62
|
+
}
|
|
46
63
|
export declare enum ChartDataAggregationField {
|
|
47
64
|
Aggregate = "aggregate",
|
|
48
65
|
TopN = "topN"
|
|
@@ -19,133 +19,6 @@ export declare function resolveChartDescriptionMetadata(description: IChartDescr
|
|
|
19
19
|
export declare function resolveChartModelEffectiveConfig(chartModel: ChartModel, pending: ChartPendingConfig, dataSet: IUniverDataSet): {
|
|
20
20
|
chartType: ChartTypeBits;
|
|
21
21
|
style: {
|
|
22
|
-
runtime?: {
|
|
23
|
-
themeColors?: string[] | undefined;
|
|
24
|
-
axes?: import("../..").IRuntimeAxis[] | undefined;
|
|
25
|
-
themeInfo?: {
|
|
26
|
-
version?: string | number | undefined;
|
|
27
|
-
themeName?: string | undefined;
|
|
28
|
-
theme?: {
|
|
29
|
-
seriesCnt?: string | undefined;
|
|
30
|
-
backgroundColor?: string | undefined;
|
|
31
|
-
titleColor?: string | undefined;
|
|
32
|
-
subtitleColor?: string | undefined;
|
|
33
|
-
textColorShow?: boolean | undefined;
|
|
34
|
-
textColor?: string | undefined;
|
|
35
|
-
markTextColor?: string | undefined;
|
|
36
|
-
color?: string[] | undefined;
|
|
37
|
-
borderColor?: string | undefined;
|
|
38
|
-
borderWidth?: string | number | undefined;
|
|
39
|
-
visualMapColor?: string[] | undefined;
|
|
40
|
-
legendTextColor?: string | undefined;
|
|
41
|
-
kColor?: string | undefined;
|
|
42
|
-
kColor0?: string | undefined;
|
|
43
|
-
kBorderColor?: string | undefined;
|
|
44
|
-
kBorderColor0?: string | undefined;
|
|
45
|
-
kBorderWidth?: string | number | undefined;
|
|
46
|
-
lineWidth?: string | number | undefined;
|
|
47
|
-
symbolSize?: string | number | undefined;
|
|
48
|
-
symbol?: string | undefined;
|
|
49
|
-
symbolBorderWidth?: string | number | undefined;
|
|
50
|
-
lineSmooth?: boolean | undefined;
|
|
51
|
-
graphLineWidth?: string | number | undefined;
|
|
52
|
-
graphLineColor?: string | undefined;
|
|
53
|
-
mapLabelColor?: string | undefined;
|
|
54
|
-
mapLabelColorE?: string | undefined;
|
|
55
|
-
mapBorderColor?: string | undefined;
|
|
56
|
-
mapBorderColorE?: string | undefined;
|
|
57
|
-
mapBorderWidth?: string | number | undefined;
|
|
58
|
-
mapBorderWidthE?: string | number | undefined;
|
|
59
|
-
mapAreaColor?: string | undefined;
|
|
60
|
-
mapAreaColorE?: string | undefined;
|
|
61
|
-
axes?: import("../../models/common/theme/build-in-theme/types").IEchartThemeAxisConfig[] | undefined;
|
|
62
|
-
axisSeperateSetting?: boolean | undefined;
|
|
63
|
-
toolboxColor?: string | undefined;
|
|
64
|
-
toolboxEmphasisColor?: string | undefined;
|
|
65
|
-
tooltipAxisColor?: string | undefined;
|
|
66
|
-
tooltipAxisWidth?: string | number | undefined;
|
|
67
|
-
timelineLineColor?: string | undefined;
|
|
68
|
-
timelineLineWidth?: string | number | undefined;
|
|
69
|
-
timelineItemColor?: string | undefined;
|
|
70
|
-
timelineItemColorE?: string | undefined;
|
|
71
|
-
timelineCheckColor?: string | undefined;
|
|
72
|
-
timelineCheckBorderColor?: string | undefined;
|
|
73
|
-
timelineItemBorderWidth?: string | number | undefined;
|
|
74
|
-
timelineControlColor?: string | undefined;
|
|
75
|
-
timelineControlBorderColor?: string | undefined;
|
|
76
|
-
timelineControlBorderWidth?: string | number | undefined;
|
|
77
|
-
timelineLabelColor?: string | undefined;
|
|
78
|
-
datazoomBackgroundColor?: string | undefined;
|
|
79
|
-
datazoomDataColor?: string | undefined;
|
|
80
|
-
datazoomFillColor?: string | undefined;
|
|
81
|
-
datazoomHandleColor?: string | undefined;
|
|
82
|
-
datazoomHandleWidth?: string | undefined;
|
|
83
|
-
datazoomLabelColor?: string | undefined;
|
|
84
|
-
} | undefined;
|
|
85
|
-
} | undefined;
|
|
86
|
-
wordCloudRenderConfig?: {
|
|
87
|
-
initialShape?: import("../..").WordCloudShape | undefined;
|
|
88
|
-
collisionShape?: import("../../wordcloud-chart/core/collision/engine").WordCloudCollisionShape | undefined;
|
|
89
|
-
fontSizeRange?: import("../..").WordCloudFontSizeRange | undefined;
|
|
90
|
-
padding?: number | undefined;
|
|
91
|
-
zoomToFit?: {
|
|
92
|
-
shrink?: boolean | undefined;
|
|
93
|
-
enlarge?: boolean | undefined;
|
|
94
|
-
fontSizeLimitMin?: number | undefined;
|
|
95
|
-
fontSizeLimitMax?: number | undefined;
|
|
96
|
-
minShrinkRatio?: number | undefined;
|
|
97
|
-
} | undefined;
|
|
98
|
-
} | undefined;
|
|
99
|
-
addWatermark?: boolean | undefined;
|
|
100
|
-
layoutInset?: number | undefined;
|
|
101
|
-
getRenderColor?: {} | undefined;
|
|
102
|
-
isDarkMode?: boolean | undefined;
|
|
103
|
-
hasSecondaryAxis?: boolean | undefined;
|
|
104
|
-
localeTexts?: {
|
|
105
|
-
seriesDefaultName?: string | undefined;
|
|
106
|
-
categoryDefaultName?: string | undefined;
|
|
107
|
-
blank?: string | undefined;
|
|
108
|
-
boxplotMin?: string | undefined;
|
|
109
|
-
boxplotQ1?: string | undefined;
|
|
110
|
-
boxplotMedian?: string | undefined;
|
|
111
|
-
boxplotQ3?: string | undefined;
|
|
112
|
-
boxplotMax?: string | undefined;
|
|
113
|
-
bubbleEmptyTips?: string | undefined;
|
|
114
|
-
cloudWord?: string | undefined;
|
|
115
|
-
cloudFrequency?: string | undefined;
|
|
116
|
-
msgEmptyTips?: string | undefined;
|
|
117
|
-
msgSankeyCircularTips?: string | undefined;
|
|
118
|
-
paretoLineName?: string | undefined;
|
|
119
|
-
pieAggregateOther?: string | undefined;
|
|
120
|
-
pieAggregateMembers?: string | undefined;
|
|
121
|
-
relationEmptyTips?: string | undefined;
|
|
122
|
-
waterfallPositive?: string | undefined;
|
|
123
|
-
waterfallNegative?: string | undefined;
|
|
124
|
-
waterfallSubtotal?: string | undefined;
|
|
125
|
-
candlestickSeries?: string | undefined;
|
|
126
|
-
candlestickCategory?: string | undefined;
|
|
127
|
-
candlestickOpen?: string | undefined;
|
|
128
|
-
candlestickHigh?: string | undefined;
|
|
129
|
-
candlestickLow?: string | undefined;
|
|
130
|
-
candlestickClose?: string | undefined;
|
|
131
|
-
histogramFrequency?: string | undefined;
|
|
132
|
-
treemapEmptyTips?: string | undefined;
|
|
133
|
-
treemapOwnValue?: string | undefined;
|
|
134
|
-
treemapChildren?: string | undefined;
|
|
135
|
-
sunburstEmptyTips?: string | undefined;
|
|
136
|
-
sunburstOwnValue?: string | undefined;
|
|
137
|
-
sunburstChildren?: string | undefined;
|
|
138
|
-
gaugeEmptyTips?: string | undefined;
|
|
139
|
-
gaugeInvalidMapping?: string | undefined;
|
|
140
|
-
gaugeInvalidConfig?: string | undefined;
|
|
141
|
-
chordEmptyTips?: string | undefined;
|
|
142
|
-
chordInvalidMapping?: string | undefined;
|
|
143
|
-
chordInvalidConfig?: string | undefined;
|
|
144
|
-
chordCount?: string | undefined;
|
|
145
|
-
chordAssociatedValue?: string | undefined;
|
|
146
|
-
} | undefined;
|
|
147
|
-
} | undefined;
|
|
148
|
-
direction?: import("../..").ChartDirection | undefined;
|
|
149
22
|
width?: number | undefined;
|
|
150
23
|
height?: number | undefined;
|
|
151
24
|
theme?: string | undefined;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import type { Injector } from '@univerjs/core';
|
|
2
|
-
import type {
|
|
3
|
-
import type { IChartRenderModelImageExportOptions, IUniverDataSet } from '../types';
|
|
2
|
+
import type { IUniverDataSet } from '../types';
|
|
4
3
|
import type { IChartBuilderAdapter } from './chart-builder-adapter';
|
|
5
4
|
import type { ChartPendingConfig, IChartDescription } from './chart-types';
|
|
6
|
-
import type { IInlineChartBuilderAdapter, IInlineChartHostPatch } from './internal/host-builder-runtime';
|
|
7
5
|
/** Shared adapter behavior for builders that have not been inserted into a host. */
|
|
8
6
|
export declare class DetachedChartBuilderAdapter<THostDescription extends object = object> implements IChartBuilderAdapter<THostDescription> {
|
|
9
7
|
private readonly _description;
|
|
@@ -17,12 +15,5 @@ export declare class DetachedChartBuilderAdapter<THostDescription extends object
|
|
|
17
15
|
commit(): never;
|
|
18
16
|
/** Detached drafts have no hosted materialization lifecycle. */
|
|
19
17
|
resolveData(): never;
|
|
20
|
-
/** Returns `null` because a detached chart has no render model. */
|
|
21
|
-
exportImage(_options?: IChartRenderModelImageExportOptions): Promise<null>;
|
|
22
18
|
protected rejectCommit(): never;
|
|
23
19
|
}
|
|
24
|
-
/** Detached behavior shared by inline-data builders before insertion into a host. */
|
|
25
|
-
export declare class DetachedInlineChartBuilderAdapter<THostDescription extends object, TCell extends InlineChartCellValue, THostPatch extends IInlineChartHostPatch<TCell>> extends DetachedChartBuilderAdapter<THostDescription> implements IInlineChartBuilderAdapter<THostDescription, TCell, THostPatch> {
|
|
26
|
-
commitHost(_patch: THostPatch): never;
|
|
27
|
-
getData(): null;
|
|
28
|
-
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { IUniverDataSet } from '../../types';
|
|
2
|
+
/** Builds a detached data set from raw inline values and disposes the temporary source. */
|
|
3
|
+
export declare function resolveChartDataSetFromValues<TCell>(values: TCell[][], buildDataSet: (data: TCell[][]) => IUniverDataSet, isRowDirection?: boolean): IUniverDataSet;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { DeepNullish, IChartHistogramSpec } from '../../types';
|
|
2
|
+
import type { ChartPendingConfig, IChartDescription, IChartMappingSpec } from '../chart-types';
|
|
3
|
+
import type { IPatchFieldSchema, PatchSchema } from './patch-interpreter';
|
|
4
|
+
type MappingPatch = DeepNullish<IChartMappingSpec>;
|
|
5
|
+
type HistogramPatch = DeepNullish<IChartHistogramSpec>;
|
|
6
|
+
export declare const mappingPatchSchema: PatchSchema<IChartMappingSpec, MappingPatch>;
|
|
7
|
+
export declare const histogramPatchSchema: PatchSchema<IChartHistogramSpec, HistogramPatch>;
|
|
8
|
+
export declare function semanticField<TKey extends keyof IChartDescription, TPatchValue>(key: TKey, path: readonly string[]): IPatchFieldSchema<IChartDescription, TPatchValue>;
|
|
9
|
+
export declare function appendCollectionField<TKey extends keyof IChartDescription, TValue>(key: TKey): IPatchFieldSchema<IChartDescription, TValue[] | null | undefined>;
|
|
10
|
+
export declare const seriesField: IPatchFieldSchema<IChartDescription, ChartPendingConfig['series']>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
type Defined<T> = Exclude<T, null | undefined>;
|
|
2
|
+
export interface IPatchFieldSchema<TState, TPatchValue> {
|
|
3
|
+
clear(current: TState): TState;
|
|
4
|
+
applyValue(current: TState, value: Defined<TPatchValue>): TState;
|
|
5
|
+
composeValue(current: Defined<TPatchValue>, next: Defined<TPatchValue>): Defined<TPatchValue>;
|
|
6
|
+
}
|
|
7
|
+
export type PatchSchema<TState, TPatch extends object> = {
|
|
8
|
+
[K in keyof TPatch]-?: IPatchFieldSchema<TState, TPatch[K]>;
|
|
9
|
+
};
|
|
10
|
+
export interface IPatchInterpreter<TState, TPatch extends object> {
|
|
11
|
+
apply(current: TState, patch: TPatch): TState;
|
|
12
|
+
compose(current: TPatch, next: TPatch): TPatch;
|
|
13
|
+
}
|
|
14
|
+
export declare function replaceField<TState extends object, TKey extends keyof TState>(key: TKey): IPatchFieldSchema<TState, TState[TKey]>;
|
|
15
|
+
export declare function nestedField<TState extends object, TKey extends keyof TState, TNestedState extends object, TNestedPatch extends object>(key: TKey, schema: PatchSchema<TNestedState, TNestedPatch>): IPatchFieldSchema<TState, TNestedPatch>;
|
|
16
|
+
export declare function createPatchInterpreter<TState, TPatch extends object>(schema: PatchSchema<TState, TPatch>): IPatchInterpreter<TState, TPatch>;
|
|
17
|
+
export {};
|
|
@@ -1,6 +1,55 @@
|
|
|
1
|
-
import type { AreaLineStyle, IChartLineSeriesPatch } from '@univerjs-pro/engine-chart';
|
|
1
|
+
import type { AreaLineStyle, IChartInfo, IChartLineSeriesPatch, IChartSeriesStyleSpec } from '@univerjs-pro/engine-chart';
|
|
2
2
|
import { FCartesianChartBuilder } from '../f-cartesian-chart-builder';
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Fluent, type-specific Builder for Area Charts.
|
|
5
|
+
*
|
|
6
|
+
* @example Sheet
|
|
7
|
+
* ```ts
|
|
8
|
+
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
9
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
10
|
+
* const chartInfo = fWorksheet
|
|
11
|
+
* .newChart(univerAPI.Enum.ChartTypeString.Area)
|
|
12
|
+
* .setSource('A1:D8')
|
|
13
|
+
* .setAreaLineStyle(univerAPI.Enum.ChartAreaLineStyle.Smooth)
|
|
14
|
+
* .build();
|
|
15
|
+
* await fWorksheet.insertChart(chartInfo);
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* @example Doc
|
|
19
|
+
* ```ts
|
|
20
|
+
* const fDocument = univerAPI.getActiveDocument();
|
|
21
|
+
* const chartInfo = fDocument
|
|
22
|
+
* .newChart(univerAPI.Enum.ChartTypeString.Area)
|
|
23
|
+
* .setSource([['Month', 'East', 'West'], ['Jan', 120, 95], ['Feb', 180, 130]])
|
|
24
|
+
* .setAreaLineStyle(univerAPI.Enum.ChartAreaLineStyle.Smooth)
|
|
25
|
+
* .build();
|
|
26
|
+
* await fDocument.insertChart(chartInfo);
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* @example Slide
|
|
30
|
+
* ```ts
|
|
31
|
+
* const fPresentation = univerAPI.getActivePresentation();
|
|
32
|
+
* const fSlide = fPresentation.getSlideByIndex(0);
|
|
33
|
+
* const chartInfo = fSlide
|
|
34
|
+
* .newChart(univerAPI.Enum.ChartTypeString.Area)
|
|
35
|
+
* .setSource([['Month', 'East', 'West'], ['Jan', 120, 95], ['Feb', 180, 130]])
|
|
36
|
+
* .setAreaLineStyle(univerAPI.Enum.ChartAreaLineStyle.Smooth)
|
|
37
|
+
* .build();
|
|
38
|
+
* await fSlide.insertChart(chartInfo);
|
|
39
|
+
* ```
|
|
40
|
+
*
|
|
41
|
+
* @example Board
|
|
42
|
+
* ```ts
|
|
43
|
+
* const fBoard = univerAPI.getActiveBoard();
|
|
44
|
+
* const chartInfo = fBoard
|
|
45
|
+
* .newChart(univerAPI.Enum.ChartTypeString.Area)
|
|
46
|
+
* .setSource([['Month', 'East', 'West'], ['Jan', 120, 95], ['Feb', 180, 130]])
|
|
47
|
+
* .setAreaLineStyle(univerAPI.Enum.ChartAreaLineStyle.Smooth)
|
|
48
|
+
* .build();
|
|
49
|
+
* await fBoard.insertChart(chartInfo);
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
export declare class FAreaChartBuilder<TSource = never[], TDataSource = TSource, TInfo extends IChartInfo<TDataSource> = IChartInfo<TDataSource>> extends FCartesianChartBuilder<Omit<IChartLineSeriesPatch, 'selector'>, IChartSeriesStyleSpec, TSource, TDataSource, TInfo> {
|
|
4
53
|
/**
|
|
5
54
|
* Sets the area line style configuration and returns this builder for chaining.
|
|
6
55
|
*
|
|
@@ -10,9 +59,7 @@ export declare class FAreaChartBuilder extends FCartesianChartBuilder<Omit<IChar
|
|
|
10
59
|
* @returns This builder for chaining.
|
|
11
60
|
* @example
|
|
12
61
|
* ```ts
|
|
13
|
-
*
|
|
14
|
-
* const builder = worksheet.charts.create().setType(univerAPI.Enum.ChartTypeString.Area);
|
|
15
|
-
* builder.setAreaLineStyle(univerAPI.Enum.AreaLineStyle.Smooth);
|
|
62
|
+
* builder.setAreaLineStyle(univerAPI.Enum.ChartAreaLineStyle.Smooth);
|
|
16
63
|
* ```
|
|
17
64
|
*/
|
|
18
65
|
setAreaLineStyle(value: AreaLineStyle): this;
|
|
@@ -24,8 +71,6 @@ export declare class FAreaChartBuilder extends FCartesianChartBuilder<Omit<IChar
|
|
|
24
71
|
* @returns This builder for chaining.
|
|
25
72
|
* @example
|
|
26
73
|
* ```ts
|
|
27
|
-
* const worksheet = univerAPI.getActiveWorkbook().getActiveSheet();
|
|
28
|
-
* const builder = worksheet.charts.create().setType(univerAPI.Enum.ChartTypeString.Area);
|
|
29
74
|
* builder.clearAreaLineStyle();
|
|
30
75
|
* ```
|
|
31
76
|
*/
|