Skip to content

Commit 880acc0

Browse files
committed
LCJS 4.0.1
1 parent ccd84ee commit 880acc0

11 files changed

+144
-121
lines changed

.github/workflows/gh-pages-deploy.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,28 @@ name: Webpack build to GitHub Pages
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches: [master]
66

77
jobs:
88
build:
99
runs-on: ubuntu-latest
1010

1111
steps:
12-
- uses: actions/checkout@v2
12+
- uses: actions/checkout@v2
1313

14-
- name: Use Node.js 16.x
15-
uses: actions/setup-node@v1
16-
with:
17-
node-version: '16.x'
14+
- name: Use Node.js 16.x
15+
uses: actions/setup-node@v1
16+
with:
17+
node-version: "16.x"
1818

19-
- name: Build
20-
run: |
21-
npm install
22-
npm run build
19+
- name: Build
20+
run: |
21+
npm install
22+
npm run build
2323
24-
- name: Deploy
25-
uses: peaceiris/actions-gh-pages@v3
26-
with:
27-
github_token: ${{ secrets.GITHUB_TOKEN }}
28-
publish_dir: ./dist
29-
publish_branch: gh-pages
24+
- name: Deploy
25+
uses: peaceiris/actions-gh-pages@v3
26+
with:
27+
github_token: ${{ secrets.GITHUB_TOKEN }}
28+
publish_dir: ./dist
29+
publish_branch: gh-pages

1mPointsLineTrace-cyberSpace.png

438 KB
Loading

1mPointsLineTrace-darkGold.png

256 KB
Loading

1mPointsLineTrace-light.png

139 KB
Loading

1mPointsLineTrace-lightNature.png

140 KB
Loading
464 KB
Loading

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 LightningChart Ltd.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
# 1 Million Points JavaScript Line Chart
22

3-
![1 Million Points JavaScript Line Chart](1mPointsLineTrace.png)
3+
![1 Million Points JavaScript Line Chart](1mPointsLineTrace-darkGold.png)
44

55
This demo application belongs to the set of examples for LightningChart JS, data visualization library for JavaScript.
66

77
LightningChart JS is entirely GPU accelerated and performance optimized charting library for presenting massive amounts of data. It offers an easy way of creating sophisticated and interactive charts and adding them to your website or web application.
88

99
The demo can be used as an example or a seed project. Local execution requires the following steps:
1010

