@univerjs-pro/engine-chart 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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/index.d.ts +8 -6
- package/lib/types/models/chart-host/resource/chart-resource-repository.d.ts +14 -37
- package/lib/types/models/chart-host/static/chart-host-data-source-binding.d.ts +13 -0
- package/lib/types/models/chart-host/static/chart-inline-data-source-binding.d.ts +17 -0
- package/lib/types/models/chart-host/static/chart-projected-data-source.d.ts +18 -0
- package/lib/types/models/chart-host/static/chart-resource-runtime.service.d.ts +10 -8
- package/lib/types/source/chart-data-source-status.d.ts +10 -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 +5 -6
- package/lib/types/models/chart-host/resource/chart-data-source-runtime.service.d.ts +0 -60
- package/lib/types/models/chart-host/resource/resource-ref-chart-data-source.adapter.d.ts +0 -22
- package/lib/types/models/chart-host/resource/resource-ref-chart-data-source.provider.d.ts +0 -14
- package/lib/types/models/chart-host/static/chart-resource-data-source-runtime.d.ts +0 -32
package/lib/locale/vi-VN.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function _0x1a1f(){const _0x308d57=['Tần\x20suất','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','Tiêu\x20đề\x20nguồn\x20dữ\x20liệu\x20biểu\x20đồ\x20không\x20hợp\x20lệ.','Phần\x20tử\x20con','Phần\x20tư\x20thứ\x20ba','Tổng\x20phụ','Biểu\x20đồ\x20đồng\x20hồ\x20cần\x20ít\x20nhất\x20một\x20giá\x20trị\x20số\x20hữu\x20hạn.','Giá\x20mở\x20cửa','701805pMWCHq','Giá\x20trị\x20âm','35VggvXK','Giá\x20cao\x20nhất','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.','(Trống)','Phần\x20tư\x20thứ\x20nhất','Không\x20có\x20dữ\x20liệu\x20để\x20hiển\x20thị.','Giá\x20thấp\x20nhất','Biểu\x20đồ\x20đồng\x20hồ\x20cần\x20một\x20trường\x20nhãn\x20và\x20đúng\x20một\x20trường\x20giá\x20trị.','24QYYMMd','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.','Danh\x20mục','Loạt\x20{0}','Trung\x20vị','Giá\x20trị\x20riêng','Giá\x20đóng\x20cửa','42329qjQHyU','9783495eGexGz','Thành\x20phần','Giá\x20trị\x20dương','Giá\x20trị\x20lớn\x20nhất','Tỷ\x20lệ\x20tích\x20lũy','5988570HLPrFC','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ố.','Chuỗi\x20OHLC','1400qPksap','12702jUDlyS','Khác','Ngày','568316TrpbmA','Giá\x20trị\x20liên\x20kết','Biểu\x20đồ\x20bong\x20bóng\x20yêu\x20cầu\x20ít\x20nhất\x202\x20cột:\x20trục\x20X,\x20trục\x20Y','5113310axpiwn'];_0x1a1f=function(){return _0x308d57;};return _0x1a1f();}function _0x102a(_0x40daa5,_0x198d8a){_0x40daa5=_0x40daa5-0x1ec;const _0x1a1f99=_0x1a1f();let _0x102a7a=_0x1a1f99[_0x40daa5];return _0x102a7a;}const _0x4bbc71=_0x102a;(function(_0x12014f,_0x384fa6){const _0x415c60=_0x102a,_0x10f1c1=_0x12014f();while(!![]){try{const _0x49930d=parseInt(_0x415c60(0x213))/0x1*(-parseInt(_0x415c60(0x1fa))/0x2)+parseInt(_0x415c60(0x209))/0x3+parseInt(_0x415c60(0x1fd))/0x4*(-parseInt(_0x415c60(0x20b))/0x5)+parseInt(_0x415c60(0x1f6))/0x6+parseInt(_0x415c60(0x1f0))/0x7*(parseInt(_0x415c60(0x1f9))/0x8)+-parseInt(_0x415c60(0x1f1))/0x9+parseInt(_0x415c60(0x200))/0xa;if(_0x49930d===_0x384fa6)break;else _0x10f1c1['push'](_0x10f1c1['shift']());}catch(_0x3bb3f6){_0x10f1c1['push'](_0x10f1c1['shift']());}}}(_0x1a1f,0x8a902));const e={'engine-chart':{'invalidSourceHeader':_0x4bbc71(0x203),'seriesDefaultName':_0x4bbc71(0x1ec),'blank':_0x4bbc71(0x20e),'boxplotMin':'Giá\x20trị\x20nhỏ\x20nhất','boxplotQ1':_0x4bbc71(0x20f),'boxplotMedian':_0x4bbc71(0x1ed),'boxplotQ3':_0x4bbc71(0x205),'boxplotMax':_0x4bbc71(0x1f4),'bubbleEmptyTips':_0x4bbc71(0x1ff),'cloudWord':'Từ','cloudFrequency':_0x4bbc71(0x201),'msgEmptyTips':_0x4bbc71(0x210),'msgSankeyCircularTips':'Biểu\x20đồ\x20Sankey\x20không\x20thể\x20chứa\x20dữ\x20liệu\x20vòng\x20lặp','paretoLineName':_0x4bbc71(0x1f5),'pieAggregateOther':_0x4bbc71(0x1fb),'pieAggregateMembers':_0x4bbc71(0x1f2),'relationEmptyTips':_0x4bbc71(0x202),'waterfallPositive':_0x4bbc71(0x1f3),'waterfallNegative':_0x4bbc71(0x20a),'waterfallSubtotal':_0x4bbc71(0x206),'candlestickSeries':_0x4bbc71(0x1f8),'candlestickHlcSeries':'Chuỗi\x20HLC','candlestickCategory':_0x4bbc71(0x215),'candlestickDate':_0x4bbc71(0x1fc),'candlestickOpen':_0x4bbc71(0x208),'candlestickHigh':_0x4bbc71(0x20c),'candlestickLow':_0x4bbc71(0x211),'candlestickClose':_0x4bbc71(0x1ef),'histogramFrequency':_0x4bbc71(0x201),'treemapEmptyTips':_0x4bbc71(0x1f7),'treemapOwnValue':_0x4bbc71(0x1ee),'treemapChildren':_0x4bbc71(0x204),'sunburstEmptyTips':'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ố.','sunburstOwnValue':_0x4bbc71(0x1ee),'sunburstChildren':_0x4bbc71(0x204),'gaugeEmptyTips':_0x4bbc71(0x207),'gaugeInvalidMapping':_0x4bbc71(0x212),'gaugeInvalidConfig':_0x4bbc71(0x214),'chordEmptyTips':'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.','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':_0x4bbc71(0x20d),'chordCount':'Số\x20lượng\x20mối\x20quan\x20hệ','chordAssociatedValue':_0x4bbc71(0x1fe)}};export{e as default};
|
package/lib/locale/zh-CN.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const _0xfb0161=_0xeb68;function _0x4871(){const _0x483329=['20RGdJpX','中位数','弦图配置无效,请检查角度、半径、不透明度和尺寸。','36IUZxIa','125510TBsjFg','5SDQdGV','自身值','HLC\x20系列','296EYReZN','关系计数','428988IoEYKO','关系图数据源为额外添加类型列在第二列的共词矩阵','(空)','OHLC\x20系列','190309HwlHwL','图表数据源标题配置无效。','3257091OszoVL','3qXTgRR','仪表图至少需要一个有限数值。','446884wRJkbC','请先添加系列开始数据可视化','125508GqOUdq','累积占比','桑基图不能包含循环数据','最大值','成员数','1177979nucBkk','旭日图至少需要一个层级字段和一个数值字段。','关联值','仪表图配置无效,请检查刻度范围、分段区间、比例和尺寸。','矩形树图至少需要一个层级字段和一个数值字段。'];_0x4871=function(){return _0x483329;};return _0x4871();}(function(_0x3673e1,_0x4729a0){const _0x3d4058=_0xeb68,_0x1e13cf=_0x3673e1();while(!![]){try{const _0x48f8e9=-parseInt(_0x3d4058(0x15e))/0x1*(parseInt(_0x3d4058(0x14d))/0x2)+-parseInt(_0x3d4058(0x14b))/0x3*(-parseInt(_0x3d4058(0x163))/0x4)+-parseInt(_0x3d4058(0x159))/0x5*(parseInt(_0x3d4058(0x14f))/0x6)+-parseInt(_0x3d4058(0x148))/0x7*(-parseInt(_0x3d4058(0x161))/0x8)+parseInt(_0x3d4058(0x14a))/0x9+parseInt(_0x3d4058(0x15d))/0xa+-parseInt(_0x3d4058(0x154))/0xb*(-parseInt(_0x3d4058(0x15c))/0xc);if(_0x48f8e9===_0x4729a0)break;else _0x1e13cf['push'](_0x1e13cf['shift']());}catch(_0x1efe3d){_0x1e13cf['push'](_0x1e13cf['shift']());}}}(_0x4871,0x94701));function _0xeb68(_0x41d949,_0x1e774e){_0x41d949=_0x41d949-0x145;const _0x487116=_0x4871();let _0xeb68d9=_0x487116[_0x41d949];return _0xeb68d9;}const e={'engine-chart':{'invalidSourceHeader':_0xfb0161(0x149),'seriesDefaultName':'系列\x20{0}','blank':_0xfb0161(0x146),'boxplotMin':'最小值','boxplotQ1':'第一四分位数','boxplotMedian':_0xfb0161(0x15a),'boxplotQ3':'第三四分位数','boxplotMax':_0xfb0161(0x152),'bubbleEmptyTips':'气泡图至少需要2列,X轴、Y轴。','cloudWord':'词语','cloudFrequency':'频率','msgEmptyTips':_0xfb0161(0x14e),'msgSankeyCircularTips':_0xfb0161(0x151),'paretoLineName':_0xfb0161(0x150),'pieAggregateOther':'其他','pieAggregateMembers':_0xfb0161(0x153),'relationEmptyTips':_0xfb0161(0x145),'waterfallPositive':'正值','waterfallNegative':'负值','waterfallSubtotal':'小计','candlestickSeries':_0xfb0161(0x147),'candlestickHlcSeries':_0xfb0161(0x160),'candlestickCategory':'类别','candlestickDate':'日期','candlestickOpen':'开盘','candlestickHigh':'最高','candlestickLow':'最低','candlestickClose':'收盘','histogramFrequency':'频数','treemapEmptyTips':_0xfb0161(0x158),'treemapOwnValue':_0xfb0161(0x15f),'treemapChildren':'子项','sunburstEmptyTips':_0xfb0161(0x155),'sunburstOwnValue':_0xfb0161(0x15f),'sunburstChildren':'子项','gaugeEmptyTips':_0xfb0161(0x14c),'gaugeInvalidMapping':'仪表图需要一个标签字段且只能有一个数值字段。','gaugeInvalidConfig':_0xfb0161(0x157),'chordEmptyTips':'弦图至少需要两个不同节点之间的一条正权重关系。','chordInvalidMapping':'弦图需要不同的来源字段和目标字段,并可选一个与二者不同的数值字段。','chordInvalidConfig':_0xfb0161(0x15b),'chordCount':_0xfb0161(0x162),'chordAssociatedValue':_0xfb0161(0x156)}};export{e as default};
|
package/lib/locale/zh-HK.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const _0x5e4701=_0x57f1;(function(_0x24ed63,_0x5d6163){const _0x553849=_0x57f1,_0x4906d5=_0x24ed63();while(!![]){try{const _0x3e51e1=parseInt(_0x553849(0x78))/0x1*(parseInt(_0x553849(0x76))/0x2)+parseInt(_0x553849(0x94))/0x3*(parseInt(_0x553849(0x7a))/0x4)+-parseInt(_0x553849(0x92))/0x5*(parseInt(_0x553849(0x95))/0x6)+parseInt(_0x553849(0x97))/0x7+parseInt(_0x553849(0x7c))/0x8*(-parseInt(_0x553849(0x86))/0x9)+parseInt(_0x553849(0x85))/0xa*(-parseInt(_0x553849(0x79))/0xb)+-parseInt(_0x553849(0x77))/0xc*(-parseInt(_0x553849(0x88))/0xd);if(_0x3e51e1===_0x5d6163)break;else _0x4906d5['push'](_0x4906d5['shift']());}catch(_0x1b65fb){_0x4906d5['push'](_0x4906d5['shift']());}}}(_0x32d6,0xc46c6));function _0x32d6(){const _0x1dbb54=['關係圖資料來源為額外新增類型欄在第二欄的共詞矩陣','關聯值','7798170QNPVmc','弦圖需要不同的來源與目標欄位,並可選擇一個與兩者不同的數值欄位。','558MZIZgu','6FlXBiu','旭日圖至少需要一個階層欄位和一個數值欄位。','448273UWGSiX','89020kOYbuD','44171844UuwZpQ','13DXNXcV','2035IUadpb','9516gCqnfg','圖表資料來源標題設定無效。','17968qDmzWl','弦圖至少需要兩個不同節點之間的一條正權重關係。','桑基圖不能包含循環數據','第三四分位數','累積占比','自身值','HLC\x20數列','OHLC\x20數列','請先添加系列開始數據可視化','71440YNYUXn','4329buOiFa','儀表圖需要一個標籤欄位,而且只能有一個數值欄位。','13KGRZhS','儀表圖設定無效,請檢查刻度範圍、分段區間、比例和尺寸。','矩形樹圖至少需要一個階層欄位和一個數值欄位。','氣泡圖至少需要2欄,X軸、Y軸。','收盤價','弦圖設定無效,請檢查角度、半徑、不透明度和尺寸。','最低價','第一四分位數'];_0x32d6=function(){return _0x1dbb54;};return _0x32d6();}function _0x57f1(_0x530334,_0x412884){_0x530334=_0x530334-0x76;const _0x32d6f6=_0x32d6();let _0x57f1c3=_0x32d6f6[_0x530334];return _0x57f1c3;}const e={'engine-chart':{'invalidSourceHeader':_0x5e4701(0x7b),'seriesDefaultName':'系列\x20{0}','blank':'(空)','boxplotMin':'最小值','boxplotQ1':_0x5e4701(0x8f),'boxplotMedian':'中位數','boxplotQ3':_0x5e4701(0x7f),'boxplotMax':'最大值','bubbleEmptyTips':_0x5e4701(0x8b),'cloudWord':'詞','cloudFrequency':'頻率','msgEmptyTips':_0x5e4701(0x84),'msgSankeyCircularTips':_0x5e4701(0x7e),'paretoLineName':_0x5e4701(0x80),'pieAggregateOther':'其他','pieAggregateMembers':'成員','relationEmptyTips':_0x5e4701(0x90),'waterfallPositive':'正值','waterfallNegative':'負值','waterfallSubtotal':'小計','candlestickSeries':_0x5e4701(0x83),'candlestickHlcSeries':_0x5e4701(0x82),'candlestickCategory':'類別','candlestickDate':'日期','candlestickOpen':'開盤價','candlestickHigh':'最高價','candlestickLow':_0x5e4701(0x8e),'candlestickClose':_0x5e4701(0x8c),'histogramFrequency':'頻數','treemapEmptyTips':_0x5e4701(0x8a),'treemapOwnValue':_0x5e4701(0x81),'treemapChildren':'子項','sunburstEmptyTips':_0x5e4701(0x96),'sunburstOwnValue':_0x5e4701(0x81),'sunburstChildren':'子項','gaugeEmptyTips':'儀表圖至少需要一個有限數值。','gaugeInvalidMapping':_0x5e4701(0x87),'gaugeInvalidConfig':_0x5e4701(0x89),'chordEmptyTips':_0x5e4701(0x7d),'chordInvalidMapping':_0x5e4701(0x93),'chordInvalidConfig':_0x5e4701(0x8d),'chordCount':'關係數','chordAssociatedValue':_0x5e4701(0x91)}};export{e as default};
|
package/lib/locale/zh-TW.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const _0x14a5fa=_0x51e2;function _0x5796(){const _0x107bf5=['關係數','第三四分位數','累積占比','OHLC\x20數列','關聯值','儀表圖至少需要一個有限數值。','HLC\x20數列','系列\x20{0}','自身值','10anopOi','旭日圖至少需要一個階層欄位和一個數值欄位。','20718kNrPea','最低價','2867355CSLtyz','最高價','請先添加系列開始數據可視化','691912MJgORS','弦圖需要不同的來源與目標欄位,並可選擇一個與兩者不同的數值欄位。','中位數','507846wzXYTO','6JPsvlR','關係圖資料來源為額外新增類型欄在第二欄的共詞矩陣','11348390TVqSOP','1300184XCWexs','最小值','氣泡圖至少需要2欄,X軸、Y軸。','儀表圖需要一個標籤欄位,而且只能有一個數值欄位。','49gmwnTQ','1233462fUUHWd','弦圖至少需要兩個不同節點之間的一條正權重關係。'];_0x5796=function(){return _0x107bf5;};return _0x5796();}(function(_0x176481,_0x4f3192){const _0x2ea4ee=_0x51e2,_0x2df656=_0x176481();while(!![]){try{const _0x124b5c=parseInt(_0x2ea4ee(0x1a5))/0x1+-parseInt(_0x2ea4ee(0x1ae))/0x2+-parseInt(_0x2ea4ee(0x1a6))/0x3*(-parseInt(_0x2ea4ee(0x1a9))/0x4)+-parseInt(_0x2ea4ee(0x1b9))/0x5*(-parseInt(_0x2ea4ee(0x1bb))/0x6)+parseInt(_0x2ea4ee(0x1ad))/0x7*(parseInt(_0x2ea4ee(0x1a2))/0x8)+parseInt(_0x2ea4ee(0x1bd))/0x9+-parseInt(_0x2ea4ee(0x1a8))/0xa;if(_0x124b5c===_0x4f3192)break;else _0x2df656['push'](_0x2df656['shift']());}catch(_0x264d33){_0x2df656['push'](_0x2df656['shift']());}}}(_0x5796,0x5258c));function _0x51e2(_0x7ee90e,_0x4716d4){_0x7ee90e=_0x7ee90e-0x1a0;const _0x579614=_0x5796();let _0x51e26e=_0x579614[_0x7ee90e];return _0x51e26e;}const e={'engine-chart':{'invalidSourceHeader':'圖表資料來源標題設定無效。','seriesDefaultName':_0x14a5fa(0x1b7),'blank':'(空)','boxplotMin':_0x14a5fa(0x1aa),'boxplotQ1':'第一四分位數','boxplotMedian':_0x14a5fa(0x1a4),'boxplotQ3':_0x14a5fa(0x1b1),'boxplotMax':'最大值','bubbleEmptyTips':_0x14a5fa(0x1ab),'cloudWord':'詞','cloudFrequency':'頻率','msgEmptyTips':_0x14a5fa(0x1a1),'msgSankeyCircularTips':'桑基圖不能包含循環數據','paretoLineName':_0x14a5fa(0x1b2),'pieAggregateOther':'其他','pieAggregateMembers':'成員','relationEmptyTips':_0x14a5fa(0x1a7),'waterfallPositive':'正值','waterfallNegative':'負值','waterfallSubtotal':'小計','candlestickSeries':_0x14a5fa(0x1b3),'candlestickHlcSeries':_0x14a5fa(0x1b6),'candlestickCategory':'類別','candlestickDate':'日期','candlestickOpen':'開盤價','candlestickHigh':_0x14a5fa(0x1a0),'candlestickLow':_0x14a5fa(0x1bc),'candlestickClose':'收盤價','histogramFrequency':'頻數','treemapEmptyTips':'矩形樹圖至少需要一個階層欄位和一個數值欄位。','treemapOwnValue':'自身值','treemapChildren':'子項','sunburstEmptyTips':_0x14a5fa(0x1ba),'sunburstOwnValue':_0x14a5fa(0x1b8),'sunburstChildren':'子項','gaugeEmptyTips':_0x14a5fa(0x1b5),'gaugeInvalidMapping':_0x14a5fa(0x1ac),'gaugeInvalidConfig':'儀表圖設定無效,請檢查刻度範圍、分段區間、比例和尺寸。','chordEmptyTips':_0x14a5fa(0x1af),'chordInvalidMapping':_0x14a5fa(0x1a3),'chordInvalidConfig':'弦圖設定無效,請檢查角度、半徑、不透明度和尺寸。','chordCount':_0x14a5fa(0x1b0),'chordAssociatedValue':_0x14a5fa(0x1b4)}};export{e as default};
|
package/lib/types/index.d.ts
CHANGED
|
@@ -74,15 +74,15 @@ export { chartConfigInterpreter } from './models/chart-host/config/chart-config-
|
|
|
74
74
|
export type { IChartConfigUpdate } from './models/chart-host/config/chart-config-interpreter';
|
|
75
75
|
export { chartImageSourceToDataUrl, DataUrlImageChartHost, ImageChartHost, } from './models/chart-host/image-chart-host';
|
|
76
76
|
export { OffscreenChartHost } from './models/chart-host/offscreen-chart-host';
|
|
77
|
-
export {
|
|
78
|
-
export type {
|
|
79
|
-
export { CHART_RESOURCE_VERSION, ChartResourceRepository, isInlineChartDataSource, isReferencedChartDataSource, } from './models/chart-host/resource/chart-resource-repository';
|
|
80
|
-
export type { IChartDataSourceInput, IChartResource, IChartResourceContext, IChartResourceDataSource, IChartResourceSnapshot, IChartResourceState, ICreateChartDataSourceOptions, ICreateChartSnapshotOptions, IInlineChartDataSource, IReferencedChartDataSource, IUpdateChartSnapshotPatch, } from './models/chart-host/resource/chart-resource-repository';
|
|
77
|
+
export { ChartResourceRepository, isInlineChartDataSource, } from './models/chart-host/resource/chart-resource-repository';
|
|
78
|
+
export type { IChartDataSourceDescriptor, IChartResource, IChartResourceContext, IChartResourceSnapshot, IChartResourceState, ICreateChartDataSourceOptions, ICreateChartSnapshotOptions, IInlineChartDataSource, IUpdateChartSnapshotPatch, } from './models/chart-host/resource/chart-resource-repository';
|
|
81
79
|
export { serializeChartResource } from './models/chart-host/resource/chart-resource-serializer';
|
|
82
80
|
export { parseInlineChartTable, } from './models/chart-host/resource/inline-chart-table';
|
|
83
81
|
export type { ChartDataSourceValue } from './models/chart-host/resource/inline-chart-table';
|
|
84
|
-
export {
|
|
85
|
-
export
|
|
82
|
+
export type { IChartHostDataSourceBinding } from './models/chart-host/static/chart-host-data-source-binding';
|
|
83
|
+
export { ChartInlineDataSourceBinding } from './models/chart-host/static/chart-inline-data-source-binding';
|
|
84
|
+
export { ChartProjectedDataSource } from './models/chart-host/static/chart-projected-data-source';
|
|
85
|
+
export type { IChartResourceSourceProjection } from './models/chart-host/static/chart-projected-data-source';
|
|
86
86
|
export { ChartResourceRuntimeService } from './models/chart-host/static/chart-resource-runtime.service';
|
|
87
87
|
export type { IChartModelBinding } from './models/chart-host/static/chart-resource-runtime.service';
|
|
88
88
|
export { createChartRuntime, refreshChartRuntime, } from './models/chart-host/static/chart-runtime';
|
|
@@ -130,6 +130,8 @@ export { UniverChartPlugin } from './plugin';
|
|
|
130
130
|
export { toChartDataItem } from './source/chart-data-item';
|
|
131
131
|
export { createChartDataSetProjector } from './source/chart-data-set-projector';
|
|
132
132
|
export type { IChartDataSetProjector, IChartSourceItem, IChartSourceTable, ICreateChartDataSetProjectorOptions, } from './source/chart-data-set-projector';
|
|
133
|
+
export { ChartDataSourceRuntimeStatus } from './source/chart-data-source-status';
|
|
134
|
+
export type { IChartDataSourceStatus } from './source/chart-data-source-status';
|
|
133
135
|
export { ChartDataSource } from './source/chart-source';
|
|
134
136
|
export { ChartSourceHeaderTitleType } from './source/chart-source-header';
|
|
135
137
|
export type { IChartSourceHeader, IChartSourceHeaderTitle } from './source/chart-source-header';
|
|
@@ -4,39 +4,17 @@ import type { ChartTypeBits } from '../../../enum';
|
|
|
4
4
|
import type { IChartSourceHeader } from '../../../source/chart-source-header';
|
|
5
5
|
import type { ChartStyle, IChartContext } from '../../../types';
|
|
6
6
|
import type { ChartDataSourceValue } from './inline-chart-table';
|
|
7
|
-
import type { IResourceRefChartDataSourceReference } from './resource-ref-chart-data-source.adapter';
|
|
8
7
|
import { Disposable } from '@univerjs/core';
|
|
9
|
-
export
|
|
10
|
-
export interface IInlineChartDataSource<TCell extends ChartDataSourceValue = ChartDataSourceValue> {
|
|
8
|
+
export interface IChartDataSourceDescriptor {
|
|
11
9
|
id: string;
|
|
12
10
|
name?: string;
|
|
13
|
-
values: TCell[][];
|
|
14
11
|
}
|
|
15
|
-
export interface
|
|
12
|
+
export interface IInlineChartDataSource<TCell extends ChartDataSourceValue = ChartDataSourceValue> {
|
|
16
13
|
id: string;
|
|
17
14
|
name?: string;
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
export type IChartResourceDataSource = IInlineChartDataSource | IReferencedChartDataSource;
|
|
21
|
-
export type IChartDataSourceInput = {
|
|
22
|
-
values: ChartDataSourceValue[][];
|
|
23
|
-
source?: never;
|
|
24
|
-
} | {
|
|
25
|
-
source: IResourceRefChartDataSourceReference;
|
|
26
|
-
values?: never;
|
|
27
|
-
};
|
|
28
|
-
interface IChartDataSourceCandidate {
|
|
29
|
-
values?: ChartDataSourceValue[][];
|
|
30
|
-
source?: IResourceRefChartDataSourceReference;
|
|
15
|
+
values: TCell[][];
|
|
31
16
|
}
|
|
32
|
-
export declare function isInlineChartDataSource
|
|
33
|
-
values: ChartDataSourceValue[][];
|
|
34
|
-
source?: never;
|
|
35
|
-
};
|
|
36
|
-
export declare function isReferencedChartDataSource<T extends IChartDataSourceCandidate>(dataSource: T | null | undefined): dataSource is T & {
|
|
37
|
-
source: IResourceRefChartDataSourceReference;
|
|
38
|
-
values?: never;
|
|
39
|
-
};
|
|
17
|
+
export declare function isInlineChartDataSource(dataSource: unknown): dataSource is IInlineChartDataSource;
|
|
40
18
|
export interface IChartResourceContext {
|
|
41
19
|
/** Authored sources persist an explicit projection; only snapshot decoding supplies historical defaults. */
|
|
42
20
|
header?: IChartSourceHeader;
|
|
@@ -60,12 +38,11 @@ export interface IChartResourceSnapshot<TContext = IChartResourceContext, TState
|
|
|
60
38
|
state?: TState;
|
|
61
39
|
dataAggregation?: IChartDataAggregation;
|
|
62
40
|
}
|
|
63
|
-
export interface IChartResource<TDataSource extends
|
|
64
|
-
version: typeof CHART_RESOURCE_VERSION;
|
|
41
|
+
export interface IChartResource<TDataSource extends IChartDataSourceDescriptor = IChartDataSourceDescriptor, TChart extends IChartResourceSnapshot<unknown, unknown> = IChartResourceSnapshot> {
|
|
65
42
|
dataSources: Record<string, TDataSource>;
|
|
66
43
|
charts: Record<string, TChart>;
|
|
67
44
|
}
|
|
68
|
-
export type ICreateChartDataSourceOptions<TDataSource extends
|
|
45
|
+
export type ICreateChartDataSourceOptions<TDataSource extends IChartDataSourceDescriptor = IChartDataSourceDescriptor> = TDataSource extends IChartDataSourceDescriptor ? Omit<TDataSource, 'id'> & {
|
|
69
46
|
id?: string;
|
|
70
47
|
} : never;
|
|
71
48
|
export type ICreateChartSnapshotOptions<TChart extends IChartResourceSnapshot<unknown, unknown>> = Omit<TChart, 'id'> & {
|
|
@@ -107,14 +84,17 @@ export type IChartResourceChangeEvent = {
|
|
|
107
84
|
kind: typeof ChartResourceChangeKind.UnitUnloaded;
|
|
108
85
|
unitId: string;
|
|
109
86
|
};
|
|
110
|
-
export declare class ChartResourceRepository<TDataSource extends
|
|
87
|
+
export declare abstract class ChartResourceRepository<TDataSource extends IChartDataSourceDescriptor = IChartDataSourceDescriptor, TChart extends IChartResourceSnapshot<unknown, unknown> = IChartResourceSnapshot, TResource extends IChartResource<TDataSource, TChart> = IChartResource<TDataSource, TChart>> extends Disposable {
|
|
111
88
|
private readonly _resources;
|
|
112
89
|
private readonly _dataSourceRemoved$;
|
|
113
90
|
private readonly _resourceChanged$;
|
|
114
91
|
readonly dataSourceRemoved$: Observable<IChartDataSourceRemovedEvent>;
|
|
115
92
|
readonly resourceChanged$: Observable<IChartResourceChangeEvent>;
|
|
116
|
-
/**
|
|
117
|
-
|
|
93
|
+
/**
|
|
94
|
+
* Returns a cloned context with a validated, normalized Header before command recording.
|
|
95
|
+
* Supplied values enable dimension-bound checks; omitted values validate Header structure only.
|
|
96
|
+
*/
|
|
97
|
+
prepareChartContext(context: IChartResourceContext | undefined, values?: ChartDataSourceValue[][]): IChartResourceContext;
|
|
118
98
|
ensureUnitResource(unitId: string): TResource;
|
|
119
99
|
loadUnit(unitId: string, resource: unknown): TResource;
|
|
120
100
|
unloadUnit(unitId: string): void;
|
|
@@ -124,7 +104,6 @@ export declare class ChartResourceRepository<TDataSource extends IChartResourceD
|
|
|
124
104
|
getChart(unitId: string, chartId: string): TChart | undefined;
|
|
125
105
|
createDataSource(unitId: string, options: ICreateChartDataSourceOptions<TDataSource>): TDataSource;
|
|
126
106
|
setDataSource(unitId: string, dataSource: TDataSource): TDataSource;
|
|
127
|
-
updateDataSource(unitId: string, dataSourceId: string, values: ChartDataSourceValue[][], patch?: Partial<Pick<TDataSource, 'name'>>): TDataSource | undefined;
|
|
128
107
|
removeDataSource(unitId: string, dataSourceId: string): boolean;
|
|
129
108
|
createChart(unitId: string, options: ICreateChartSnapshotOptions<TChart>): TChart;
|
|
130
109
|
setChart(unitId: string, chart: TChart): TChart;
|
|
@@ -139,11 +118,9 @@ export declare class ChartResourceRepository<TDataSource extends IChartResourceD
|
|
|
139
118
|
cleanupOrphanedResources(unitId: string): void;
|
|
140
119
|
dispose(): void;
|
|
141
120
|
private _decodeResource;
|
|
142
|
-
|
|
121
|
+
protected abstract _decodeDataSource(dataSourceId: string, candidate: unknown): TDataSource;
|
|
143
122
|
private _cloneDataSource;
|
|
123
|
+
protected _invalidDataSource(dataSourceId: string): Error;
|
|
144
124
|
private _isResourceEnvelope;
|
|
145
|
-
private _isValues;
|
|
146
|
-
private _normalizeReference;
|
|
147
|
-
private _invalidDataSource;
|
|
148
125
|
}
|
|
149
126
|
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { IDisposable } from '@univerjs/core';
|
|
2
|
+
import type { Observable } from 'rxjs';
|
|
3
|
+
import type { IChartDataSourceStatus } from '../../../source/chart-data-source-status';
|
|
4
|
+
import type { IChartDataSource } from '../../../types';
|
|
5
|
+
import type { IChartResourceSourceProjection } from './chart-projected-data-source';
|
|
6
|
+
export interface IChartHostDataSourceBinding extends IDisposable {
|
|
7
|
+
readonly dataSource: IChartDataSource;
|
|
8
|
+
readonly state$: Observable<IChartDataSourceStatus>;
|
|
9
|
+
readonly state: IChartDataSourceStatus;
|
|
10
|
+
refresh?(): Promise<void>;
|
|
11
|
+
setProjection(projection: IChartResourceSourceProjection): void;
|
|
12
|
+
markUnavailable(error: unknown): void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { IChartDataSourceStatus } from '../../../source/chart-data-source-status';
|
|
2
|
+
import type { ChartDataSourceValue } from '../resource/inline-chart-table';
|
|
3
|
+
import type { IChartHostDataSourceBinding } from './chart-host-data-source-binding';
|
|
4
|
+
import type { IChartResourceSourceProjection } from './chart-projected-data-source';
|
|
5
|
+
import { Disposable } from '@univerjs/core';
|
|
6
|
+
import { ChartProjectedDataSource } from './chart-projected-data-source';
|
|
7
|
+
export declare class ChartInlineDataSourceBinding extends Disposable implements IChartHostDataSourceBinding {
|
|
8
|
+
readonly dataSource: ChartProjectedDataSource;
|
|
9
|
+
private readonly _state$;
|
|
10
|
+
readonly state$: import("rxjs").Observable<IChartDataSourceStatus>;
|
|
11
|
+
constructor(values: ReadonlyArray<ReadonlyArray<ChartDataSourceValue>>, projection: IChartResourceSourceProjection);
|
|
12
|
+
get state(): IChartDataSourceStatus;
|
|
13
|
+
update(values: ReadonlyArray<ReadonlyArray<ChartDataSourceValue>>, projection: IChartResourceSourceProjection): void;
|
|
14
|
+
setProjection(projection: IChartResourceSourceProjection): void;
|
|
15
|
+
markUnavailable(error: unknown): void;
|
|
16
|
+
dispose(): void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { IChartResourceContext } from '../resource/chart-resource-repository';
|
|
2
|
+
import type { ChartDataSourceValue } from '../resource/inline-chart-table';
|
|
3
|
+
import { ChartDataSource } from '../../../source/chart-source';
|
|
4
|
+
export interface IChartResourceSourceProjection {
|
|
5
|
+
header?: IChartResourceContext['header'];
|
|
6
|
+
isRowDirection: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare class ChartProjectedDataSource extends ChartDataSource {
|
|
9
|
+
private _sourceProjection;
|
|
10
|
+
private _rawValues?;
|
|
11
|
+
private _diagnostics;
|
|
12
|
+
private _sourceProjectionDisposed;
|
|
13
|
+
constructor(_sourceProjection: IChartResourceSourceProjection);
|
|
14
|
+
get diagnostics(): readonly unknown[];
|
|
15
|
+
setValues(values: ReadonlyArray<ReadonlyArray<ChartDataSourceValue>>, projection?: IChartResourceSourceProjection): void;
|
|
16
|
+
setProjection(projection: IChartResourceSourceProjection): void;
|
|
17
|
+
dispose(): void;
|
|
18
|
+
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { Injector } from '@univerjs/core';
|
|
2
2
|
import type { Observable } from 'rxjs';
|
|
3
|
+
import type { IChartDataSourceStatus } from '../../../source/chart-data-source-status';
|
|
3
4
|
import type { IChartContext } from '../../../types';
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
5
|
+
import type { ChartResourceRepository, IChartDataSourceDescriptor, IChartResource, IChartResourceContext, IChartResourceSnapshot } from '../resource/chart-resource-repository';
|
|
6
|
+
import type { IChartHostDataSourceBinding } from './chart-host-data-source-binding';
|
|
7
|
+
import type { IChartResourceSourceProjection } from './chart-projected-data-source';
|
|
6
8
|
import { Disposable } from '@univerjs/core';
|
|
7
9
|
import { ChartModel } from '../../chart-model/chart-model';
|
|
8
10
|
export interface IChartModelBinding {
|
|
@@ -11,10 +13,9 @@ export interface IChartModelBinding {
|
|
|
11
13
|
dataSourceId: string;
|
|
12
14
|
model: ChartModel;
|
|
13
15
|
}
|
|
14
|
-
export declare class ChartResourceRuntimeService<TDataSource extends
|
|
16
|
+
export declare abstract class ChartResourceRuntimeService<TDataSource extends IChartDataSourceDescriptor, TChart extends IChartResourceSnapshot<IChartResourceContext, unknown>, TResource extends IChartResource<TDataSource, TChart>, TRuntime extends IChartModelBinding = IChartModelBinding> extends Disposable {
|
|
15
17
|
private readonly _resourceRepository;
|
|
16
18
|
private readonly _injector;
|
|
17
|
-
private readonly _dataSourceRuntimeService;
|
|
18
19
|
private readonly _activeRuntimeModel$;
|
|
19
20
|
readonly activeRuntimeModel$: Observable<TRuntime | null>;
|
|
20
21
|
get activeRuntimeModel(): TRuntime | null;
|
|
@@ -27,11 +28,11 @@ export declare class ChartResourceRuntimeService<TDataSource extends IChartResou
|
|
|
27
28
|
readonly chartModelAdded$: Observable<TRuntime>;
|
|
28
29
|
private readonly _chartModelRemoved$;
|
|
29
30
|
readonly chartModelRemoved$: Observable<TRuntime>;
|
|
30
|
-
constructor(_resourceRepository: ChartResourceRepository<TDataSource, TChart, TResource>, _injector: Injector
|
|
31
|
+
constructor(_resourceRepository: ChartResourceRepository<TDataSource, TChart, TResource>, _injector: Injector);
|
|
31
32
|
ensureChartModel(unitId: string, chartId: string): TRuntime | undefined;
|
|
32
33
|
getChartModel(unitId: string, chartId: string): TRuntime | undefined;
|
|
33
|
-
getDataSourceRuntimeState$(unitId: string, chartId: string): Observable<
|
|
34
|
-
getDataSourceRuntimeState(unitId: string, chartId: string):
|
|
34
|
+
getDataSourceRuntimeState$(unitId: string, chartId: string): Observable<IChartDataSourceStatus> | undefined;
|
|
35
|
+
getDataSourceRuntimeState(unitId: string, chartId: string): IChartDataSourceStatus | undefined;
|
|
35
36
|
refreshChartDataSource(unitId: string, chartId: string): Promise<void>;
|
|
36
37
|
setActiveChartRuntime(runtime: TRuntime | null): void;
|
|
37
38
|
setActiveChartModel(chartModel: ChartModel | null): void;
|
|
@@ -44,7 +45,8 @@ export declare class ChartResourceRuntimeService<TDataSource extends IChartResou
|
|
|
44
45
|
dispose(): void;
|
|
45
46
|
protected _createStoredRuntime(runtime: IChartModelBinding): TRuntime;
|
|
46
47
|
protected _beforeRuntimeRefresh(_runtime: TRuntime): void;
|
|
47
|
-
|
|
48
|
+
protected abstract _createDataSourceBinding(unitId: string, descriptor: TDataSource, projection: IChartResourceSourceProjection): IChartHostDataSourceBinding;
|
|
49
|
+
protected abstract _updateDataSourceBinding(binding: IChartHostDataSourceBinding, previous: TDataSource, next: TDataSource, projection: IChartResourceSourceProjection): boolean;
|
|
48
50
|
private _createSourceProjection;
|
|
49
51
|
private _handleResourceChange;
|
|
50
52
|
private _setBinding;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare enum ChartDataSourceRuntimeStatus {
|
|
2
|
+
LOADING = "loading",
|
|
3
|
+
READY = "ready",
|
|
4
|
+
UNAVAILABLE = "unavailable",
|
|
5
|
+
REFRESH_ERROR = "refresh-error"
|
|
6
|
+
}
|
|
7
|
+
export interface IChartDataSourceStatus {
|
|
8
|
+
status: ChartDataSourceRuntimeStatus;
|
|
9
|
+
error?: unknown;
|
|
10
|
+
}
|