6
6
< meta name ="viewport " content ="width=device-width, initial-scale=1 " />
7
7
<!-- Include SciChart.js -->
8
8
< script
9
- src ="
https://cdn.jsdelivr.net/npm/[email protected] .0-beta.40 /_wasm/scichart.browser.js "
9
+ src ="
https://cdn.jsdelivr.net/npm/[email protected] .2261 /_wasm/scichart.browser.js "
10
10
crossorigin ="anonymous "
11
11
> </ script >
12
12
< title > Hello, SciChart.js world!</ title >
@@ -21,20 +21,17 @@ <h1>Hello, SciChart.js world!</h1>
21
21
async function initSciChart ( ) {
22
22
// In order to load data file from the CDN we need to set dataUrl
23
23
SciChart . SciChartSurface . configure ( {
24
- dataUrl :
"https://cdn.jsdelivr.net/npm/[email protected] .0-beta.40 /_wasm/scichart2d.data" ,
25
- wasmUrl :
"https://cdn.jsdelivr.net/npm/[email protected] .0-beta.40 /_wasm/scichart2d.wasm"
24
+ dataUrl :
"https://cdn.jsdelivr.net/npm/[email protected] .2261 /_wasm/scichart2d.data" ,
25
+ wasmUrl :
"https://cdn.jsdelivr.net/npm/[email protected] .2261 /_wasm/scichart2d.wasm"
26
26
} ) ;
27
- const {
28
- sciChartSurface,
29
- wasmContext
30
- } = await SciChart . SciChartSurface . create ( "scichart-root" ) ;
31
- const xAxis = new SciChart . NumericAxis ( wasmContext ) ;
32
- sciChartSurface . xAxes . add ( xAxis ) ;
33
-
34
- const yAxis = new SciChart . NumericAxis ( wasmContext , {
35
- growBy : new SciChart . NumberRange ( 0.05 , 0.05 )
27
+ await SciChart . chartBuilder . buildChart ( "scichart-root" , {
28
+ series : {
29
+ type : "LineSeries" , options : { stroke : "steelblue" } ,
30
+ xyData : {
31
+ xValues : [ 1 , 2 , 5 , 8 , 10 ] ,
32
+ yValues : [ 3 , 1 , 7 , 5 , 8 ]
33
+ } }
36
34
} ) ;
37
- sciChartSurface . yAxes . add ( yAxis ) ;
38
35
}
39
36
40
37
initSciChart ( ) ;
0 commit comments