@kiwibit/chart 15.0.0 → 16.0.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.
@@ -1,172 +1,172 @@
1
- /**
2
- * Interface to define the Chart model.
3
- *
4
- * @export
5
- * @interface Chart
6
- */
7
- export interface Chart {
8
- title: string;
9
- showLegend?: boolean;
10
- xAxisType: AxisType;
11
- xAxisName: string;
12
- xAxisUom?: string;
13
- xMin?: number;
14
- xMax?: number;
15
- yAxisType: AxisType;
16
- yAxisName: string;
17
- yAxisUom?: string;
18
- yMin?: number;
19
- yMax?: number;
20
- /**
21
- * The maximum decimals that can have the values on the x and y axes.
22
- * If omitted the default is 3 decimals.
23
- *
24
- * @type {number}
25
- * @memberof Chart
26
- */
27
- maxAxesDecimals?: number;
28
- /**
29
- * If the chart should have rendering animations.
30
- *
31
- * @type {boolean}
32
- * @memberof Chart
33
- */
34
- hasAnimations?: boolean;
35
- /**
36
- * How long the animation should last.
37
- * Expressed in milliseconds. If omitted the Default is 500 ms.
38
- *
39
- * @type {number}
40
- * @memberof Chart
41
- */
42
- animationDuration?: number;
43
- /**
44
- * The list of Shapes that the chart must render.
45
- * Each Shape corrisponds to a single chart component.
46
- *
47
- * @type {Shape[]}
48
- * @memberof Chart
49
- */
50
- shapes: Shape[];
51
- /**
52
- * Adds interaction with the chart, so that when clicking
53
- * everywhere in the chart area a point gets added and it's coordinate are
54
- * emitted with an event to the parent component.
55
- *
56
- * @type {boolean}
57
- * @memberof Chart
58
- */
59
- clickToAddPoint?: boolean;
60
- /**
61
- * Custom name for the "clickToAddPoint" event related button.
62
- *
63
- * @type {string}
64
- * @memberof Chart
65
- */
66
- addPointCustomName?: string;
67
- /**
68
- * Adds the possibility to use the scroll
69
- * to zoom in/out the chart area.
70
- *
71
- * @type {boolean}
72
- * @memberof Chart
73
- */
74
- scrollToZoom?: boolean;
75
- /**
76
- * Tells the chart to render or not the grid lines.
77
- *
78
- * @type {boolean}
79
- * @memberof Chart
80
- */
81
- showGrid?: boolean;
82
- }
83
- export declare type Shape = Trace;
84
- export interface Trace {
85
- name?: string;
86
- /**
87
- * The variant of the Shape, must be of type Trace.
88
- *
89
- * @type {ShapeVariant}
90
- * @memberof Trace
91
- */
92
- variant: ShapeVariant;
93
- color?: string;
94
- /**
95
- * The type of the Trace drawn by the chart.
96
- * Can be a line or a scatter.
97
- *
98
- * @type {TraceType}
99
- * @memberof Trace
100
- */
101
- type: TraceType;
102
- width?: number;
103
- /**
104
- * The list of points that define the Trace.
105
- *
106
- * @type {Point[]}
107
- * @memberof Trace
108
- */
109
- points: Point[];
110
- /**
111
- * Whether to show a smooth curve or a segmented curve.
112
- *
113
- * @type {boolean}
114
- * @memberof Trace
115
- */
116
- smooth?: boolean;
117
- /**
118
- * The style of the Trace.
119
- * Can be solid, dashed or dotted.
120
- *
121
- * @type {TraceStyle}
122
- * @memberof Trace
123
- */
124
- style?: TraceStyle;
125
- /**
126
- * Option to make the Trace selected/deselected by default.
127
- * A deselected Trace is obscured from the chart and can be toggled from the legend.
128
- *
129
- * @type {boolean}
130
- * @memberof Trace
131
- */
132
- selectedByDefault?: boolean;
133
- opacity?: number;
134
- }
135
- export interface Point extends BasePoint {
136
- name?: string;
137
- /**
138
- * Symbol used to represent the point in the chart.
139
- *
140
- * @type {PointSymbol}
141
- * @memberof Point
142
- */
143
- symbol?: PointSymbol;
144
- symbolSize?: number;
145
- color?: string;
146
- }
147
- export interface BasePoint {
148
- x: number;
149
- y: number;
150
- }
151
- export declare enum TraceType {
152
- LINE = "line",
153
- SCATTER = "scatter"
154
- }
155
- export declare enum PointSymbol {
156
- NONE = "none",
157
- CIRCLE = "circle",
158
- TRIANGLE = "triangle",
159
- PIN = "pin",
160
- DIAMOND = "diamond"
161
- }
162
- export declare enum TraceStyle {
163
- SOLID = "solid",
164
- DASHED = "dashed",
165
- DOTTED = "dotted"
166
- }
167
- export declare enum AxisType {
168
- VALUE = "value"
169
- }
170
- export declare enum ShapeVariant {
171
- TRACE = 0
172
- }
1
+ /**
2
+ * Interface to define the Chart model.
3
+ *
4
+ * @export
5
+ * @interface Chart
6
+ */
7
+ export interface Chart {
8
+ title: string;
9
+ showLegend?: boolean;
10
+ xAxisType: AxisType;
11
+ xAxisName: string;
12
+ xAxisUom?: string;
13
+ xMin?: number;
14
+ xMax?: number;
15
+ yAxisType: AxisType;
16
+ yAxisName: string;
17
+ yAxisUom?: string;
18
+ yMin?: number;
19
+ yMax?: number;
20
+ /**
21
+ * The maximum decimals that can have the values on the x and y axes.
22
+ * If omitted the default is 3 decimals.
23
+ *
24
+ * @type {number}
25
+ * @memberof Chart
26
+ */
27
+ maxAxesDecimals?: number;
28
+ /**
29
+ * If the chart should have rendering animations.
30
+ *
31
+ * @type {boolean}
32
+ * @memberof Chart
33
+ */
34
+ hasAnimations?: boolean;
35
+ /**
36
+ * How long the animation should last.
37
+ * Expressed in milliseconds. If omitted the Default is 500 ms.
38
+ *
39
+ * @type {number}
40
+ * @memberof Chart
41
+ */
42
+ animationDuration?: number;
43
+ /**
44
+ * The list of Shapes that the chart must render.
45
+ * Each Shape corrisponds to a single chart component.
46
+ *
47
+ * @type {Shape[]}
48
+ * @memberof Chart
49
+ */
50
+ shapes: Shape[];
51
+ /**
52
+ * Adds interaction with the chart, so that when clicking
53
+ * everywhere in the chart area a point gets added and it's coordinate are
54
+ * emitted with an event to the parent component.
55
+ *
56
+ * @type {boolean}
57
+ * @memberof Chart
58
+ */
59
+ clickToAddPoint?: boolean;
60
+ /**
61
+ * Custom name for the "clickToAddPoint" event related button.
62
+ *
63
+ * @type {string}
64
+ * @memberof Chart
65
+ */
66
+ addPointCustomName?: string;
67
+ /**
68
+ * Adds the possibility to use the scroll
69
+ * to zoom in/out the chart area.
70
+ *
71
+ * @type {boolean}
72
+ * @memberof Chart
73
+ */
74
+ scrollToZoom?: boolean;
75
+ /**
76
+ * Tells the chart to render or not the grid lines.
77
+ *
78
+ * @type {boolean}
79
+ * @memberof Chart
80
+ */
81
+ showGrid?: boolean;
82
+ }
83
+ export type Shape = Trace;
84
+ export interface Trace {
85
+ name?: string;
86
+ /**
87
+ * The variant of the Shape, must be of type Trace.
88
+ *
89
+ * @type {ShapeVariant}
90
+ * @memberof Trace
91
+ */
92
+ variant: ShapeVariant;
93
+ color?: string;
94
+ /**
95
+ * The type of the Trace drawn by the chart.
96
+ * Can be a line or a scatter.
97
+ *
98
+ * @type {TraceType}
99
+ * @memberof Trace
100
+ */
101
+ type: TraceType;
102
+ width?: number;
103
+ /**
104
+ * The list of points that define the Trace.
105
+ *
106
+ * @type {Point[]}
107
+ * @memberof Trace
108
+ */
109
+ points: Point[];
110
+ /**
111
+ * Whether to show a smooth curve or a segmented curve.
112
+ *
113
+ * @type {boolean}
114
+ * @memberof Trace
115
+ */
116
+ smooth?: boolean;
117
+ /**
118
+ * The style of the Trace.
119
+ * Can be solid, dashed or dotted.
120
+ *
121
+ * @type {TraceStyle}
122
+ * @memberof Trace
123
+ */
124
+ style?: TraceStyle;
125
+ /**
126
+ * Option to make the Trace selected/deselected by default.
127
+ * A deselected Trace is obscured from the chart and can be toggled from the legend.
128
+ *
129
+ * @type {boolean}
130
+ * @memberof Trace
131
+ */
132
+ selectedByDefault?: boolean;
133
+ opacity?: number;
134
+ }
135
+ export interface Point extends BasePoint {
136
+ name?: string;
137
+ /**
138
+ * Symbol used to represent the point in the chart.
139
+ *
140
+ * @type {PointSymbol}
141
+ * @memberof Point
142
+ */
143
+ symbol?: PointSymbol;
144
+ symbolSize?: number;
145
+ color?: string;
146
+ }
147
+ export interface BasePoint {
148
+ x: number;
149
+ y: number;
150
+ }
151
+ export declare enum TraceType {
152
+ LINE = "line",
153
+ SCATTER = "scatter"
154
+ }
155
+ export declare enum PointSymbol {
156
+ NONE = "none",
157
+ CIRCLE = "circle",
158
+ TRIANGLE = "triangle",
159
+ PIN = "pin",
160
+ DIAMOND = "diamond"
161
+ }
162
+ export declare enum TraceStyle {
163
+ SOLID = "solid",
164
+ DASHED = "dashed",
165
+ DOTTED = "dotted"
166
+ }
167
+ export declare enum AxisType {
168
+ VALUE = "value"
169
+ }
170
+ export declare enum ShapeVariant {
171
+ TRACE = 0
172
+ }
package/package.json CHANGED
@@ -1,20 +1,17 @@
1
1
  {
2
2
  "name": "@kiwibit/chart",
3
- "version": "15.0.0",
3
+ "version": "16.0.0",
4
4
  "peerDependencies": {
5
- "@angular/common": "^15.0.1",
6
- "@angular/core": "^15.0.1"
5
+ "@angular/common": "^16.2.12",
6
+ "@angular/core": "^16.2.12"
7
7
  },
8
8
  "dependencies": {
9
9
  "echarts": "^5.4.0",
10
- "ngx-echarts": "^15.0.0",
10
+ "ngx-echarts": "^16.2.0",
11
11
  "tslib": "^2.3.0"
12
12
  },
13
- "module": "fesm2015/kiwibit-chart.mjs",
14
- "es2020": "fesm2020/kiwibit-chart.mjs",
15
- "esm2020": "esm2020/kiwibit-chart.mjs",
16
- "fesm2020": "fesm2020/kiwibit-chart.mjs",
17
- "fesm2015": "fesm2015/kiwibit-chart.mjs",
13
+ "licence": "MIT",
14
+ "module": "fesm2022/kiwibit-chart.mjs",
18
15
  "typings": "index.d.ts",
19
16
  "exports": {
20
17
  "./package.json": {
@@ -22,11 +19,9 @@
22
19
  },
23
20
  ".": {
24
21
  "types": "./index.d.ts",
25
- "esm2020": "./esm2020/kiwibit-chart.mjs",
26
- "es2020": "./fesm2020/kiwibit-chart.mjs",
27
- "es2015": "./fesm2015/kiwibit-chart.mjs",
28
- "node": "./fesm2015/kiwibit-chart.mjs",
29
- "default": "./fesm2020/kiwibit-chart.mjs"
22
+ "esm2022": "./esm2022/kiwibit-chart.mjs",
23
+ "esm": "./esm2022/kiwibit-chart.mjs",
24
+ "default": "./fesm2022/kiwibit-chart.mjs"
30
25
  }
31
26
  },
32
27
  "sideEffects": false
package/public-api.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export * from './lib/chart.component';
2
- export * from './lib/chart.module';
3
- export * from './lib/models/chart.models';
4
- export * from './lib/constants/chart.constants';
1
+ export * from './lib/chart.component';
2
+ export * from './lib/chart.module';
3
+ export * from './lib/models/chart.models';
4
+ export * from './lib/constants/chart.constants';