11-
- Make sure that relevant version of [Node.js](https://nodejs.org/en/download/) is installed
12-
- Open the project folder in a terminal:
11+
- Make sure that relevant version of [Node.js](https://nodejs.org/en/download/) is installed
12+
- Open the project folder in a terminal:
1313

14-
npm install # fetches dependencies
15-
npm start # builds an application and starts the development server
14+
npm install # fetches dependencies
15+
npm start # builds an application and starts the development server
1616

17-
- The application is available at *http://localhost:8080* in your browser, webpack-dev-server provides hot reload functionality.
17+
- The application is available at _http://localhost:8080_ in your browser, webpack-dev-server provides hot reload functionality.
1818

1919

2020
## Description
@@ -24,13 +24,13 @@ This example plots a million data points in an instant using line series.
2424
## Progressive data optimizations
2525

2626
By default, `LineSeries` can take list of XY coordinates in any order, connecting them with a line stroke.
27-
However, in a lot of applications, the input data comes in a distinct order, for example, X coordinates describe a timestamp which increases between each consecutive data point. We refer to this as a *progressive data pattern*.
27+
However, in a lot of applications, the input data comes in a distinct order, for example, X coordinates describe a timestamp which increases between each consecutive data point. We refer to this as a _progressive data pattern_.
2828

29-
`LineSeries` is coupled together with highly sophisticated optimizations that can be enabled in applications where input data follows a *data pattern*. This example showcases the `'ProgressiveX'` *pattern*.
29+
`LineSeries` is coupled together with highly sophisticated optimizations that can be enabled in applications where input data follows a _data pattern_. This example showcases the `'ProgressiveX'` _pattern_.
3030

3131
### Enabling data pattern optimizations
3232

33-
*Data pattern* must be specified when the *series* is created:
33+
_Data pattern_ must be specified when the _series_ is created:
3434

3535
```typescript
3636
// Create LineSeries with 'ProgressiveX' data pattern.
@@ -40,33 +40,33 @@ const series = ChartXY.addLineSeries({
4040
pattern: 'ProgressiveX',
4141
// regularProgressiveStep: true => The X step between each consecutive data point is regular (for example, always `1.0`).
4242
regularProgressiveStep: true,
43-
}
44-
})
43+
},
44+
})
4545
```
4646

47-
Available *data patterns* are:
48-
- `'ProgressiveX'`: Each consecutive data point has increased X coordinate.
49-
- `'ProgressiveY'`: Each consecutive data point has increased Y coordinate.
50-
- `'RegressiveX'`: Each consecutive data point has decreased X coordinate.
51-
- `'RegressiveX'`: Each consecutive data point has decreased Y coordinate.
47+
Available _data patterns_ are:
48+
49+
- `'ProgressiveX'`: Each consecutive data point has increased X coordinate.
50+
- `'ProgressiveY'`: Each consecutive data point has increased Y coordinate.
51+
- `'RegressiveX'`: Each consecutive data point has decreased X coordinate.
52+
- `'RegressiveX'`: Each consecutive data point has decreased Y coordinate.
5253

5354
The pattern of data can be identified even further with the optional `regularProgressiveStep` property.
54-
This can be enabled when the *progressive step* (for example, `'ProgressiveX'` -> X step) between each data point is regular, leading to even more significant optimizations.
55+
This can be enabled when the _progressive step_ (for example, `'ProgressiveX'` -> X step) between each data point is regular, leading to even more significant optimizations.
5556

5657
### Side-effects and good to know
5758

58-
When a series is configured with a *data pattern*, the rendering process makes logical deductions and ssumptions on the user input data, according to the *data pattern* specification. **If the supplied input data does not follow the specification, rendering errors or even crashes can occur.** If you run into strange issues, first see if disabling the *data pattern* helps, or if your input data is somehow invalid.
59-
59+
When a series is configured with a _data pattern_, the rendering process makes logical deductions and ssumptions on the user input data, according to the _data pattern_ specification. **If the supplied input data does not follow the specification, rendering errors or even crashes can occur.** If you run into strange issues, first see if disabling the _data pattern_ helps, or if your input data is somehow invalid.
6060

6161
## Automatic Axis scrolling
6262

63-
The scrolling of data in progressive series can also be automated and optimized by specifying ***ScrollStrategy*** for both x-axis & y-axis to perform the scrolling efficiently.
63+
The scrolling of data in progressive series can also be automated and optimized by specifying **_ScrollStrategy_** for both x-axis & y-axis to perform the scrolling efficiently.
6464

65-
- Select ***AxisScrollStrategies.expansion***. Automatically increases a scale if some points are out of scale. Retains progressivity/regressivity of used scale.
66-
- Select ***AxisScrollStrategies.fitting***. Automatically increases a scale if some points are out of scale and reduces it if there is too much empty space. Retains progressivity/regressivity of used scale.
67-
- Select ***AxisScrollStrategies.progressive***. Automatically scrolls a scale in a positive direction.
68-
- Select ***AxisScrollStrategies.regressive***. Automatically scrolls a scale to a negative direction.
69-
- Pass ***undefined*** to disable automatic scrolling. Scale can then be manually set using *setInterval* method of ***Axis***
65+
- Select **_AxisScrollStrategies.expansion_**. Automatically increases a scale if some points are out of scale. Retains progressivity/regressivity of used scale.
66+
- Select **_AxisScrollStrategies.fitting_**. Automatically increases a scale if some points are out of scale and reduces it if there is too much empty space. Retains progressivity/regressivity of used scale.
67+
- Select **_AxisScrollStrategies.progressive_**. Automatically scrolls a scale in a positive direction.
68+
- Select **_AxisScrollStrategies.regressive_**. Automatically scrolls a scale to a negative direction.
69+
- Pass **_undefined_** to disable automatic scrolling. Scale can then be manually set using _setInterval_ method of **_Axis_**
7070

7171

7272
## API Links
@@ -82,26 +82,26 @@ The scrolling of data in progressive series can also be automated and optimized
8282

8383
If you notice an error in the example code, please open an issue on [GitHub][0] repository of the entire example.
8484

85-
Official [API documentation][1] can be found on [Arction][2] website.
85+
Official [API documentation][1] can be found on [LightningChart][2] website.
8686

8787
If the docs and other materials do not solve your problem as well as implementation help is needed, ask on [StackOverflow][3] (tagged lightningchart).
8888

89-
If you think you found a bug in the LightningChart JavaScript library, please contact support@arction.com.
89+
If you think you found a bug in the LightningChart JavaScript library, please contact support@lightningchart.com.
9090

91-
Direct developer email support can be purchased through a [Support Plan][4] or by contacting sales@arction.com.
91+
Direct developer email support can be purchased through a [Support Plan][4] or by contacting sales@lightningchart.com.
9292

9393
[0]: https://github.com/Arction/
94-
[1]: https://www.arction.com/lightningchart-js-api-documentation/
95-
[2]: https://www.arction.com
94+
[1]: https://lightningchart.com/lightningchart-js-api-documentation/
95+
[2]: https://lightningchart.com
9696
[3]: https://stackoverflow.com/questions/tagged/lightningchart
97-
[4]: https://www.arction.com/support-services/
97+
[4]: https://lightningchart.com/support-services/
9898

99-
© Arction Ltd 2009-2020. All rights reserved.
99+
© LightningChart Ltd 2009-2022. All rights reserved.
100100

101101

102-
[XY cartesian chart]: https://www.arction.com/lightningchart-js-api-documentation/v3.4.0/classes/chartxy.html
103-
[Scroll strategies]: https://www.arction.com/lightningchart-js-api-documentation/v3.4.0/globals.html#axisscrollstrategies
104-
[Line series]: https://www.arction.com/lightningchart-js-api-documentation/v3.4.0/classes/lineseries.html
105-
[Data patterns]: https://www.arction.com/lightningchart-js-api-documentation/v3.4.0/interfaces/datapattern.html
102+
[XY cartesian chart]: https://lightningchart.com/lightningchart-js-api-documentation/v4.0.0/classes/ChartXY.html
103+
[Scroll strategies]: https://lightningchart.com/lightningchart-js-api-documentation/v4.0.0/variables/AxisScrollStrategies.html
104+
[Line series]: https://lightningchart.com/lightningchart-js-api-documentation/v4.0.0/classes/LineSeries.html
105+
[Data patterns]: https://lightningchart.com/lightningchart-js-api-documentation/v4.0.0/interfaces/DataPattern.html
106106
[Progressive trace data generator]: https://arction.github.io/xydata/classes/progressivetracegenerator.html
107107

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"build": "webpack --mode production",
55
"start": "webpack serve"
66
},
7-
"license": "Custom",
7+
"license": "MIT",
88
"private": true,
99
"main": "./src/index.js",
1010
"devDependencies": {
@@ -17,7 +17,7 @@
1717
"webpack-stream": "^7.0.0"
1818
},
1919
"dependencies": {
20-
"@arction/lcjs": "^3.4.0",
20+
"@arction/lcjs": "^4.0.1",
2121
"@arction/xydata": "^1.4.0"
2222
},
2323
"lightningChart": {

src/index.js

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,14 @@
44
// Import LightningChartJS
55
const lcjs = require('@arction/lcjs')
66

7+
// Import xydata
8+
const xydata = require('@arction/xydata')
9+
710
// Extract required parts from LightningChartJS.
8-
const {
9-
lightningChart,
10-
Themes
11-
} = lcjs
11+
const { lightningChart, Themes } = lcjs
1212

1313
// Import data-generator from 'xydata'-library.
14-
const {
15-
createProgressiveTraceGenerator
16-
} = require('@arction/xydata')
14+
const { createProgressiveTraceGenerator } = xydata
1715

1816
// Create a XY Chart.
1917
const chart = lightningChart().ChartXY({
@@ -27,16 +25,16 @@ const series = chart.addLineSeries({
2725
pattern: 'ProgressiveX',
2826
// regularProgressiveStep: true => The X step between each consecutive data point is regular (for example, always `1.0`).
2927
regularProgressiveStep: true,
30-
}
31-
})
28+
},
29+
})
3230

3331
// Generate traced points stream using 'xydata'-library.
3432
chart.setTitle('Generating test data...')
3533
createProgressiveTraceGenerator()
3634
.setNumberOfPoints(1 * 1000 * 1000)
3735
.generate()
3836
.toPromise()
39-
.then(data => {
37+
.then((data) => {
4038
chart.setTitle('1 Million Points Line Trace')
4139
const dataLen = data.length
4240
let dataPointsCount = 0

0 commit comments

Comments
 (0)