@chartspire/chartspire-chart 0.5.0-alpha → 1.1.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/README.md CHANGED
@@ -1,134 +1,109 @@
1
- <div align="center">
2
-
3
- [//]: # ( <a href="https://ChartSpire.com">)
4
-
5
- [//]: # ( <img src="https://github.com/liihuu/ChartSpire/assets/10508024/c55f301a-e0a2-422c-a9d5-fd960de68ba3"/>)
6
-
7
- [//]: # ( </a>)
8
- </div>
9
- <h1 align="center">ChartSpire</h1>
10
-
11
- <p align="center">šŸ’¹šŸ“ˆ Lightweight k-line chart built with html5 canvas.</p>
12
- <div align="center">
13
-
14
- [![GitHub Workflow Status (with branch)](https://img.shields.io/github/actions/workflow/status/liihuu/ChartSpire/build.yml?logo=github)](https://github.com/liihuu/ChartSpire/actions/workflows/build.yml)
15
- [![Version](https://badgen.net/npm/v/ChartSpire)](https://www.npmjs.com/package/ChartSpire)
16
- [![Size](https://badgen.net/bundlephobia/minzip/ChartSpire@latest)](https://bundlephobia.com/result?p=ChartSpire@latest)
17
- [![npms.io (maintenance)](https://img.shields.io/npms-io/quality-score/ChartSpire)](https://www.npmjs.com/package/ChartSpire)
18
- [![Typescript](https://badgen.net/npm/types/ChartSpire)](types/index.d.ts)
19
- [![LICENSE](https://badgen.net/github/license/liihuu/ChartSpire)](LICENSE)
20
- [![Docs](https://badgen.net/badge/docs%20by/vitepress/bd34fe)](https://vitepress.dev/)
21
-
22
- </div>
23
-
24
- <div align="center">
25
-
26
- [![Issues](https://img.shields.io/static/v1?color=1f2328&logo=github&logoColor=fff&label&message=Github%20Issues)](https://github.com/liihuu/ChartSpire/issues)
27
- [![Discussions](https://img.shields.io/static/v1?color=1f2328&logo=github&logoColor=fff&label&message=Github%20Discussions)](https://github.com/liihuu/ChartSpire/discussions)
28
- [![Telegram](https://img.shields.io/static/v1?color=1296DB&logo=telegram&logoColor=fff&label&message=Telegram)](https://t.me/ChartSpire)
29
- [![Wechat](https://img.shields.io/static/v1?color=1EBE1F&logo=wechat&logoColor=fff&label&message=Wechat)](https://ChartSpire.com/en-US/guide/feedback.html)
30
- <!-- [![Discord](https://img.shields.io/static/v1?color=738BD8&logo=discord&logoColor=fff&label&message=Discord)](https://discord.gg/7YjHYgvvvZ) -->
31
- <!-- [![Twitter](https://img.shields.io/static/v1?color=1D9BF0&logo=twitter&logoColor=fff&label&message=Twitter)](https://twitter.com/ChartSpire) -->
32
-
33
-
34
- </div>
35
-
36
- <img style="margin-bottom:6px" src="https://cdn.nlark.com/yuque/0/2023/png/8403091/1684399506365-assets/web-upload/044fe897-168c-4fbb-a485-87a8ef61c04a.png" />
37
-
38
-
39
- ## ✨ Features
40
- - šŸ“¦ **Out of the box:** Simple and fast integration, basically zero cost to get started.
41
- - šŸš€ **Lightweight and smooth:** Zero dependencies, only 40k under gzip compression.
42
- - šŸ’Ŗ **Powerful functions:** Built-in multiple indicators and line drawing models.
43
- - šŸŽØ **Highly scalable:** With rich style configuration and API, the function can be extended as you like.
44
- - šŸ“± **Mobile:** Support mobile, one chart, handle multiple terminals.
45
- - šŸ›” **Typescript development:** Provide complete type definition files.
46
-
47
- ## ⚔ Performance
48
- Similar to chart libraries for performance comparison.
49
- + **Test Scenario:** 50000 pieces of data, 5 pane indicators, average 10 runs
50
- + **Device:** macOS Ventura, Apple M2 Pro, 16G
51
- + **Browser:** Chrome 114.0.5735.106
52
- + **Framework:** React@18.2.0
53
-
54
- Comparison of time consumption from initialization to full rendering:
55
-
56
- | **ChartSpire@9.4.0** | **night-vision@0.3.2** | **hqchart@1.1.12147** |
57
- | :---: | :---: | :---: |
58
- | 37ms | 36ms | 241ms |
59
-
60
-
61
- ## šŸ“¦ Install
62
- ### Using npm
63
- ```bash
64
- npm install ChartSpire --save
65
- ```
66
-
67
- ### Using yarn
68
- ```bash
69
- yarn add ChartSpire
70
- ```
71
-
72
- ### CDNs
73
- #### [unpkg](https://unpkg.com)
74
- ```html
75
- <script type="text/javascript" src="https://unpkg.com/ChartSpire/dist/ChartSpire.min.js"></script>
76
- ```
77
-
78
- #### [jsDelivr](https://cdn.jsdelivr.net)
79
- ```html
80
- <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ChartSpire/dist/ChartSpire.min.js"></script>
81
- ```
82
-
83
- ## šŸ“„ Docs
84
- ### Online
85
- [https://www.chartspire.com](https://www.chartspire.com)
86
-
87
- ### Locale
88
- Execute command in root directory. [Node.js](https://nodejs.org) is required.
89
- ```bash
90
- # Install the dependencies
91
- npm install
92
-
93
- # Start document service
94
- npm run docs:dev
95
- ```
96
- After successful startup, open in the browser http://localhost:8888 .
97
-
98
- ## šŸ› ļø Build
99
- Execute command in root directory. [Node.js](https://nodejs.org) is required.
100
- ```bash
101
- # Install the dependencies
102
- npm install
103
-
104
- # Build files
105
- npm run build
106
- ```
107
- The generated files are in the dist folder.
108
-
109
- [//]: # (## šŸ”— Links)
110
-
111
- [//]: # (+ [Online Preview]&#40;https://preview.ChartSpire.com&#41;)
112
-
113
- [//]: # (+ [ChartSpire Pro]&#40;https://pro.ChartSpire.com&#41;)
114
-
115
- [//]: # (+ [Sample Code]&#40;https://github.com/liihuu/ChartSpireample&#41;)
116
-
117
- ## Ā©ļø License
118
- This product includes software developed at KlineCharts (https://github.com/klinecharts).
119
-
120
- The original code is licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at:
121
-
122
- http://www.apache.org/licenses/LICENSE-2.0
123
-
124
- Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
125
-
126
- This version includes modifications and significant new code written by ChartSpire. These modifications and new code are licensed under the GNU Affero General Public License, Version 3 (AGPLv3). As such, all derivative work of this repository as a whole becomes subject to the AGPLv3.
127
-
128
- Under the terms of the AGPLv3, this software and any derivative works may not be made closed-source. The complete source code must be made available to users when the software is distributed or hosted as a service.
129
-
130
- A copy of the AGPLv3 license is included in the LICENSE_AGPL3 file. You may also find the license at:
131
-
132
- https://www.gnu.org/licenses/
133
-
134
- Please note that while modifications and new code fall under the AGPLv3, the original portions of the code developed by KlineCharts remain under the Apache License, Version 2.0.
1
+ <div align="center">
2
+
3
+ [//]: # ( <a href="https://ChartSpire.com">)
4
+
5
+ [//]: # ( <img src="https://github.com/liihuu/ChartSpire/assets/10508024/c55f301a-e0a2-422c-a9d5-fd960de68ba3"/>)
6
+
7
+ [//]: # ( </a>)
8
+ </div>
9
+ <h1 align="center">Chartspire chart</h1>
10
+
11
+ <p align="center">šŸ’¹šŸ“ˆ Charting library for chartspire-ui.</p>
12
+ <div align="center">
13
+ </div>
14
+
15
+ <div align="center">
16
+
17
+ [![Issues](https://img.shields.io/static/v1?color=1f2328&logo=github&logoColor=fff&label&message=Github%20Issues)](https://github.com/chartspire/chartspire-chart/issues)
18
+ [![Discussions](https://img.shields.io/static/v1?color=1f2328&logo=github&logoColor=fff&label&message=Github%20Discussions)](https://github.com/chartspire/chartspire-chart/discussions)
19
+ <!-- [![Discord](https://img.shields.io/static/v1?color=738BD8&logo=discord&logoColor=fff&label&message=Discord)](https://discord.gg/7YjHYgvvvZ) -->
20
+ <!-- [![Twitter](https://img.shields.io/static/v1?color=1D9BF0&logo=twitter&logoColor=fff&label&message=Twitter)](https://twitter.com/ChartSpire) -->
21
+
22
+
23
+ </div>
24
+
25
+ ## ✨ Features
26
+ - šŸ“¦ **Out of the box:** Simple and fast integration, basically zero cost to get started.
27
+ - šŸš€ **Lightweight and smooth:** Zero dependencies, only 40k under gzip compression.
28
+ - šŸ’Ŗ **Powerful functions:** Built-in multiple indicators and line drawing models.
29
+ - šŸŽØ **Highly scalable:** With rich style configuration and API, the function can be extended as you like.
30
+ - šŸ“± **Mobile:** Support mobile, one chart, handle multiple terminals.
31
+ - šŸ›” **Typescript development:** Provide complete type definition files.
32
+
33
+ ## ⚔ Performance
34
+ Similar to chart libraries for performance comparison.
35
+ + **Test Scenario:** 50000 pieces of data, 5 pane indicators, average 10 runs
36
+ + **Device:** macOS Ventura, Apple M2 Pro, 16G
37
+ + **Browser:** Chrome 114.0.5735.106
38
+ + **Framework:** React@18.2.0
39
+
40
+ Comparison of time consumption from initialization to full rendering:
41
+
42
+ | **ChartSpire@9.4.0** | **night-vision@0.3.2** | **hqchart@1.1.12147** |
43
+ | :---: | :---: | :---: |
44
+ | 37ms | 36ms | 241ms |
45
+
46
+
47
+ ## šŸ“¦ Install
48
+ ### Using npm
49
+ ```bash
50
+ npm i @chartspire/chartspire-chart
51
+ ```
52
+
53
+ ### Using yarn
54
+ ```bash
55
+ yarn add @chartspire/chartspire-chart
56
+ ```
57
+
58
+ ## šŸ“„ Docs
59
+ ### Online
60
+ [https://www.chartspire.com](https://www.chartspire.com)
61
+
62
+ ### Locale
63
+ Execute command in root directory. [Node.js](https://nodejs.org) is required.
64
+ ```bash
65
+ # Install the dependencies
66
+ npm install
67
+
68
+ # Start document service
69
+ npm run docs:dev
70
+ ```
71
+ After successful startup, open in the browser http://localhost:8888 .
72
+
73
+ ## šŸ› ļø Build
74
+ Execute command in root directory. [Node.js](https://nodejs.org) is required.
75
+ ```bash
76
+ # Install the dependencies
77
+ npm install
78
+
79
+ # Build files
80
+ npm run build
81
+ ```
82
+ The generated files are in the dist folder.
83
+
84
+ [//]: # (## šŸ”— Links)
85
+
86
+ [//]: # (+ [Online Preview]&#40;https://preview.ChartSpire.com&#41;)
87
+
88
+ [//]: # (+ [ChartSpire Pro]&#40;https://pro.ChartSpire.com&#41;)
89
+
90
+ [//]: # (+ [Sample Code]&#40;https://github.com/liihuu/ChartSpireample&#41;)
91
+
92
+ ## Ā©ļø License
93
+ This product includes software developed at KlineCharts (https://github.com/klinecharts).
94
+
95
+ The original code is licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at:
96
+
97
+ http://www.apache.org/licenses/LICENSE-2.0
98
+
99
+ Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
100
+
101
+ This version includes modifications and significant new code written by ChartSpire. These modifications and new code are licensed under the GNU Affero General Public License, Version 3 (AGPLv3). As such, all derivative work of this repository as a whole becomes subject to the AGPLv3.
102
+
103
+ Under the terms of the AGPLv3, this software and any derivative works may not be made closed-source. The complete source code must be made available to users when the software is distributed or hosted as a service.
104
+
105
+ A copy of the AGPLv3 license is included in the LICENSE_AGPL3 file. You may also find the license at:
106
+
107
+ https://www.gnu.org/licenses/
108
+
109
+ Please note that while modifications and new code fall under the AGPLv3, the original portions of the code developed by KlineCharts remain under the Apache License, Version 2.0.
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * KLineChart v0.5.0-Alpha
3
+ * KLineChart v1.0.0
4
4
  * Copyright (c) 2019 lihu.
5
5
  * Licensed under Apache License 2.0 https://www.apache.org/licenses/LICENSE-2.0
6
6
  */
package/dist/index.esm.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * KLineChart v0.5.0-Alpha
3
+ * KLineChart v1.0.0
4
4
  * Copyright (c) 2019 lihu.
5
5
  * Licensed under Apache License 2.0 https://www.apache.org/licenses/LICENSE-2.0
6
6
  */
@@ -18,7 +18,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
18
18
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19
19
  PERFORMANCE OF THIS SOFTWARE.
20
20
  ***************************************************************************** */
21
- /* global Reflect, Promise, SuppressedError, Symbol */
21
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
22
22
 
23
23
  var extendStatics = function(d, b) {
24
24
  extendStatics = Object.setPrototypeOf ||
@@ -57,8 +57,8 @@ function __awaiter(thisArg, _arguments, P, generator) {
57
57
  }
58
58
 
59
59
  function __generator(thisArg, body) {
60
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
61
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
60
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
61
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
62
62
  function verb(n) { return function (v) { return step([n, v]); }; }
63
63
  function step(op) {
64
64
  if (f) throw new TypeError("Generator is already executing.");
@@ -640,7 +640,7 @@ function logError(api, invalidParam, append) {
640
640
  log('%c😟 klinecharts error%c %s%s%s', 'padding:3px 4px;border-radius:2px;color:#ffffff;background-color:#F92855;', 'color:#F92855;', api, invalidParam, append );
641
641
  }
642
642
  function logTag() {
643
- log('%cā¤ļø Welcome to klinecharts. Version is 0.5.0-Alpha', 'border-radius:4px;border:dashed 1px #1677FF;line-height:70px;padding:0 20px;margin:16px 0;font-size:14px;color:#1677FF;', '', '', '', '');
643
+ log('%cā¤ļø Welcome to klinecharts. Version is 1.0.0', 'border-radius:4px;border:dashed 1px #1677FF;line-height:70px;padding:0 20px;margin:16px 0;font-size:14px;color:#1677FF;', '', '', '', '');
644
644
  }
645
645
 
646
646
  /**
@@ -15528,7 +15528,7 @@ var chartBaseId = 1;
15528
15528
  * @return {string}
15529
15529
  */
15530
15530
  function version() {
15531
- return '0.5.0-Alpha';
15531
+ return '1.0.0';
15532
15532
  }
15533
15533
  /**
15534
15534
  * Init chart instance
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * KLineChart v0.5.0-Alpha
3
+ * KLineChart v1.0.0
4
4
  * Copyright (c) 2019 lihu.
5
5
  * Licensed under Apache License 2.0 https://www.apache.org/licenses/LICENSE-2.0
6
6
  */
@@ -24,7 +24,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
24
24
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
25
25
  PERFORMANCE OF THIS SOFTWARE.
26
26
  ***************************************************************************** */
27
- /* global Reflect, Promise, SuppressedError, Symbol */
27
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
28
28
 
29
29
  var extendStatics = function(d, b) {
30
30
  extendStatics = Object.setPrototypeOf ||
@@ -63,8 +63,8 @@ function __awaiter(thisArg, _arguments, P, generator) {
63
63
  }
64
64
 
65
65
  function __generator(thisArg, body) {
66
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
67
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
66
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
67
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
68
68
  function verb(n) { return function (v) { return step([n, v]); }; }
69
69
  function step(op) {
70
70
  if (f) throw new TypeError("Generator is already executing.");
@@ -645,7 +645,7 @@ function logError(api, invalidParam, append) {
645
645
  log('%c😟 klinecharts error%c %s%s%s', 'padding:3px 4px;border-radius:2px;color:#ffffff;background-color:#F92855;', 'color:#F92855;', api, invalidParam, append );
646
646
  }
647
647
  function logTag() {
648
- log('%cā¤ļø Welcome to klinecharts. Version is 0.5.0-Alpha', 'border-radius:4px;border:dashed 1px #1677FF;line-height:70px;padding:0 20px;margin:16px 0;font-size:14px;color:#1677FF;', '', '', '', '');
648
+ log('%cā¤ļø Welcome to klinecharts. Version is 1.0.0', 'border-radius:4px;border:dashed 1px #1677FF;line-height:70px;padding:0 20px;margin:16px 0;font-size:14px;color:#1677FF;', '', '', '', '');
649
649
  }
650
650
 
651
651
  /**
@@ -15533,7 +15533,7 @@ var chartBaseId = 1;
15533
15533
  * @return {string}
15534
15534
  */
15535
15535
  function version() {
15536
- return '0.5.0-Alpha';
15536
+ return '1.0.0';
15537
15537
  }
15538
15538
  /**
15539
15539
  * Init chart instance