@mce/chart 0.24.4 → 0.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ChartEditor.vue.d.ts +3 -0
- package/dist/create.d.ts +9 -0
- package/dist/index.d.ts +4 -0
- package/dist/plugin.d.ts +31 -0
- package/package.json +2 -2
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
package/dist/create.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Chart, ChartType, Element } from 'modern-idoc';
|
|
2
|
+
export interface CreateChartElementOptions {
|
|
3
|
+
width?: number;
|
|
4
|
+
height?: number;
|
|
5
|
+
categories?: string[];
|
|
6
|
+
series?: Chart['series'];
|
|
7
|
+
}
|
|
8
|
+
/** A chart backed by the native `chart` element property (column/line/pie/…). */
|
|
9
|
+
export declare function createChartElement(type?: ChartType, options?: CreateChartElementOptions): Element;
|
package/dist/index.d.ts
ADDED
package/dist/plugin.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Element2D } from 'modern-canvas';
|
|
2
|
+
import type { ChartType } from 'modern-idoc';
|
|
3
|
+
declare global {
|
|
4
|
+
namespace Mce {
|
|
5
|
+
interface Tools {
|
|
6
|
+
chartBar: [];
|
|
7
|
+
chartLine: [];
|
|
8
|
+
chartPie: [];
|
|
9
|
+
}
|
|
10
|
+
interface ChartLegendOptions {
|
|
11
|
+
legend?: 'top' | 'bottom' | 'left' | 'right' | 'none';
|
|
12
|
+
title?: string;
|
|
13
|
+
}
|
|
14
|
+
interface ChartData {
|
|
15
|
+
categories?: string[];
|
|
16
|
+
series?: {
|
|
17
|
+
name?: string;
|
|
18
|
+
values: number[];
|
|
19
|
+
}[];
|
|
20
|
+
}
|
|
21
|
+
interface Commands {
|
|
22
|
+
getChart: (node?: Element2D) => any;
|
|
23
|
+
setChartType: (type: ChartType, node?: Element2D) => void;
|
|
24
|
+
/** 更新图表数据(categories / series),未给的字段保留。 */
|
|
25
|
+
setChartData: (data: ChartData, node?: Element2D) => void;
|
|
26
|
+
/** 更新图例位置 / 标题等展示项。 */
|
|
27
|
+
setChartOptions: (options: ChartLegendOptions, node?: Element2D) => void;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export declare function plugin(): import("mce").Plugin;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mce/chart",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.25.0",
|
|
5
5
|
"description": "Chart plugin for mce",
|
|
6
6
|
"author": "wxm",
|
|
7
7
|
"license": "MIT",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@vitejs/plugin-vue": "^6.0.7",
|
|
53
|
-
"mce": "0.
|
|
53
|
+
"mce": "0.25.0"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"mce": "^0",
|