] (nonce only in round-trip mode)
```
--------------------------------
### Build and Run Main App in Production Mode
Source: https://github.com/abtsoftware/scichart.js.examples/blob/master/ProfilingTestSetup/Readme.md
Builds the production bundle and serves it. This is for deploying or testing the optimized application.
```bash
npm run build
npm start
```
--------------------------------
### Error Bars Chart Example (TypeScript)
Source: https://github.com/abtsoftware/scichart.js.examples/blob/master/Sandbox/DocumentationSnippets/RenderableSeriesAPI/TextSeries/Readme.md
This code sample demonstrates how to create an Error Bars Chart using SciChart.js. Ensure you have the necessary dependencies installed and the development server running.
```typescript
import * as SciChart from "../";
import { SciChartSurface } from "../";
import { NumericAxis } from "../";
import { FastLineRenderableSeries } from "../";
import { XyDataSeries } from "../";
import { EllipsePointMarker } from "../";
import { EPointShape } from "../";
import { EAxisAlignment } from "../";
import { ESeriesType } from "../";
import { EStrokeAnimation } from "../";
import { EAnimationType } from "../";
// SCICHART_MODULES_IMPORT_START
// SCICHART_MODULES_IMPORT_END
const divElementId = "scichart-root";
const drawExample = async () => {
// Create a SciChartSurface
const sciChartSurface = await SciChart.SciChartSurface.create(divElementId, {
// Add the SciChartOverview control
overview: SciChart.SciChartOverview,
});
// Create an X,Y axis and renderable series
const xAxis = new SciChart.NumericAxis(sciChartSurface.webAssemblyContext2D, {
axisTitle: "X Axis Title",
axisAlignment: EAxisAlignment.Bottom,
});
const yAxis = new SciChart.NumericAxis(sciChartSurface.webAssemblyContext2D, {
axisTitle: "Y Axis Title",
axisAlignment: EAxisAlignment.Left,
});
sciChartSurface.xAxes.add(xAxis);
sciChartSurface.yAxes.add(yAxis);
// Create a data series with error bars
const dataSeries = new SciChart.XyDataSeries(sciChartSurface.webAssemblyContext2D);
dataSeries.append(0, 5, 0.5, 0.5); // x, y, yError, xError
dataSeries.append(1, 7, 0.8, 0.3);
dataSeries.append(2, 6, 0.6, 0.4);
dataSeries.append(3, 8, 0.9, 0.2);
dataSeries.append(4, 7, 0.7, 0.5);
dataSeries.append(5, 9, 1.0, 0.3);
dataSeries.append(6, 8, 0.8, 0.4);
dataSeries.append(7, 10, 1.1, 0.2);
dataSeries.append(8, 9, 0.9, 0.5);
dataSeries.append(9, 11, 1.2, 0.3);
// Add a line series with error bars
const lineSeries = sciChartSurface.renderableSeries.add(new SciChart.FastLineRenderableSeries(sciChartSurface.webAssemblyContext2D, {
dataSeries: dataSeries,
stroke: "#FF6600",
strokeThickness: 2,
// Add error bars
errorBarWidth: 10,
errorBarColor: "#FF6600",
errorBarThickness: 2,
errorBarStrokeStyle: "#FF6600",
errorBarType: ESeriesType.ErrorBarSeries,
// Add point markers
pointMarker: new EllipsePointMarker(sciChartSurface.webAssemblyContext2D, {
width: 7,
height: 7,
fillStyle: "#FF6600",
strokeStyle: "#FF6600",
shape: EPointShape.Ellipse,
}),
animation:
new SciChart.MoveAnimation(sciChartSurface.webAssemblyContext2D, {
duration: 500,
easing: EAnimationType.OutQuad,
}),
}));
};
drawExample();
```
--------------------------------
### Create React Component with SciChartReact
Source: https://github.com/abtsoftware/scichart.js.examples/blob/master/BoilerPlates/tauri-vite-react/README.md
Integrate SciChart.js into a React component using the SciChartReact component and passing the chart configuration. This example shows basic setup and comments for licensing and Wasm CDN loading.
```javascript
function App() {
// LICENSING
// Commercial licenses set your license code here
// Purchased license keys can be viewed at https://www.scichart.com/profile
// How-to steps at https://www.scichart.com/licensing-scichart-js/
// SciChartSurface.setRuntimeLicenseKey("YOUR_RUNTIME_KEY");
// to use WebAssembly files from CDN instead of the same origin
// SciChartSurface.loadWasmFromCDN();
// Note: for both licensing and WASM configurations - make sure they are set on the client side.
return (
SciChart with React + Vite
);
}
```
--------------------------------
### Install Tauri CLI
Source: https://github.com/abtsoftware/scichart.js.examples/blob/master/AdvancedLicensing/tauri-simple-server-licensing/README.md
Installs the Tauri CLI version 2. Ensure you have Rust installed.
```bash
cargo install tauri-cli --version "^2" --locked
```
--------------------------------
### 2D Chart Tutorials Setup
Source: https://github.com/abtsoftware/scichart.js.examples/blob/master/LLMs.txt
Sequential tutorials for setting up 2D charts with SciChart.js, covering project setup, adding series and data, zoom/pan, real-time updates, annotations, tooltips, legends, multiple axes, linking charts, and vertical charts.
--------------------------------
### Run Development Server
Source: https://github.com/abtsoftware/scichart.js.examples/blob/master/BoilerPlates/next/README.md
Compiles the project and starts a hot-reloading development server.
```bash
npm run dev
```
--------------------------------
### Preview Production Build Locally
Source: https://github.com/abtsoftware/scichart.js.examples/blob/master/Sandbox/demo-nuxtjs/README.md
After building the application for production, use this command to preview the built application locally. This helps in testing the production environment before deployment.
```bash
npm run preview
```
--------------------------------
### Install SciChart.js and scichart-react
Source: https://github.com/abtsoftware/scichart.js.examples/blob/master/BoilerPlates/react-vite/README.md
Install the necessary SciChart.js packages for your React application. It's recommended to install both `scichart` and `scichart-react` for seamless integration.
```bash
npm install scichart
// we also strongly suggest to install scichart-react for easier integration
npm install scichart-react
```