@rm-graph/core 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +7 -5
- package/dist/index.d.ts +7 -5
- package/dist/index.js +23 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +24 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -532,19 +532,21 @@ declare function hexToRgba(hex: string, alpha?: number): string;
|
|
|
532
532
|
* @packageDocumentation
|
|
533
533
|
*/
|
|
534
534
|
|
|
535
|
-
declare const VERSION = "0.1.
|
|
535
|
+
declare const VERSION = "0.1.1";
|
|
536
536
|
|
|
537
537
|
/**
|
|
538
538
|
* Configure SciChart WebAssembly location
|
|
539
|
-
*
|
|
539
|
+
* By default, the package auto-configures to use CDN.
|
|
540
|
+
* Call this to override with custom paths.
|
|
540
541
|
*
|
|
541
542
|
* @example
|
|
542
543
|
* ```ts
|
|
543
|
-
* import { configureSciChart } from '@
|
|
544
|
+
* import { configureSciChart } from '@rm-graph/core';
|
|
544
545
|
*
|
|
546
|
+
* // Use local WASM files
|
|
545
547
|
* configureSciChart({
|
|
546
|
-
* wasmUrl: '/
|
|
547
|
-
* dataUrl: '/
|
|
548
|
+
* wasmUrl: '/scichart2d.wasm',
|
|
549
|
+
* dataUrl: '/scichart2d.data'
|
|
548
550
|
* });
|
|
549
551
|
* ```
|
|
550
552
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -532,19 +532,21 @@ declare function hexToRgba(hex: string, alpha?: number): string;
|
|
|
532
532
|
* @packageDocumentation
|
|
533
533
|
*/
|
|
534
534
|
|
|
535
|
-
declare const VERSION = "0.1.
|
|
535
|
+
declare const VERSION = "0.1.1";
|
|
536
536
|
|
|
537
537
|
/**
|
|
538
538
|
* Configure SciChart WebAssembly location
|
|
539
|
-
*
|
|
539
|
+
* By default, the package auto-configures to use CDN.
|
|
540
|
+
* Call this to override with custom paths.
|
|
540
541
|
*
|
|
541
542
|
* @example
|
|
542
543
|
* ```ts
|
|
543
|
-
* import { configureSciChart } from '@
|
|
544
|
+
* import { configureSciChart } from '@rm-graph/core';
|
|
544
545
|
*
|
|
546
|
+
* // Use local WASM files
|
|
545
547
|
* configureSciChart({
|
|
546
|
-
* wasmUrl: '/
|
|
547
|
-
* dataUrl: '/
|
|
548
|
+
* wasmUrl: '/scichart2d.wasm',
|
|
549
|
+
* dataUrl: '/scichart2d.data'
|
|
548
550
|
* });
|
|
549
551
|
* ```
|
|
550
552
|
*/
|
package/dist/index.js
CHANGED
|
@@ -1584,14 +1584,33 @@ async function createColumn3DChart(container, config) {
|
|
|
1584
1584
|
await chart.init(container);
|
|
1585
1585
|
return chart;
|
|
1586
1586
|
}
|
|
1587
|
-
var VERSION = "0.1.
|
|
1587
|
+
var VERSION = "0.1.1";
|
|
1588
|
+
var SCICHART_VERSION = "3.5.750";
|
|
1589
|
+
var DEFAULT_WASM_URL = `https://cdn.jsdelivr.net/npm/scichart@${SCICHART_VERSION}/_wasm/scichart2d.wasm`;
|
|
1590
|
+
var DEFAULT_DATA_URL = `https://cdn.jsdelivr.net/npm/scichart@${SCICHART_VERSION}/_wasm/scichart2d.data`;
|
|
1591
|
+
var isConfigured = false;
|
|
1592
|
+
function autoConfigureSciChart() {
|
|
1593
|
+
if (isConfigured) return;
|
|
1594
|
+
try {
|
|
1595
|
+
const { SciChartSurface: SciChartSurface6 } = chunkKATRK3C3_js.__require("scichart");
|
|
1596
|
+
SciChartSurface6.configure({
|
|
1597
|
+
wasmUrl: DEFAULT_WASM_URL,
|
|
1598
|
+
dataUrl: DEFAULT_DATA_URL
|
|
1599
|
+
});
|
|
1600
|
+
isConfigured = true;
|
|
1601
|
+
} catch {
|
|
1602
|
+
}
|
|
1603
|
+
}
|
|
1604
|
+
autoConfigureSciChart();
|
|
1588
1605
|
function configureSciChart(options) {
|
|
1589
|
-
|
|
1606
|
+
try {
|
|
1590
1607
|
const { SciChartSurface: SciChartSurface6 } = chunkKATRK3C3_js.__require("scichart");
|
|
1591
1608
|
SciChartSurface6.configure({
|
|
1592
|
-
wasmUrl: options.wasmUrl,
|
|
1593
|
-
dataUrl: options.dataUrl
|
|
1609
|
+
wasmUrl: options.wasmUrl || DEFAULT_WASM_URL,
|
|
1610
|
+
dataUrl: options.dataUrl || DEFAULT_DATA_URL
|
|
1594
1611
|
});
|
|
1612
|
+
isConfigured = true;
|
|
1613
|
+
} catch {
|
|
1595
1614
|
}
|
|
1596
1615
|
}
|
|
1597
1616
|
|