@@ -18,32 +18,17 @@ const {
1818 createProgressiveTraceGenerator
1919} = require ( '@arction/xydata' )
2020
21- const container = document . createElement ( 'div' )
22- container . id = 'lcjs-chart-container'
23- container . style . display = 'flex'
24- container . style . flexDirection = 'column'
25- container . style . height = '100%'
26-
27- const div1 = document . createElement ( 'div' )
28- div1 . id = 'div1'
29- div1 . style . height = '100%'
30- container . appendChild ( div1 )
31- const div2 = document . createElement ( 'div' )
32- div2 . id = 'div2'
33- div2 . style . height = '100%'
34- container . appendChild ( div2 )
35- document . body . appendChild ( container )
36-
3721const dataSpan = 60 * 60 * 1000
3822const dataFrequency = 1 * 1000
3923
4024// Decide on an origin for DateTime axis.
4125const dateOrigin = new Date ( 2018 , 0 , 1 )
4226// Create charts and series for two different packing resolutions.
43- const lc = lightningChart ( )
44- const chartDefault = lc . ChartXY ( {
45- container : 'div1' ,
46- // theme: Themes.dark
27+ const dashboard = lightningChart ( ) . Dashboard ( { numberOfColumns : 1 , numberOfRows : 2 } )
28+ const chartDefault = dashboard . createChartXY ( {
29+ columnIndex : 0 ,
30+ rowIndex : 0 ,
31+ // theme: Themes.darkGold
4732} )
4833// Use DateTime TickStrategy with custom origin date.
4934chartDefault
@@ -68,9 +53,10 @@ chartDefault.setPadding({
6853chartDefault . getDefaultAxisY ( )
6954 . setTitle ( 'USD' )
7055
71- const chartLow = lc . ChartXY ( {
72- container : div2 ,
73- // theme: Themes.dark
56+ const chartLow = dashboard . createChartXY ( {
57+ columnIndex : 0 ,
58+ rowIndex : 1 ,
59+ // theme: Themes.darkGold
7460} )
7561// Use DateTime TickStrategy with custom origin date.
7662chartLow
0 commit comments