@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/umd/locale/vi-VN.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x2354(_0x387bee,_0x24253a){_0x387bee=_0x387bee-0x1c8;var _0x213dd5=_0x213d();var _0x23544c=_0x213dd5[_0x387bee];return _0x23544c;}(function(_0x532223,_0x25c437){var _0x18ba57=_0x2354,_0x104f3f=_0x532223();while(!![]){try{var _0x339911=parseInt(_0x18ba57(0x1d0))/0x1+parseInt(_0x18ba57(0x1d7))/0x2+parseInt(_0x18ba57(0x1dc))/0x3*(parseInt(_0x18ba57(0x1eb))/0x4)+-parseInt(_0x18ba57(0x1e2))/0x5*(-parseInt(_0x18ba57(0x1de))/0x6)+-parseInt(_0x18ba57(0x1e8))/0x7*(parseInt(_0x18ba57(0x1c9))/0x8)+-parseInt(_0x18ba57(0x1c8))/0x9+-parseInt(_0x18ba57(0x1dd))/0xa;if(_0x339911===_0x25c437)break;else _0x104f3f['push'](_0x104f3f['shift']());}catch(_0x1d1306){_0x104f3f['push'](_0x104f3f['shift']());}}}(_0x213d,0x90fb2),function(_0x3c7be5,_0x2aed7f){var _0x103ea0=_0x2354;typeof exports==_0x103ea0(0x1ef)&&typeof module<'u'?module[_0x103ea0(0x1e9)]=_0x2aed7f():typeof define==_0x103ea0(0x1e3)&&define['amd']?define([],_0x2aed7f):(_0x3c7be5=typeof globalThis<'u'?globalThis:_0x3c7be5||self,_0x3c7be5[_0x103ea0(0x1ee)]=_0x2aed7f());}(this,function(){var _0x342a9f=_0x2354;return{'engine-chart':{'seriesDefaultName':_0x342a9f(0x1d5),'categoryDefaultName':_0x342a9f(0x1cc),'blank':'(Trống)','boxplotMin':_0x342a9f(0x1f2),'boxplotQ1':_0x342a9f(0x1ea),'boxplotMedian':_0x342a9f(0x1d6),'boxplotQ3':_0x342a9f(0x1d8),'boxplotMax':'Giá\x20trị\x20lớn\x20nhất','bubbleEmptyTips':_0x342a9f(0x1e4),'cloudWord':'Từ','cloudFrequency':_0x342a9f(0x1db),'msgEmptyTips':_0x342a9f(0x1df),'msgSankeyCircularTips':_0x342a9f(0x1d2),'paretoLineName':_0x342a9f(0x1d1),'pieAggregateOther':_0x342a9f(0x1f0),'pieAggregateMembers':_0x342a9f(0x1ed),'relationEmptyTips':_0x342a9f(0x1e5),'waterfallPositive':'Giá\x20trị\x20dương','waterfallNegative':_0x342a9f(0x1e6),'waterfallSubtotal':_0x342a9f(0x1f3),'candlestickSeries':_0x342a9f(0x1e0),'candlestickCategory':_0x342a9f(0x1cd),'candlestickOpen':_0x342a9f(0x1ca),'candlestickHigh':_0x342a9f(0x1f1),'candlestickLow':_0x342a9f(0x1da),'candlestickClose':_0x342a9f(0x1e7),'histogramFrequency':_0x342a9f(0x1db),'treemapEmptyTips':'Biểu\x20đồ\x20cây\x20cần\x20ít\x20nhất\x20một\x20trường\x20phân\x20cấp\x20và\x20một\x20trường\x20giá\x20trị\x20số.','treemapOwnValue':_0x342a9f(0x1d3),'treemapChildren':_0x342a9f(0x1d4),'sunburstEmptyTips':_0x342a9f(0x1e1),'sunburstOwnValue':'Giá\x20trị\x20riêng','sunburstChildren':_0x342a9f(0x1d4),'gaugeEmptyTips':_0x342a9f(0x1d9),'gaugeInvalidMapping':'Biểu\x20đồ\x20đồng\x20hồ\x20cần\x20một\x20trường\x20nhãn\x20và\x20đúng\x20một\x20trường\x20giá\x20trị.','gaugeInvalidConfig':_0x342a9f(0x1f4),'chordEmptyTips':_0x342a9f(0x1cb),'chordInvalidMapping':'Biểu\x20đồ\x20dây\x20cung\x20cần\x20các\x20trường\x20Nguồn\x20và\x20Đích\x20khác\x20nhau\x20cùng\x20một\x20trường\x20Giá\x20trị\x20khác\x20biệt\x20không\x20bắt\x20buộc.','chordInvalidConfig':_0x342a9f(0x1cf),'chordCount':_0x342a9f(0x1ce),'chordAssociatedValue':_0x342a9f(0x1ec)}};}));function _0x213d(){var _0x28925e=['Phần\x20tử\x20con','Loạt\x20{0}','Trung\x20vị','1927690CzZosP','Phần\x20tư\x20thứ\x20ba','Biểu\x20đồ\x20đồng\x20hồ\x20cần\x20ít\x20nhất\x20một\x20giá\x20trị\x20số\x20hữu\x20hạn.','Giá\x20thấp\x20nhất','Tần\x20suất','2361075Uuesxl','14664430tcCwRM','15762IPrKhM','Không\x20có\x20dữ\x20liệu\x20để\x20hiển\x20thị.','Chuỗi\x20OHLC','Biểu\x20đồ\x20sunburst\x20cần\x20ít\x20nhất\x20một\x20trường\x20phân\x20cấp\x20và\x20một\x20trường\x20giá\x20trị\x20số.','1080BlfCXT','function','Biểu\x20đồ\x20bong\x20bóng\x20yêu\x20cầu\x20ít\x20nhất\x202\x20cột:\x20trục\x20X,\x20trục\x20Y','Nguồn\x20dữ\x20liệu\x20cho\x20biểu\x20đồ\x20quan\x20hệ\x20là\x20ma\x20trận\x20đồng\x20từ\x20với\x20cột\x20loại\x20bổ\x20sung\x20ở\x20cột\x20thứ\x20hai','Giá\x20trị\x20âm','Giá\x20đóng\x20cửa','3843LcPpRX','exports','Phần\x20tư\x20thứ\x20nhất','4cCnJRp','Giá\x20trị\x20liên\x20kết','Thành\x20phần','UniverProEngineChartViVN','object','Khác','Giá\x20cao\x20nhất','Giá\x20trị\x20nhỏ\x20nhất','Tổng\x20phụ','Cấu\x20hình\x20biểu\x20đồ\x20đồng\x20hồ\x20không\x20hợp\x20lệ.\x20Hãy\x20kiểm\x20tra\x20thang\x20đo,\x20phạm\x20vi,\x20tỷ\x20lệ\x20và\x20kích\x20thước.','8150670avfQYF','5904CLCYQK','Giá\x20mở\x20cửa','Biểu\x20đồ\x20dây\x20cung\x20cần\x20ít\x20nhất\x20một\x20quan\x20hệ\x20có\x20trọng\x20số\x20dương\x20giữa\x20hai\x20nút\x20khác\x20nhau.','Danh\x20mục\x20{0}','Danh\x20mục','Số\x20lượng\x20mối\x20quan\x20hệ','Cấu\x20hình\x20biểu\x20đồ\x20dây\x20cung\x20không\x20hợp\x20lệ.\x20Hãy\x20kiểm\x20tra\x20góc,\x20bán\x20kính,\x20độ\x20mờ\x20và\x20kích\x20thước.','1052775wNgtYG','Tỷ\x20lệ\x20tích\x20lũy','Biểu\x20đồ\x20Sankey\x20không\x20thể\x20chứa\x20dữ\x20liệu\x20vòng\x20lặp','Giá\x20trị\x20riêng'];_0x213d=function(){return _0x28925e;};return _0x213d();}
|
package/lib/umd/locale/zh-CN.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x4e6c(_0x7fcbdc,_0x196017){_0x7fcbdc=_0x7fcbdc-0x139;var _0x3b990a=_0x3b99();var _0x4e6c77=_0x3b990a[_0x7fcbdc];return _0x4e6c77;}function _0x3b99(){var _0x3ac34e=['弦图需要不同的来源字段和目标字段,并可选一个与二者不同的数值字段。','关系图数据源为额外添加类型列在第二列的共词矩阵','关系计数','桑基图不能包含循环数据','function','623486Tibija','系列\x20{0}','8ubGZWL','最大值','720136LguqUY','矩形树图至少需要一个层级字段和一个数值字段。','1yQtlOc','371511SglXmw','247910Vqabuc','弦图配置无效,请检查角度、半径、不透明度和尺寸。','成员数','(空)','类别\x20{0}','最小值','2351865IIVnsY','旭日图至少需要一个层级字段和一个数值字段。','仪表图配置无效,请检查刻度范围、分段区间、比例和尺寸。','中位数','object','amd','弦图至少需要两个不同节点之间的一条正权重关系。','累积占比','3691176GaJxXQ','84aSsoDM','exports','2749980CqOIIm','自身值'];_0x3b99=function(){return _0x3ac34e;};return _0x3b99();}(function(_0x200748,_0x1014a9){var _0x674f2a=_0x4e6c,_0x5793f6=_0x200748();while(!![]){try{var _0x56e6f7=-parseInt(_0x674f2a(0x140))/0x1*(parseInt(_0x674f2a(0x13a))/0x2)+-parseInt(_0x674f2a(0x148))/0x3+parseInt(_0x674f2a(0x13c))/0x4*(-parseInt(_0x674f2a(0x142))/0x5)+parseInt(_0x674f2a(0x150))/0x6+-parseInt(_0x674f2a(0x151))/0x7*(-parseInt(_0x674f2a(0x13e))/0x8)+parseInt(_0x674f2a(0x141))/0x9+parseInt(_0x674f2a(0x153))/0xa;if(_0x56e6f7===_0x1014a9)break;else _0x5793f6['push'](_0x5793f6['shift']());}catch(_0x334661){_0x5793f6['push'](_0x5793f6['shift']());}}}(_0x3b99,0xc76af),function(_0x583569,_0x4dc777){var _0x4b86ca=_0x4e6c;typeof exports==_0x4b86ca(0x14c)&&typeof module<'u'?module[_0x4b86ca(0x152)]=_0x4dc777():typeof define==_0x4b86ca(0x139)&&define[_0x4b86ca(0x14d)]?define([],_0x4dc777):(_0x583569=typeof globalThis<'u'?globalThis:_0x583569||self,_0x583569['UniverProEngineChartZhCN']=_0x4dc777());}(this,function(){var _0x416418=_0x4e6c;return{'engine-chart':{'seriesDefaultName':_0x416418(0x13b),'categoryDefaultName':_0x416418(0x146),'blank':_0x416418(0x145),'boxplotMin':_0x416418(0x147),'boxplotQ1':'第一四分位数','boxplotMedian':_0x416418(0x14b),'boxplotQ3':'第三四分位数','boxplotMax':_0x416418(0x13d),'bubbleEmptyTips':'气泡图至少需要2列,X轴、Y轴。','cloudWord':'词语','cloudFrequency':'频率','msgEmptyTips':'请先添加系列开始数据可视化','msgSankeyCircularTips':_0x416418(0x158),'paretoLineName':_0x416418(0x14f),'pieAggregateOther':'其他','pieAggregateMembers':_0x416418(0x144),'relationEmptyTips':_0x416418(0x156),'waterfallPositive':'正值','waterfallNegative':'负值','waterfallSubtotal':'小计','candlestickSeries':'OHLC\x20系列','candlestickCategory':'类别','candlestickOpen':'开盘','candlestickHigh':'最高','candlestickLow':'最低','candlestickClose':'收盘','histogramFrequency':'频数','treemapEmptyTips':_0x416418(0x13f),'treemapOwnValue':_0x416418(0x154),'treemapChildren':'子项','sunburstEmptyTips':_0x416418(0x149),'sunburstOwnValue':_0x416418(0x154),'sunburstChildren':'子项','gaugeEmptyTips':'仪表图至少需要一个有限数值。','gaugeInvalidMapping':'仪表图需要一个标签字段且只能有一个数值字段。','gaugeInvalidConfig':_0x416418(0x14a),'chordEmptyTips':_0x416418(0x14e),'chordInvalidMapping':_0x416418(0x155),'chordInvalidConfig':_0x416418(0x143),'chordCount':_0x416418(0x157),'chordAssociatedValue':'关联值'}};}));
|
package/lib/umd/locale/zh-HK.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x1bc1(){var _0x58912d=['5KNDvSw','開盤價','59442LMFeww','關係數','關聯值','24IcDUYR','氣泡圖至少需要2欄,X軸、Y軸。','系列\x20{0}','77GjHFAf','最小值','關係圖資料來源為額外新增類型欄在第二欄的共詞矩陣','請先添加系列開始數據可視化','UniverProEngineChartZhHK','儀表圖至少需要一個有限數值。','第一四分位數','330861IGqNZF','弦圖至少需要兩個不同節點之間的一條正權重關係。','15471dMMIBt','amd','儀表圖需要一個標籤欄位,而且只能有一個數值欄位。','exports','最低價','最高價','類別\x20{0}','6461133Lmftyo','中位數','第三四分位數','自身值','弦圖設定無效,請檢查角度、半徑、不透明度和尺寸。','3845238DhYhMl','3177890UlrdHV','最大值','373763Bsidqe','function','object','累積占比','4272yUvHvi'];_0x1bc1=function(){return _0x58912d;};return _0x1bc1();}function _0x1175(_0x32a093,_0xf7982e){_0x32a093=_0x32a093-0xbd;var _0x1bc1e6=_0x1bc1();var _0x11750b=_0x1bc1e6[_0x32a093];return _0x11750b;}(function(_0x33b01f,_0x553476){var _0x49aabb=_0x1175,_0x1080fd=_0x33b01f();while(!![]){try{var _0x961985=parseInt(_0x49aabb(0xd0))/0x1+-parseInt(_0x49aabb(0xd7))/0x2+-parseInt(_0x49aabb(0xbf))/0x3*(parseInt(_0x49aabb(0xda))/0x4)+parseInt(_0x49aabb(0xd5))/0x5*(parseInt(_0x49aabb(0xcd))/0x6)+-parseInt(_0x49aabb(0xc8))/0x7+-parseInt(_0x49aabb(0xd4))/0x8*(parseInt(_0x49aabb(0xc1))/0x9)+-parseInt(_0x49aabb(0xce))/0xa*(-parseInt(_0x49aabb(0xdd))/0xb);if(_0x961985===_0x553476)break;else _0x1080fd['push'](_0x1080fd['shift']());}catch(_0x3f56f2){_0x1080fd['push'](_0x1080fd['shift']());}}}(_0x1bc1,0xac8bf),function(_0x1deb89,_0x5f3806){var _0x4a37d4=_0x1175;typeof exports==_0x4a37d4(0xd2)&&typeof module<'u'?module[_0x4a37d4(0xc4)]=_0x5f3806():typeof define==_0x4a37d4(0xd1)&&define[_0x4a37d4(0xc2)]?define([],_0x5f3806):(_0x1deb89=typeof globalThis<'u'?globalThis:_0x1deb89||self,_0x1deb89[_0x4a37d4(0xe1)]=_0x5f3806());}(this,function(){var _0x359be7=_0x1175;return{'engine-chart':{'seriesDefaultName':_0x359be7(0xdc),'categoryDefaultName':_0x359be7(0xc7),'blank':'(空)','boxplotMin':_0x359be7(0xde),'boxplotQ1':_0x359be7(0xbe),'boxplotMedian':_0x359be7(0xc9),'boxplotQ3':_0x359be7(0xca),'boxplotMax':_0x359be7(0xcf),'bubbleEmptyTips':_0x359be7(0xdb),'cloudWord':'詞','cloudFrequency':'頻率','msgEmptyTips':_0x359be7(0xe0),'msgSankeyCircularTips':'桑基圖不能包含循環數據','paretoLineName':_0x359be7(0xd3),'pieAggregateOther':'其他','pieAggregateMembers':'成員','relationEmptyTips':_0x359be7(0xdf),'waterfallPositive':'正值','waterfallNegative':'負值','waterfallSubtotal':'小計','candlestickSeries':'OHLC\x20數列','candlestickCategory':'類別','candlestickOpen':_0x359be7(0xd6),'candlestickHigh':_0x359be7(0xc6),'candlestickLow':_0x359be7(0xc5),'candlestickClose':'收盤價','histogramFrequency':'頻數','treemapEmptyTips':'矩形樹圖至少需要一個階層欄位和一個數值欄位。','treemapOwnValue':_0x359be7(0xcb),'treemapChildren':'子項','sunburstEmptyTips':'旭日圖至少需要一個階層欄位和一個數值欄位。','sunburstOwnValue':'自身值','sunburstChildren':'子項','gaugeEmptyTips':_0x359be7(0xbd),'gaugeInvalidMapping':_0x359be7(0xc3),'gaugeInvalidConfig':'儀表圖設定無效,請檢查刻度範圍、分段區間、比例和尺寸。','chordEmptyTips':_0x359be7(0xc0),'chordInvalidMapping':'弦圖需要不同的來源與目標欄位,並可選擇一個與兩者不同的數值欄位。','chordInvalidConfig':_0x359be7(0xcc),'chordCount':_0x359be7(0xd8),'chordAssociatedValue':_0x359be7(0xd9)}};}));
|
package/lib/umd/locale/zh-TW.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x5c24(_0x4e0bbe,_0xf80d4f){_0x4e0bbe=_0x4e0bbe-0x10c;var _0x2c2afa=_0x2c2a();var _0x5c2444=_0x2c2afa[_0x4e0bbe];return _0x5c2444;}function _0x2c2a(){var _0x3e5f7e=['儀表圖設定無效,請檢查刻度範圍、分段區間、比例和尺寸。','弦圖至少需要兩個不同節點之間的一條正權重關係。','13amUHum','71964nijcZn','3726730SKuQui','自身值','中位數','UniverProEngineChartZhTW','系列\x20{0}','664AxbOys','4694178QKSaNw','249639mCtNHe','15NZMkhw','function','請先添加系列開始數據可視化','第三四分位數','收盤價','5062974fOPtJo','amd','最小值','關係數','exports','1015172mUdqsh','儀表圖至少需要一個有限數值。','弦圖需要不同的來源與目標欄位,並可選擇一個與兩者不同的數值欄位。','弦圖設定無效,請檢查角度、半徑、不透明度和尺寸。','類別\x20{0}','133582EVvaIG','第一四分位數','關聯值','旭日圖至少需要一個階層欄位和一個數值欄位。'];_0x2c2a=function(){return _0x3e5f7e;};return _0x2c2a();}(function(_0x49ca5d,_0x3ae96b){var _0x31b285=_0x5c24,_0x4ff2c1=_0x49ca5d();while(!![]){try{var _0x207e29=-parseInt(_0x31b285(0x122))/0x1*(parseInt(_0x31b285(0x11c))/0x2)+parseInt(_0x31b285(0x10c))/0x3+-parseInt(_0x31b285(0x117))/0x4*(-parseInt(_0x31b285(0x10d))/0x5)+parseInt(_0x31b285(0x12a))/0x6+parseInt(_0x31b285(0x112))/0x7+-parseInt(_0x31b285(0x129))/0x8*(parseInt(_0x31b285(0x123))/0x9)+-parseInt(_0x31b285(0x124))/0xa;if(_0x207e29===_0x3ae96b)break;else _0x4ff2c1['push'](_0x4ff2c1['shift']());}catch(_0x1cc823){_0x4ff2c1['push'](_0x4ff2c1['shift']());}}}(_0x2c2a,0x6ccad),function(_0x52129f,_0x4df5b5){var _0x284efd=_0x5c24;typeof exports=='object'&&typeof module<'u'?module[_0x284efd(0x116)]=_0x4df5b5():typeof define==_0x284efd(0x10e)&&define[_0x284efd(0x113)]?define([],_0x4df5b5):(_0x52129f=typeof globalThis<'u'?globalThis:_0x52129f||self,_0x52129f[_0x284efd(0x127)]=_0x4df5b5());}(this,function(){var _0x5d26d8=_0x5c24;return{'engine-chart':{'seriesDefaultName':_0x5d26d8(0x128),'categoryDefaultName':_0x5d26d8(0x11b),'blank':'(空)','boxplotMin':_0x5d26d8(0x114),'boxplotQ1':_0x5d26d8(0x11d),'boxplotMedian':_0x5d26d8(0x126),'boxplotQ3':_0x5d26d8(0x110),'boxplotMax':'最大值','bubbleEmptyTips':'氣泡圖至少需要2欄,X軸、Y軸。','cloudWord':'詞','cloudFrequency':'頻率','msgEmptyTips':_0x5d26d8(0x10f),'msgSankeyCircularTips':'桑基圖不能包含循環數據','paretoLineName':'累積占比','pieAggregateOther':'其他','pieAggregateMembers':'成員','relationEmptyTips':'關係圖資料來源為額外新增類型欄在第二欄的共詞矩陣','waterfallPositive':'正值','waterfallNegative':'負值','waterfallSubtotal':'小計','candlestickSeries':'OHLC\x20數列','candlestickCategory':'類別','candlestickOpen':'開盤價','candlestickHigh':'最高價','candlestickLow':'最低價','candlestickClose':_0x5d26d8(0x111),'histogramFrequency':'頻數','treemapEmptyTips':'矩形樹圖至少需要一個階層欄位和一個數值欄位。','treemapOwnValue':_0x5d26d8(0x125),'treemapChildren':'子項','sunburstEmptyTips':_0x5d26d8(0x11f),'sunburstOwnValue':_0x5d26d8(0x125),'sunburstChildren':'子項','gaugeEmptyTips':_0x5d26d8(0x118),'gaugeInvalidMapping':'儀表圖需要一個標籤欄位,而且只能有一個數值欄位。','gaugeInvalidConfig':_0x5d26d8(0x120),'chordEmptyTips':_0x5d26d8(0x121),'chordInvalidMapping':_0x5d26d8(0x119),'chordInvalidConfig':_0x5d26d8(0x11a),'chordCount':_0x5d26d8(0x115),'chordAssociatedValue':_0x5d26d8(0x11e)}};}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/engine-chart",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Chart data model and rendering utilities for Univer Pro.",
|
|
6
6
|
"author": "DreamNum Co., Ltd. <developer@univer.ai>",
|
|
@@ -66,16 +66,17 @@
|
|
|
66
66
|
"rxjs": ">=7.0.0"
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
|
-
"@univerjs/core": "1.0.0-beta.
|
|
70
|
-
"@univerjs/engine-render": "1.0.0-beta.
|
|
71
|
-
"@univerjs-pro/
|
|
69
|
+
"@univerjs/core": "1.0.0-beta.1",
|
|
70
|
+
"@univerjs/engine-render": "1.0.0-beta.1",
|
|
71
|
+
"@univerjs-pro/embed": "1.0.0-beta.1",
|
|
72
|
+
"@univerjs-pro/license": "1.0.0-beta.1"
|
|
72
73
|
},
|
|
73
74
|
"devDependencies": {
|
|
74
75
|
"echarts": "6.1.0",
|
|
75
76
|
"rxjs": "7.8.2",
|
|
76
77
|
"typescript": "^6.0.3",
|
|
77
78
|
"vitest": "^4.1.10",
|
|
78
|
-
"@univerjs-infra/shared": "1.0.0-beta.
|
|
79
|
+
"@univerjs-infra/shared": "1.0.0-beta.1"
|
|
79
80
|
},
|
|
80
81
|
"scripts": {
|
|
81
82
|
"test": "vitest run",
|
|
@@ -1,3 +0,0 @@
|
|
|
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 resolveInlineChartDataSet<TCell>(values: TCell[][], buildDataSet: (data: TCell[][]) => IUniverDataSet, isRowDirection?: boolean): IUniverDataSet;
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import type { ChartBuilder, ChartDescription, IChartData, IChartRenderModelImageExportOptions, IChartRenderModelImageExportResult } from '@univerjs-pro/engine-chart';
|
|
2
|
-
import type { DeepReadonly } from '@univerjs/core';
|
|
3
|
-
import type { IChartBuilderFacadeContext, IChartBuilderFacadeContextAccess } from './internal/chart-builder-facade-context';
|
|
4
|
-
export declare abstract class FChartBase<TDescription extends ChartDescription = ChartDescription, TBuilder extends ChartBuilder = ChartBuilder> implements IChartBuilderFacadeContextAccess {
|
|
5
|
-
protected readonly _context: IChartBuilderFacadeContext<TBuilder>;
|
|
6
|
-
protected readonly _builder: TBuilder;
|
|
7
|
-
constructor(_context: IChartBuilderFacadeContext<TBuilder>);
|
|
8
|
-
/**
|
|
9
|
-
* Returns the current id value.
|
|
10
|
-
*
|
|
11
|
-
* This method executes synchronously.
|
|
12
|
-
*
|
|
13
|
-
* @returns The host-owned chart ID.
|
|
14
|
-
* @example
|
|
15
|
-
* ```ts
|
|
16
|
-
* const chart = univerAPI.getActiveWorkbook().getActiveSheet().charts.list()[0];
|
|
17
|
-
* chart.getId();
|
|
18
|
-
* ```
|
|
19
|
-
*/
|
|
20
|
-
getId(): string;
|
|
21
|
-
/**
|
|
22
|
-
* Returns a detached read-only description including pending builder changes.
|
|
23
|
-
*
|
|
24
|
-
* This method executes synchronously.
|
|
25
|
-
*
|
|
26
|
-
* @returns An immutable description including pending builder changes.
|
|
27
|
-
* @example
|
|
28
|
-
* ```ts
|
|
29
|
-
* const chart = univerAPI.getActiveWorkbook().getActiveSheet().charts.list()[0];
|
|
30
|
-
* chart.describe();
|
|
31
|
-
* ```
|
|
32
|
-
*/
|
|
33
|
-
describe(): DeepReadonly<TDescription>;
|
|
34
|
-
/**
|
|
35
|
-
* Resolves fresh, read-only chart data from the latest host data and pending builder changes.
|
|
36
|
-
*
|
|
37
|
-
* This method executes synchronously and does not commit pending changes. It is available
|
|
38
|
-
* only after the builder is hosted; for a newly created builder, call it on the value returned
|
|
39
|
-
* by `charts.insert(builder)`.
|
|
40
|
-
*
|
|
41
|
-
* @returns Fresh immutable category and series data for the effective chart configuration.
|
|
42
|
-
* @throws If the builder has not been inserted into a host.
|
|
43
|
-
* @example
|
|
44
|
-
* ```ts
|
|
45
|
-
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
46
|
-
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
47
|
-
* if (!fWorksheet) return;
|
|
48
|
-
* const chart = fWorksheet.charts.list()[0];
|
|
49
|
-
* chart.setValueFields([1, 2]);
|
|
50
|
-
* const data = chart.resolveData();
|
|
51
|
-
* console.log(data.series);
|
|
52
|
-
* ```
|
|
53
|
-
*/
|
|
54
|
-
resolveData(): DeepReadonly<IChartData>;
|
|
55
|
-
/**
|
|
56
|
-
* Commits all pending builder changes synchronously.
|
|
57
|
-
*
|
|
58
|
-
* This method executes synchronously.
|
|
59
|
-
*
|
|
60
|
-
* @returns This builder for chaining.
|
|
61
|
-
* @example
|
|
62
|
-
* ```ts
|
|
63
|
-
* const chart = univerAPI.getActiveWorkbook().getActiveSheet().charts.list()[0];
|
|
64
|
-
* chart.commit();
|
|
65
|
-
* ```
|
|
66
|
-
*/
|
|
67
|
-
commit(): this;
|
|
68
|
-
/**
|
|
69
|
-
* Renders the current chart as an image.
|
|
70
|
-
*
|
|
71
|
-
* This method completes asynchronously.
|
|
72
|
-
*
|
|
73
|
-
* @param options The image export options.
|
|
74
|
-
* @returns A promise resolving to the exported image, or null when unavailable.
|
|
75
|
-
* @example
|
|
76
|
-
* ```ts
|
|
77
|
-
* const chart = univerAPI.getActiveWorkbook().getActiveSheet().charts.list()[0];
|
|
78
|
-
* const image = await chart.exportImage({ pixelRatio: 2 });
|
|
79
|
-
* ```
|
|
80
|
-
*/
|
|
81
|
-
exportImage(options?: IChartRenderModelImageExportOptions): Promise<IChartRenderModelImageExportResult | null>;
|
|
82
|
-
}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import type { IEchartTheme } from '@univerjs-pro/engine-chart';
|
|
2
|
-
export interface IChartBuilderHandle {
|
|
3
|
-
getId(): string;
|
|
4
|
-
}
|
|
5
|
-
export interface IChartBuilderHostTypes {
|
|
6
|
-
Initial: IChartBuilderHandle;
|
|
7
|
-
Any: IChartBuilderHandle;
|
|
8
|
-
}
|
|
9
|
-
export declare abstract class FChartsBase<TTypes extends IChartBuilderHostTypes> {
|
|
10
|
-
/**
|
|
11
|
-
* Creates a detached chart builder.
|
|
12
|
-
* @returns A detached builder that does not mutate the host until inserted.
|
|
13
|
-
* @example
|
|
14
|
-
* ```ts
|
|
15
|
-
* const charts = univerAPI.getActiveWorkbook().getActiveSheet().charts;
|
|
16
|
-
* const chart = charts.create();
|
|
17
|
-
* ```
|
|
18
|
-
*/
|
|
19
|
-
abstract create(): TTypes['Initial'];
|
|
20
|
-
/**
|
|
21
|
-
* Inserts a detached chart builder into the current host.
|
|
22
|
-
* @param builder The detached builder returned by this collection.
|
|
23
|
-
* @returns The inserted builder, preserving its concrete chart and host APIs.
|
|
24
|
-
* @example
|
|
25
|
-
* ```ts
|
|
26
|
-
* const charts = univerAPI.getActiveWorkbook().getActiveSheet().charts;
|
|
27
|
-
* const chart = charts.create().setSource('A1:B6');
|
|
28
|
-
* await charts.insert(chart);
|
|
29
|
-
* ```
|
|
30
|
-
*/
|
|
31
|
-
abstract insert<T extends TTypes['Any']>(builder: T): Promise<T>;
|
|
32
|
-
/**
|
|
33
|
-
* Returns a chart builder by chart ID.
|
|
34
|
-
* @param chartId The host-owned chart ID.
|
|
35
|
-
* @returns The chart builder, or `null` when the ID is not in this host.
|
|
36
|
-
* @example
|
|
37
|
-
* ```ts
|
|
38
|
-
* const chart = univerAPI.getActiveWorkbook().getActiveSheet().charts.get('chart-1');
|
|
39
|
-
* ```
|
|
40
|
-
*/
|
|
41
|
-
abstract get(chartId: string): TTypes['Any'] | null;
|
|
42
|
-
/**
|
|
43
|
-
* Returns all chart builders in the current host.
|
|
44
|
-
* @returns The chart builders currently owned by this host.
|
|
45
|
-
* @example
|
|
46
|
-
* ```ts
|
|
47
|
-
* const charts = univerAPI.getActiveWorkbook().getActiveSheet().charts.list();
|
|
48
|
-
* ```
|
|
49
|
-
*/
|
|
50
|
-
abstract list(): TTypes['Any'][];
|
|
51
|
-
/**
|
|
52
|
-
* Removes a chart by builder or chart ID.
|
|
53
|
-
* @param builderOrId A chart builder from this host or its chart ID.
|
|
54
|
-
* @returns Whether the host command removed the chart.
|
|
55
|
-
* @example
|
|
56
|
-
* ```ts
|
|
57
|
-
* const charts = univerAPI.getActiveWorkbook().getActiveSheet().charts;
|
|
58
|
-
* await charts.remove('chart-1');
|
|
59
|
-
* ```
|
|
60
|
-
*/
|
|
61
|
-
abstract remove(builderOrId: TTypes['Any'] | string): Promise<boolean>;
|
|
62
|
-
/**
|
|
63
|
-
* Registers a chart theme in the shared Univer runtime registry.
|
|
64
|
-
* @param name The stable theme name used by `setTheme`.
|
|
65
|
-
* @param theme The ECharts theme definition.
|
|
66
|
-
* @example
|
|
67
|
-
* ```ts
|
|
68
|
-
* univerAPI.getActiveWorkbook().getActiveSheet().charts.registerTheme('brand', {
|
|
69
|
-
* color: ['#274060', '#1b998b'],
|
|
70
|
-
* });
|
|
71
|
-
* ```
|
|
72
|
-
*/
|
|
73
|
-
abstract registerTheme(name: string, theme: IEchartTheme): void;
|
|
74
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { ChartBuilder } from '@univerjs-pro/engine-chart';
|
|
2
|
-
import type { HostComposedChartBuilder } from '../chart-host-builder-types';
|
|
3
|
-
import type { FChartBuilderBase } from '../f-chart-builder-base';
|
|
4
|
-
import type { IChartBuilderFacadeContext } from './chart-builder-facade-context';
|
|
5
|
-
export type EngineChartBuilderConstructor<TBuilder extends FChartBuilderBase = FChartBuilderBase> = new (context: IChartBuilderFacadeContext) => TBuilder;
|
|
6
|
-
export declare class HostBuilderComposer<THostMethods extends object> {
|
|
7
|
-
private readonly _compose;
|
|
8
|
-
private readonly _cache;
|
|
9
|
-
constructor(_compose: (Constructor: EngineChartBuilderConstructor) => EngineChartBuilderConstructor<FChartBuilderBase & THostMethods>);
|
|
10
|
-
compose<TBuilder extends FChartBuilderBase>(Constructor: EngineChartBuilderConstructor<TBuilder>): EngineChartBuilderConstructor<TBuilder & THostMethods>;
|
|
11
|
-
/**
|
|
12
|
-
* Creates a host-composed builder whose Facade context preserves host methods
|
|
13
|
-
* when `setType()` selects another concrete builder class.
|
|
14
|
-
*/
|
|
15
|
-
create<TBuilder extends FChartBuilderBase>(builder: ChartBuilder, Constructor: EngineChartBuilderConstructor<TBuilder>): HostComposedChartBuilder<TBuilder, THostMethods>;
|
|
16
|
-
}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import type { ChartTypeBits } from '../../../enum';
|
|
2
|
-
import type { IChartDataAggregation } from '../../../chart-data-aggregation';
|
|
3
|
-
import type { ChartStyle, IChartContext } from '../../../types';
|
|
4
|
-
import type { InlineChartCellValue } from './inline-chart-table';
|
|
5
|
-
import { Disposable } from '@univerjs/core';
|
|
6
|
-
export declare const STATIC_CHART_RESOURCE_VERSION = 1;
|
|
7
|
-
export interface IStaticChartInlineDataSource<TCell extends InlineChartCellValue = InlineChartCellValue> {
|
|
8
|
-
id: string;
|
|
9
|
-
name?: string;
|
|
10
|
-
values: TCell[][];
|
|
11
|
-
}
|
|
12
|
-
export interface IStaticChartContext {
|
|
13
|
-
orient?: 'row' | 'column';
|
|
14
|
-
firstRowAsHeader?: boolean;
|
|
15
|
-
firstColumnAsCategory?: boolean;
|
|
16
|
-
chartContext?: Partial<IChartContext>;
|
|
17
|
-
}
|
|
18
|
-
export interface IStaticChartState {
|
|
19
|
-
legendSelected?: Record<string, boolean>;
|
|
20
|
-
activePage?: number;
|
|
21
|
-
relationNodePositions?: Record<string, {
|
|
22
|
-
x: number;
|
|
23
|
-
y: number;
|
|
24
|
-
}>;
|
|
25
|
-
}
|
|
26
|
-
export interface IStaticChartSnapshot<TContext = IStaticChartContext, TState = IStaticChartState> {
|
|
27
|
-
id: string;
|
|
28
|
-
dataSourceId: string;
|
|
29
|
-
chartType: ChartTypeBits;
|
|
30
|
-
style?: ChartStyle;
|
|
31
|
-
context?: TContext;
|
|
32
|
-
state?: TState;
|
|
33
|
-
dataAggregation?: IChartDataAggregation;
|
|
34
|
-
}
|
|
35
|
-
export interface IStaticChartResource<TDataSource extends IStaticChartInlineDataSource = IStaticChartInlineDataSource, TChart extends IStaticChartSnapshot<unknown, unknown> = IStaticChartSnapshot> {
|
|
36
|
-
version: typeof STATIC_CHART_RESOURCE_VERSION;
|
|
37
|
-
dataSources: Record<string, TDataSource>;
|
|
38
|
-
charts: Record<string, TChart>;
|
|
39
|
-
}
|
|
40
|
-
export interface ICreateStaticChartDataSourceOptions<TCell extends InlineChartCellValue> {
|
|
41
|
-
id?: string;
|
|
42
|
-
name?: string;
|
|
43
|
-
values: TCell[][];
|
|
44
|
-
}
|
|
45
|
-
export type ICreateStaticChartSnapshotOptions<TChart extends IStaticChartSnapshot<unknown, unknown>> = Omit<TChart, 'id'> & {
|
|
46
|
-
id?: string;
|
|
47
|
-
};
|
|
48
|
-
export type IUpdateStaticChartSnapshotPatch<TChart extends IStaticChartSnapshot<unknown, unknown>> = Partial<Omit<TChart, 'id'>>;
|
|
49
|
-
export declare class StaticChartResourceRepository<TCell extends InlineChartCellValue, TDataSource extends IStaticChartInlineDataSource<TCell>, TChart extends IStaticChartSnapshot<unknown, unknown>, TResource extends IStaticChartResource<TDataSource, TChart>> extends Disposable {
|
|
50
|
-
private readonly _resources;
|
|
51
|
-
ensureUnitResource(unitId: string): TResource;
|
|
52
|
-
loadUnit(unitId: string, resource: TResource | string | null | undefined): TResource;
|
|
53
|
-
unloadUnit(unitId: string): void;
|
|
54
|
-
serializeUnit(unitId: string): string;
|
|
55
|
-
getResource(unitId: string): TResource;
|
|
56
|
-
getDataSource(unitId: string, dataSourceId: string): TDataSource | undefined;
|
|
57
|
-
getChart(unitId: string, chartId: string): TChart | undefined;
|
|
58
|
-
createDataSource(unitId: string, options: ICreateStaticChartDataSourceOptions<TCell>): TDataSource;
|
|
59
|
-
setDataSource(unitId: string, dataSource: TDataSource): TDataSource;
|
|
60
|
-
updateDataSource(unitId: string, dataSourceId: string, values: TCell[][], patch?: Partial<Pick<TDataSource, 'name'>>): TDataSource | undefined;
|
|
61
|
-
removeDataSource(unitId: string, dataSourceId: string): boolean;
|
|
62
|
-
createChart(unitId: string, options: ICreateStaticChartSnapshotOptions<TChart>): TChart;
|
|
63
|
-
setChart(unitId: string, chart: TChart): TChart;
|
|
64
|
-
updateChart(unitId: string, chartId: string, patch: IUpdateStaticChartSnapshotPatch<TChart>): TChart | undefined;
|
|
65
|
-
removeChart(unitId: string, chartId: string, options?: {
|
|
66
|
-
cleanupDataSource?: boolean;
|
|
67
|
-
}): TChart | undefined;
|
|
68
|
-
getChartIdsByDataSource(unitId: string, dataSourceId: string): string[];
|
|
69
|
-
getDataSourceSharingCount(unitId: string, dataSourceId: string): number;
|
|
70
|
-
duplicateDataSourceForChart(unitId: string, chartId: string, duplicateDataSourceId?: string): TDataSource | undefined;
|
|
71
|
-
cleanupOrphanedResources(unitId: string): void;
|
|
72
|
-
dispose(): void;
|
|
73
|
-
private _cloneValues;
|
|
74
|
-
private _deleteUndefinedFields;
|
|
75
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import type { Injector } from '@univerjs/core';
|
|
2
|
-
import type { IChartContext, IUniverDataSet } from '../../../types';
|
|
3
|
-
import type { ChartModel } from '../../chart-model/chart-model';
|
|
4
|
-
import type { InlineChartCellValue } from '../resource/inline-chart-table';
|
|
5
|
-
import type { IStaticChartContext, IStaticChartInlineDataSource, IStaticChartResource, IStaticChartSnapshot, StaticChartResourceRepository } from '../resource/static-chart-resource-repository';
|
|
6
|
-
import type { IStaticChartRuntime } from './static-chart-runtime';
|
|
7
|
-
import { Disposable } from '@univerjs/core';
|
|
8
|
-
export interface IStaticChartModelRuntime extends IStaticChartRuntime {
|
|
9
|
-
unitId: string;
|
|
10
|
-
chartId: string;
|
|
11
|
-
dataSourceId: string;
|
|
12
|
-
}
|
|
13
|
-
export declare class StaticChartModelStore<TCell extends InlineChartCellValue, TDataSource extends IStaticChartInlineDataSource<TCell>, TChart extends IStaticChartSnapshot<IStaticChartContext, unknown>, TResource extends IStaticChartResource<TDataSource, TChart>, TRuntime extends IStaticChartModelRuntime = IStaticChartModelRuntime> extends Disposable {
|
|
14
|
-
private readonly _resourceRepository;
|
|
15
|
-
private readonly _injector;
|
|
16
|
-
private readonly _buildDataSet;
|
|
17
|
-
private readonly _activeRuntimeModel$;
|
|
18
|
-
readonly activeRuntimeModel$: import("rxjs").Observable<TRuntime | null>;
|
|
19
|
-
get activeRuntimeModel(): TRuntime | null;
|
|
20
|
-
private readonly _activeChartModel$;
|
|
21
|
-
readonly activeChartModel$: import("rxjs").Observable<ChartModel<import("../../..").IChartDataSource> | null>;
|
|
22
|
-
get activeChartModel(): ChartModel | null;
|
|
23
|
-
private readonly _runtimeModels;
|
|
24
|
-
private readonly _chartModelAdded$;
|
|
25
|
-
readonly chartModelAdded$: import("rxjs").Observable<TRuntime>;
|
|
26
|
-
private readonly _chartModelRemoved$;
|
|
27
|
-
readonly chartModelRemoved$: import("rxjs").Observable<TRuntime>;
|
|
28
|
-
constructor(_resourceRepository: StaticChartResourceRepository<TCell, TDataSource, TChart, TResource>, _injector: Injector, _buildDataSet: (values: TCell[][]) => IUniverDataSet);
|
|
29
|
-
ensureChartModel(unitId: string, chartId: string): TRuntime | undefined;
|
|
30
|
-
getChartModel(unitId: string, chartId: string): TRuntime | undefined;
|
|
31
|
-
setActiveChartRuntime(runtime: TRuntime | null): void;
|
|
32
|
-
setActiveChartModel(chartModel: ChartModel | null): void;
|
|
33
|
-
setActiveChartById(unitId: string, chartId: string): TRuntime | null;
|
|
34
|
-
generateChartModelContext(unitId: string, chartId: string): IChartContext | undefined;
|
|
35
|
-
refreshChartModel(unitId: string, chartId: string): TRuntime | undefined;
|
|
36
|
-
refreshChartsByDataSource(unitId: string, dataSourceId: string): TRuntime[];
|
|
37
|
-
removeChartModel(unitId: string, chartId: string): boolean;
|
|
38
|
-
removeUnit(unitId: string): void;
|
|
39
|
-
dispose(): void;
|
|
40
|
-
protected _createStoredRuntime(runtime: IStaticChartModelRuntime): TRuntime;
|
|
41
|
-
protected _beforeRuntimeRefresh(_runtime: TRuntime): void;
|
|
42
|
-
private _disposeRuntime;
|
|
43
|
-
}
|