-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from ABTSoftware/dev
NestedLegend. onInit Cleanup Callback. Minor fbug-fixes
- Loading branch information
Showing
39 changed files
with
16,703 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
import { | ||
SciChartSurface, | ||
NumericAxis, | ||
SplineMountainRenderableSeries, | ||
XyDataSeries, | ||
ZoomPanModifier, | ||
MouseWheelZoomModifier, | ||
ZoomExtentsModifier, | ||
SciChartJSDarkTheme, | ||
SciChartJSLightTheme | ||
} from "scichart"; | ||
import { SciChartReact } from "scichart-react"; | ||
|
||
export const ChartWrapperStyling = () => ( | ||
<SciChartReact | ||
initChart={async rootElement => { | ||
const { sciChartSurface, wasmContext } = await SciChartSurface.create(rootElement, { | ||
disableAspect: true | ||
}); | ||
|
||
sciChartSurface.xAxes.add(new NumericAxis(wasmContext)); | ||
sciChartSurface.yAxes.add(new NumericAxis(wasmContext)); | ||
|
||
sciChartSurface.renderableSeries.add( | ||
new SplineMountainRenderableSeries(wasmContext, { | ||
dataSeries: new XyDataSeries(wasmContext, { | ||
xValues: [1, 2, 3, 4], | ||
yValues: [1, 4, 7, 3] | ||
}), | ||
fill: "#3ca832", | ||
stroke: "#eb911c", | ||
strokeThickness: 4, | ||
opacity: 0.4 | ||
}) | ||
); | ||
|
||
sciChartSurface.chartModifiers.add( | ||
new ZoomPanModifier({ enableZoom: true }), | ||
new MouseWheelZoomModifier(), | ||
new ZoomExtentsModifier() | ||
); | ||
|
||
const toggleChartTheme = () => { | ||
sciChartSurface.applyTheme( | ||
sciChartSurface.themeProvider.isLightBackground | ||
? new SciChartJSDarkTheme() | ||
: new SciChartJSLightTheme() | ||
); | ||
}; | ||
|
||
return { sciChartSurface, toggleChartTheme }; | ||
}} | ||
style={{ | ||
aspectRatio: 2, | ||
minWidth: "600px", | ||
minHeight: "300px", | ||
boxSizing: "border-box", | ||
backgroundColor: "darkslategrey", | ||
padding: 10 | ||
}} | ||
innerContainerProps={{ | ||
style: { backgroundColor: "darkgrey", boxSizing: "border-box", height: "80%", padding: 10 } | ||
}} | ||
> | ||
{/* The child components will be rendered only after the surface initialization */} | ||
<NestedComponent /> | ||
</SciChartReact> | ||
); | ||
|
||
const NestedComponent = () => { | ||
return ( | ||
<div style={{ background: "lightgrey", height: "20%", width: "100%", textAlign: "center" }}> | ||
Nested Component Content | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 SciChart's official Github repository (formerly ABT Software) | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es6": true, | ||
"node": true | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/eslint-recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:import/recommended", | ||
"plugin:import/electron", | ||
"plugin:import/typescript" | ||
], | ||
"parser": "@typescript-eslint/parser" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lerna-debug.log* | ||
|
||
# Diagnostic reports (https://nodejs.org/api/report.html) | ||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
.DS_Store | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
*.lcov | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# TypeScript v1 declaration files | ||
typings/ | ||
|
||
# TypeScript cache | ||
*.tsbuildinfo | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
.env.test | ||
|
||
# parcel-bundler cache (https://parceljs.org/) | ||
.cache | ||
|
||
# next.js build output | ||
.next | ||
|
||
# nuxt.js build output | ||
.nuxt | ||
|
||
# vuepress build output | ||
.vuepress/dist | ||
|
||
# Serverless directories | ||
.serverless/ | ||
|
||
# FuseBox cache | ||
.fusebox/ | ||
|
||
# DynamoDB Local files | ||
.dynamodb/ | ||
|
||
# Webpack | ||
.webpack/ | ||
|
||
# Vite | ||
.vite/ | ||
|
||
# Electron-Forge | ||
out/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import type { ForgeConfig } from "@electron-forge/shared-types"; | ||
import { MakerSquirrel } from "@electron-forge/maker-squirrel"; | ||
import { MakerZIP } from "@electron-forge/maker-zip"; | ||
import { MakerDeb } from "@electron-forge/maker-deb"; | ||
import { MakerRpm } from "@electron-forge/maker-rpm"; | ||
import { AutoUnpackNativesPlugin } from "@electron-forge/plugin-auto-unpack-natives"; | ||
import { WebpackPlugin } from "@electron-forge/plugin-webpack"; | ||
import { FusesPlugin } from "@electron-forge/plugin-fuses"; | ||
import { FuseV1Options, FuseVersion } from "@electron/fuses"; | ||
|
||
import { mainConfig } from "./webpack.main.config"; | ||
import { rendererConfig } from "./webpack.renderer.config"; | ||
|
||
const config: ForgeConfig = { | ||
packagerConfig: { | ||
asar: true | ||
}, | ||
rebuildConfig: {}, | ||
makers: [new MakerSquirrel({}), new MakerZIP({}, ["darwin"]), new MakerRpm({}), new MakerDeb({})], | ||
plugins: [ | ||
new AutoUnpackNativesPlugin({}), | ||
new WebpackPlugin({ | ||
mainConfig, | ||
renderer: { | ||
config: rendererConfig, | ||
entryPoints: [ | ||
{ | ||
html: "./src/index.html", | ||
js: "./src/renderer.ts", | ||
name: "main_window", | ||
preload: { | ||
js: "./src/preload.ts" | ||
} | ||
} | ||
] | ||
} | ||
}), | ||
// Fuses are used to enable/disable various Electron functionality | ||
// at package time, before code signing the application | ||
new FusesPlugin({ | ||
version: FuseVersion.V1, | ||
[FuseV1Options.RunAsNode]: false, | ||
[FuseV1Options.EnableCookieEncryption]: true, | ||
[FuseV1Options.EnableNodeOptionsEnvironmentVariable]: false, | ||
[FuseV1Options.EnableNodeCliInspectArguments]: false, | ||
[FuseV1Options.EnableEmbeddedAsarIntegrityValidation]: true, | ||
[FuseV1Options.OnlyLoadAppFromAsar]: true | ||
}) | ||
] | ||
}; | ||
|
||
export default config; |
Oops, something went wrong.