Skip to content

Commit c6b56b0

Browse files
author
Terho@home
committed
Update lcjs to v2.2.0. Fix issue with typings.
1 parent bc12c57 commit c6b56b0

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"webpack-dev-server": "^3.11.0"
2525
},
2626
"dependencies": {
27-
"@arction/lcjs": "^2.0.2",
28-
"@arction/xydata": "^1.2.1"
27+
"@arction/lcjs": "^2.2.0",
28+
"@arction/xydata": "^1.4.0"
2929
}
3030
}

src/app.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { lightningChart, emptyFill, DataPatterns, Point, UILayoutBuilders, UIBackgrounds, UIOrigins, UIDraggingModes, SolidFill, ColorHEX, emptyLine, UIElementBuilders, Themes } from "@arction/lcjs"
1+
import { lightningChart, emptyFill, DataPatterns, Point, UILayoutBuilders, UIBackgrounds, UIOrigins, UIDraggingModes, SolidFill, ColorHEX, emptyLine, UIElementBuilders, Themes, UIRectangle, UIElementColumn, UITextBox, UICheckBox } from "@arction/lcjs"
22
import { createProgressiveTraceGenerator } from "@arction/xydata"
33

44
// Use theme if provided
@@ -73,7 +73,7 @@ const measureRenderingSpeed = () => {
7373
}
7474

7575
// Create indicator for displaying rendering speed.
76-
const indicatorLayout = chart.addUIElement(
76+
const indicatorLayout = chart.addUIElement<UIElementColumn<UIRectangle>>(
7777
UILayoutBuilders.Column
7878
.setBackground( UIBackgrounds.Rectangle ),
7979
// Position UIElement with Axis coordinates.
@@ -96,7 +96,7 @@ repositionIndicator()
9696
axisX.onScaleChange( repositionIndicator )
9797
axisY.onScaleChange( repositionIndicator )
9898
// Rendering speed indicator.
99-
const indicatorRenderingSpeed = indicatorLayout.addElement( UIElementBuilders.TextBox )
99+
const indicatorRenderingSpeed = indicatorLayout.addElement<UITextBox<UIRectangle>>( UIElementBuilders.TextBox )
100100
.setText( 'Rendering ...' )
101101
.setFont(( font ) => font
102102
.setWeight( 'bold' )
@@ -111,7 +111,7 @@ const reRender = () => {
111111

112112
measureRenderingSpeed()
113113
}
114-
const buttonRerender = indicatorLayout.addElement( UIElementBuilders.ButtonBox )
114+
const buttonRerender = indicatorLayout.addElement<UICheckBox<UIRectangle>>( UIElementBuilders.ButtonBox )
115115
.setText( 'Render again' )
116116
.setMargin({ left: 10 })
117117
buttonRerender.onSwitch((_, state) => {

0 commit comments

Comments
 (0)