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"
22import { 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()
9696axisX . onScaleChange ( repositionIndicator )
9797axisY . 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 } )
117117buttonRerender . onSwitch ( ( _ , state ) => {
0 commit comments