Skip to content

Commit 53b2afb

Browse files
author
Niilo Keinänen
committed
LCJS v8.0.0
1 parent 981aca9 commit 53b2afb

File tree

3 files changed

+11
-24
lines changed

3 files changed

+11
-24
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,10 @@ Direct developer email support can be purchased through a [Support Plan][4] or b
9999
© LightningChart Ltd 2009-2022. All rights reserved.
100100

101101

102-
[XY cartesian chart]: https://lightningchart.com/js-charts/api-documentation/v7.1.0/classes/ChartXY.html
103-
[Area series]: https://lightningchart.com/js-charts/api-documentation/v7.1.0/classes/ChartXY.html#addAreaSeries
104-
[Area type]: https://lightningchart.com/js-charts/api-documentation/v7.1.0/AreaSeriesTypes.html
105-
[Positive Area series]: https://lightningchart.com/js-charts/api-documentation/v7.1.0/classes/AreaSeriesPositive.html
106-
[Negative Area series]: https://lightningchart.com/js-charts/api-documentation/v7.1.0/classes/AreaSeriesNegative.html
107-
[Color palettes]: https://lightningchart.com/js-charts/api-documentation/v7.1.0/variables/ColorPalettes.html
102+
[XY cartesian chart]: https://lightningchart.com/js-charts/api-documentation/v8.0.0/classes/ChartXY.html
103+
[Area series]: https://lightningchart.com/js-charts/api-documentation/v8.0.0/classes/ChartXY.html#addAreaSeries
104+
[Area type]: https://lightningchart.com/js-charts/api-documentation/v8.0.0/AreaSeriesTypes.html
105+
[Positive Area series]: https://lightningchart.com/js-charts/api-documentation/v8.0.0/classes/AreaSeriesPositive.html
106+
[Negative Area series]: https://lightningchart.com/js-charts/api-documentation/v8.0.0/classes/AreaSeriesNegative.html
107+
[Color palettes]: https://lightningchart.com/js-charts/api-documentation/v8.0.0/variables/ColorPalettes.html
108108

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
"webpack-stream": "^7.0.0"
1818
},
1919
"dependencies": {
20-
"@lightningchart/lcjs": "^7.1.0",
21-
"@lightningchart/xydata": "^1.4.0"
20+
"@lightningchart/lcjs": "^8.0.0",
21+
"@lightningchart/xydata": "^1.5.0"
2222
},
2323
"lightningChart": {
2424
"eID": "0101"

src/index.js

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
const lcjs = require('@lightningchart/lcjs')
99

1010
// Extract required parts from LightningChartJS.
11-
const { lightningChart, AreaSeriesTypes, UIElementBuilders, LegendBoxBuilders, PointShape, Themes } = lcjs
11+
const { lightningChart, AreaSeriesTypes, UIElementBuilders, PointShape, Themes } = lcjs
1212

1313
// Create a XY Chart.
1414
const xyChart = lightningChart({
@@ -19,15 +19,6 @@ const xyChart = lightningChart({
1919
})
2020
.setTitle('Expected Profits To Expenses')
2121

22-
// Create a LegendBox as part of the chart.
23-
const legend = xyChart
24-
.addLegendBox(LegendBoxBuilders.HorizontalLegendBox)
25-
// Dispose example UI elements automatically if they take too much space. This is to avoid bad UI on mobile / etc. devices.
26-
.setAutoDispose({
27-
type: 'max-width',
28-
maxWidth: 0.8,
29-
})
30-
3122
// ---- Add multiple Area series with different baselines and direction. ----
3223
const areaProfit = xyChart.addAreaSeries({ type: AreaSeriesTypes.Positive }).setName('Profits')
3324

@@ -146,12 +137,8 @@ const expensesData = [
146137

147138
// ---- Generate points using 'xydata'-library and add it to every plot. ----
148139
profitData.forEach((point) => {
149-
areaProfit.add(point)
140+
areaProfit.appendSample(point)
150141
})
151142
expensesData.forEach((point) => {
152-
areaExpense.add(point)
143+
areaExpense.appendSample(point)
153144
})
154-
155-
// Add series to LegendBox and style entries.
156-
legend.add(areaProfit, true, 'Expected Profits To Expenses', UIElementBuilders.CheckBox.setButtonShape(PointShape.Circle))
157-
legend.add(areaExpense, true, 'Expected Profits To Expenses', UIElementBuilders.CheckBox.setButtonShape(PointShape.Circle))

0 commit comments

Comments
 (0)