Skip to content

Commit 572ba13

Browse files
committed
chore(demo): update browser-bundle demo to use builder api
1 parent e376d45 commit 572ba13

File tree

1 file changed

+10
-13
lines changed
  • Sandbox/demo-browser-global-module/src/client

1 file changed

+10
-13
lines changed

Sandbox/demo-browser-global-module/src/client/index.html

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<meta name="viewport" content="width=device-width, initial-scale=1" />
77
<!-- Include SciChart.js -->
88
<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"
1010
crossorigin="anonymous"
1111
></script>
1212
<title>Hello, SciChart.js world!</title>
@@ -21,20 +21,17 @@ <h1>Hello, SciChart.js world!</h1>
2121
async function initSciChart() {
2222
// In order to load data file from the CDN we need to set dataUrl
2323
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"
2626
});
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+
}}
3634
});
37-
sciChartSurface.yAxes.add(yAxis);
3835
}
3936

4037
initSciChart();

0 commit comments

Comments
 (0)