scichart 3.2.0-beta → 3.2.442
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/Builder/buildSurface.d.ts +2 -2
- package/Builder/chartBuilder.d.ts +4 -4
- package/Charting/ChartModifiers/ChartModifierBase.d.ts +5 -5
- package/Charting/ChartModifiers/ChartModifierBase.js +2 -3
- package/Charting/ChartModifiers/CursorModifier.d.ts +9 -9
- package/Charting/ChartModifiers/CursorModifier.js +1 -1
- package/Charting/ChartModifiers/DataPointSelectionModifier.d.ts +1 -0
- package/Charting/ChartModifiers/DataPointSelectionModifier.js +6 -1
- package/Charting/ChartModifiers/LegendModifier.d.ts +9 -24
- package/Charting/ChartModifiers/LegendModifier.js +9 -21
- package/Charting/ChartModifiers/MouseWheelZoomModifier.js +20 -11
- package/Charting/ChartModifiers/OverviewRangeSelectionModifier.d.ts +5 -5
- package/Charting/ChartModifiers/PinchZoomModifier.js +9 -9
- package/Charting/ChartModifiers/RubberBandXyZoomModifier.d.ts +4 -7
- package/Charting/ChartModifiers/RubberBandXyZoomModifier.js +6 -8
- package/Charting/ChartModifiers/SeriesSelectionModifier.js +10 -8
- package/Charting/ChartModifiers/XAxisDragModifier.d.ts +1 -1
- package/Charting/ChartModifiers/XAxisDragModifier.js +3 -3
- package/Charting/ChartModifiers/YAxisDragModifier.d.ts +2 -4
- package/Charting/ChartModifiers/YAxisDragModifier.js +7 -8
- package/Charting/Drawing/BaseCache.js +13 -8
- package/Charting/Model/BaseDataSeries.d.ts +2 -2
- package/Charting/Model/Filters/HlcFilterBase.d.ts +6 -2
- package/Charting/Model/Filters/HlcFilterBase.js +17 -1
- package/Charting/Model/Filters/IFilterBase.d.ts +24 -0
- package/Charting/Model/Filters/IFilterBase.js +2 -0
- package/Charting/Model/Filters/OhlcFilterBase.d.ts +6 -2
- package/Charting/Model/Filters/OhlcFilterBase.js +17 -1
- package/Charting/Model/Filters/XyFilterBase.d.ts +6 -5
- package/Charting/Model/Filters/XyFilterBase.js +17 -1
- package/Charting/Model/Filters/XyyFilterBase.d.ts +6 -2
- package/Charting/Model/Filters/XyyFilterBase.js +17 -1
- package/Charting/Model/Filters/XyzFilterBase.d.ts +6 -2
- package/Charting/Model/Filters/XyzFilterBase.js +17 -1
- package/Charting/Model/XyyDataSeries.js +15 -16
- package/Charting/Visuals/Annotations/CursorTooltipSvgAnnotation.js +0 -4
- package/Charting/Visuals/Annotations/NativeTextAnnotation.js +4 -0
- package/Charting/Visuals/Axis/AxisBase2D.d.ts +3 -3
- package/Charting/Visuals/Axis/AxisCore.d.ts +2 -2
- package/Charting/Visuals/Axis/DeltaCalculator/DateTimeDeltaCalculator.js +15 -1
- package/Charting/Visuals/Legend/ManualLegend.d.ts +57 -0
- package/Charting/Visuals/Legend/ManualLegend.js +150 -0
- package/Charting/Visuals/Legend/SciChartLegend.js +4 -3
- package/Charting/Visuals/Legend/SciChartLegendBase.d.ts +62 -3
- package/Charting/Visuals/Legend/SciChartLegendBase.js +70 -11
- package/Charting/Visuals/PointMarkers/BasePointMarker.js +13 -8
- package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.js +3 -3
- package/Charting/Visuals/RenderableSeries/BaseStackedCollection.js +8 -3
- package/Charting/Visuals/RenderableSeries/DrawingProviders/BandSeriesDrawingProvider.js +6 -10
- package/Charting/Visuals/RenderableSeries/DrawingProviders/BaseSeriesDrawingProvider.d.ts +14 -3
- package/Charting/Visuals/RenderableSeries/DrawingProviders/BaseSeriesDrawingProvider.js +34 -10
- package/Charting/Visuals/RenderableSeries/DrawingProviders/BubbleSeriesDrawingProvider.js +3 -8
- package/Charting/Visuals/RenderableSeries/DrawingProviders/ColumnSeriesDrawingProvider.js +5 -10
- package/Charting/Visuals/RenderableSeries/DrawingProviders/LineSeriesDrawingProvider.js +5 -10
- package/Charting/Visuals/RenderableSeries/DrawingProviders/MountainSeriesDrawingProvider.js +5 -9
- package/Charting/Visuals/RenderableSeries/DrawingProviders/OhlcSeriesDrawingProvider.js +3 -8
- package/Charting/Visuals/RenderableSeries/DrawingProviders/PointMarkerDrawingProvider.js +5 -9
- package/Charting/Visuals/RenderableSeries/HoveredChangedArgs.d.ts +6 -1
- package/Charting/Visuals/RenderableSeries/HoveredChangedArgs.js +2 -1
- package/Charting/Visuals/RenderableSeries/IRenderableSeries.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/SelectionChangedArgs.d.ts +6 -1
- package/Charting/Visuals/RenderableSeries/SelectionChangedArgs.js +2 -1
- package/Charting/Visuals/RenderableSeries/SplineBandRenderableSeries.js +43 -1
- package/Charting/Visuals/RenderableSeries/SplineLineRenderableSeries.js +6 -1
- package/Charting/Visuals/RenderableSeries/SplineMountainRenderableSeries.js +6 -1
- package/Charting/Visuals/RubberBandSvgRect/RubberBandSvgRect.d.ts +4 -0
- package/Charting/Visuals/RubberBandSvgRect/RubberBandSvgRect.js +8 -2
- package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.d.ts +6 -0
- package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.js +7 -0
- package/Charting/Visuals/SciChartSurface.d.ts +0 -5
- package/Charting/Visuals/SciChartSurface.js +11 -12
- package/Charting/Visuals/SciChartSurfaceBase.d.ts +19 -1
- package/Charting/Visuals/SciChartSurfaceBase.js +45 -23
- package/Charting/Visuals/createMaster.d.ts +3 -0
- package/Charting/Visuals/createMaster.js +54 -23
- package/Charting/Visuals/createSingle.js +2 -2
- package/Charting/Visuals/licenseManager2D.js +9 -4
- package/Charting3D/ChartModifiers/ResetCamera3DModifier.d.ts +1 -1
- package/Charting3D/ChartModifiers/ResetCamera3DModifier.js +1 -2
- package/Charting3D/ChartModifiers/TooltipModifier3D.d.ts +35 -0
- package/Charting3D/ChartModifiers/TooltipModifier3D.js +41 -5
- package/Charting3D/Model/DataSeries/BaseGridDataSeries3D.d.ts +1 -1
- package/Charting3D/Model/DataSeries/BaseGridDataSeries3D.js +2 -2
- package/Charting3D/Model/DataSeries/IPointMetadata3D.d.ts +7 -2
- package/Charting3D/Visuals/Axis/AxisBase3D.d.ts +8 -1
- package/Charting3D/Visuals/Axis/AxisBase3D.js +0 -2
- package/Charting3D/Visuals/Axis/NumericAxis3D.d.ts +3 -2
- package/Charting3D/Visuals/Axis/NumericAxis3D.js +7 -3
- package/Charting3D/Visuals/Primitives/PointLine3DSceneEntity.js +4 -2
- package/Charting3D/Visuals/Primitives/ScatterPointsSceneEntity.js +5 -2
- package/Charting3D/Visuals/Primitives/SurfaceMeshSceneEntity.js +2 -1
- package/Charting3D/Visuals/RenderableSeries/BaseRenderableSeries3D.d.ts +5 -0
- package/Charting3D/Visuals/RenderableSeries/BaseRenderableSeries3D.js +19 -5
- package/Charting3D/Visuals/SciChart3DRenderer.d.ts +0 -1
- package/Charting3D/Visuals/SciChart3DRenderer.js +3 -26
- package/Charting3D/Visuals/SciChart3DSurface.d.ts +12 -5
- package/Charting3D/Visuals/SciChart3DSurface.js +35 -6
- package/Charting3D/Visuals/createMaster3d.js +9 -4
- package/Core/BuildStamp.d.ts +1 -1
- package/Core/BuildStamp.js +2 -2
- package/Core/DeletableEntity.d.ts +11 -5
- package/Core/DeletableEntity.js +42 -45
- package/Core/Mouse/MouseManager.js +6 -0
- package/Core/OneTimePerformanceWarning.d.ts +1 -1
- package/Core/OneTimePerformanceWarning.js +2 -1
- package/_wasm/scichart.browser.js +1 -1
- package/_wasm/scichart2d.js +1 -1
- package/_wasm/scichart2d.wasm +0 -0
- package/_wasm/scichart3d.js +1 -1
- package/_wasm/scichart3d.wasm +0 -0
- package/constants/performanceWarnings.d.ts +1 -0
- package/constants/performanceWarnings.js +2 -1
- package/index.d.ts +5 -6
- package/index.dev.js +68886 -0
- package/index.js +13 -21
- package/index.min.js +1 -1
- package/package.json +1 -1
- package/utils/MemoryUsageHelper.d.ts +55 -8
- package/utils/MemoryUsageHelper.js +64 -14
- package/utils/colorUtil.d.ts +7 -0
- package/utils/colorUtil.js +13 -1
- package/utils/parseColor.js +19 -4
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import { TLabelProviderDefinition } from "../../../Builder/buildAxis";
|
|
1
2
|
import { IThemeable } from "../../../Charting/Themes/IThemeable";
|
|
2
3
|
import { IThemeProvider } from "../../../Charting/Themes/IThemeProvider";
|
|
3
4
|
import { AxisCore } from "../../../Charting/Visuals/Axis/AxisCore";
|
|
4
5
|
import { IAxisCoreOptions } from "../../../Charting/Visuals/Axis/IAxisCoreOptions";
|
|
6
|
+
import { ILabelOptions } from "../../../Charting/Visuals/Axis/LabelProvider/LabelProvider";
|
|
7
|
+
import { LabelProviderBase2D } from "../../../Charting/Visuals/Axis/LabelProvider/LabelProviderBase2D";
|
|
5
8
|
import { NumberRange } from "../../../Core/NumberRange";
|
|
6
9
|
import { ObservableArray } from "../../../Core/ObservableArray";
|
|
7
10
|
import { TSciChart3D } from "../../../types/TSciChart3D";
|
|
@@ -14,7 +17,7 @@ import { IAxisDescriptor } from "./IAxisDescriptor";
|
|
|
14
17
|
/**
|
|
15
18
|
* Optional parameters passed to {@link AxisBase3D} constructor to set defaults at construction time
|
|
16
19
|
*/
|
|
17
|
-
export interface IAxisBase3dOptions extends IAxisCoreOptions {
|
|
20
|
+
export interface IAxisBase3dOptions extends IAxisCoreOptions, ILabelOptions {
|
|
18
21
|
/**
|
|
19
22
|
* Gets or sets tick labels offset from the axis plane
|
|
20
23
|
*/
|
|
@@ -35,6 +38,10 @@ export interface IAxisBase3dOptions extends IAxisCoreOptions {
|
|
|
35
38
|
* Sets the plane background color as an HTML Color string
|
|
36
39
|
*/
|
|
37
40
|
planeBackgroundFill?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Sets a {@link LabelProvider} - a class which is responsible for formatting axis labels and cursor labels from numeric values
|
|
43
|
+
*/
|
|
44
|
+
labelProvider?: LabelProviderBase2D | TLabelProviderDefinition;
|
|
38
45
|
}
|
|
39
46
|
/**
|
|
40
47
|
* Which axis - used for calculations
|
|
@@ -69,7 +69,6 @@ var AxisBase3D = /** @class */ (function (_super) {
|
|
|
69
69
|
_this.planeBorderThicknessProperty = (_d = options === null || options === void 0 ? void 0 : options.planeBorderThickness) !== null && _d !== void 0 ? _d : 2;
|
|
70
70
|
_this.axisPlaneBackgroundFillProperty = (_e = options === null || options === void 0 ? void 0 : options.planeBackgroundFill) !== null && _e !== void 0 ? _e : _this.axisPlaneBackgroundFillProperty;
|
|
71
71
|
return _this;
|
|
72
|
-
//console.log(`ctor planeBorderColorProperty: ${this.planeBorderColorProperty}`);
|
|
73
72
|
}
|
|
74
73
|
/**
|
|
75
74
|
* @inheritDoc
|
|
@@ -104,7 +103,6 @@ var AxisBase3D = /** @class */ (function (_super) {
|
|
|
104
103
|
if (this.axisPlaneBackgroundFill === previousThemeProvider.axisPlaneBackgroundFill) {
|
|
105
104
|
this.axisPlaneBackgroundFill = themeProvider.axisPlaneBackgroundFill;
|
|
106
105
|
}
|
|
107
|
-
//console.log(`applyTheme planeBorderColorProperty: ${this.planeBorderColorProperty}`);
|
|
108
106
|
};
|
|
109
107
|
Object.defineProperty(AxisBase3D.prototype, "isYAxis", {
|
|
110
108
|
/**
|
|
@@ -2,11 +2,12 @@ import { CoordinateCalculatorBase } from "../../../Charting/Numerics/CoordinateC
|
|
|
2
2
|
import { TEasingFn } from "../../../Core/Animations/EasingFunctions";
|
|
3
3
|
import { NumberRange } from "../../../Core/NumberRange";
|
|
4
4
|
import { EAxisType } from "../../../types/AxisType";
|
|
5
|
-
import { ENumericFormat } from "../../../types/NumericFormat";
|
|
6
5
|
import { TSciChart3D } from "../../../types/TSciChart3D";
|
|
7
6
|
import { AxisBase3D, IAxisBase3dOptions } from "./AxisBase3D";
|
|
8
7
|
interface INumericAxis3dOptions extends IAxisBase3dOptions {
|
|
9
|
-
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated use labelPrecision instead
|
|
10
|
+
*/
|
|
10
11
|
precision?: number;
|
|
11
12
|
}
|
|
12
13
|
/**
|
|
@@ -44,7 +44,7 @@ var NumericAxis3D = /** @class */ (function (_super) {
|
|
|
44
44
|
*/
|
|
45
45
|
function NumericAxis3D(webAssemblyContext, options) {
|
|
46
46
|
var _this = this;
|
|
47
|
-
var _a
|
|
47
|
+
var _a;
|
|
48
48
|
_this = _super.call(this, webAssemblyContext, options) || this;
|
|
49
49
|
/**
|
|
50
50
|
* @inheritDoc
|
|
@@ -53,8 +53,12 @@ var NumericAxis3D = /** @class */ (function (_super) {
|
|
|
53
53
|
_this.tickProvider = new NumericTickProvider_1.NumericTickProvider(_this.webAssemblyContext3D);
|
|
54
54
|
_this.labelProvider = new NumericLabelProvider_1.NumericLabelProvider();
|
|
55
55
|
_this.deltaCalculator = new NumericDeltaCalculator_1.NumericDeltaCalculator(_this.webAssemblyContext3D);
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
// Workaround for deprecated property
|
|
57
|
+
if (options === null || options === void 0 ? void 0 : options.precision) {
|
|
58
|
+
options.labelPrecision = options.precision;
|
|
59
|
+
}
|
|
60
|
+
_this.labelProvider =
|
|
61
|
+
(_a = options === null || options === void 0 ? void 0 : options.labelProvider) !== null && _a !== void 0 ? _a : new NumericLabelProvider_1.NumericLabelProvider(options);
|
|
58
62
|
return _this;
|
|
59
63
|
}
|
|
60
64
|
/**
|
|
@@ -164,10 +164,12 @@ var PointLine3DSceneEntity = /** @class */ (function (_super) {
|
|
|
164
164
|
// metadata will always be non-null but individual metadata items may be undefined
|
|
165
165
|
// as its implemented as a non-sparse array
|
|
166
166
|
metadata.forEach(function (meta, index) {
|
|
167
|
+
var _a;
|
|
167
168
|
if (meta) {
|
|
168
|
-
|
|
169
|
+
var vertexColor = (_a = meta.vertexColorAbgr) !== null && _a !== void 0 ? _a : meta.vertexColor;
|
|
170
|
+
if (vertexColor) {
|
|
169
171
|
hasDefaultColors = false;
|
|
170
|
-
_this.pointColors.set(index,
|
|
172
|
+
_this.pointColors.set(index, vertexColor);
|
|
171
173
|
}
|
|
172
174
|
if (meta.pointScale) {
|
|
173
175
|
hasDefaultScales = false;
|
|
@@ -157,9 +157,12 @@ var ScatterPointsSceneEntity = /** @class */ (function (_super) {
|
|
|
157
157
|
// metadata will always be non-null but individual metadata items may be undefined
|
|
158
158
|
// as its implemented as a non-sparse array
|
|
159
159
|
metadata.forEach(function (meta, index) {
|
|
160
|
+
var _a;
|
|
160
161
|
if (meta) {
|
|
161
|
-
|
|
162
|
-
|
|
162
|
+
// [SCJS-1566] Renamed vertexColorAbgr to vertexColor. Preserved backward compatibility
|
|
163
|
+
var vertexColor = (_a = meta.vertexColorAbgr) !== null && _a !== void 0 ? _a : meta.vertexColor;
|
|
164
|
+
if (vertexColor) {
|
|
165
|
+
_this.pointColors.set(index, vertexColor);
|
|
163
166
|
}
|
|
164
167
|
if (meta.pointScale) {
|
|
165
168
|
_this.pointScales.set(index, meta.pointScale);
|
|
@@ -300,7 +300,8 @@ var SurfaceMeshSceneEntity = /** @class */ (function (_super) {
|
|
|
300
300
|
var gridWidth = gridDataSeries.xSize;
|
|
301
301
|
var gridHeight = gridDataSeries.zSize;
|
|
302
302
|
Guard_1.Guard.notNull(this.currentRenderPassData, "SurfaceMeshSceneEntity.currentRenderPassData");
|
|
303
|
-
|
|
303
|
+
// SCJS-1562 2 DAYS to find the source of the crash! Don't recreate every frame.
|
|
304
|
+
if (this.state.isColorMapTextureInvalid) {
|
|
304
305
|
this.colorMapTexture = (0, Deleter_1.deleteSafe)(this.colorMapTexture);
|
|
305
306
|
this.colorMapTexture = (_a = this.parentSeries.meshColorPalette) === null || _a === void 0 ? void 0 : _a.getTexture(this.parentSeries.colorMapTextureSize);
|
|
306
307
|
}
|
|
@@ -215,6 +215,11 @@ export declare abstract class BaseRenderableSeries3D extends DeletableEntity imp
|
|
|
215
215
|
onDpiChanged(args: TDpiChangedEventArgs): void;
|
|
216
216
|
/** @inheritDoc */
|
|
217
217
|
hitTest(screenPoint: Point): SeriesInfo3D;
|
|
218
|
+
/**
|
|
219
|
+
* Is being called when the data for the underlying DataSeries changes
|
|
220
|
+
* @protected
|
|
221
|
+
*/
|
|
222
|
+
protected dataSeriesDataChanged(): void;
|
|
218
223
|
protected enrichHitTest(hitTestInfo: HitTestInfo3D): SeriesInfo3D;
|
|
219
224
|
/**
|
|
220
225
|
* Used internally - sets the {@link IRenderableSeriesSceneEntity | 3D Scene Entity}
|
|
@@ -49,16 +49,17 @@ var BaseRenderableSeries3D = /** @class */ (function (_super) {
|
|
|
49
49
|
_this = _super.call(this) || this;
|
|
50
50
|
_this.id = (_a = options === null || options === void 0 ? void 0 : options.id) !== null && _a !== void 0 ? _a : (0, guid_1.generateGuid)();
|
|
51
51
|
_this.webAssemblyContext = webAssemblyContext;
|
|
52
|
-
_this.
|
|
52
|
+
_this.dataSeriesDataChanged = _this.dataSeriesDataChanged.bind(_this);
|
|
53
|
+
_this.pointMarkerPropertyChanged = _this.pointMarkerPropertyChanged.bind(_this);
|
|
54
|
+
_this.onDpiChanged = _this.onDpiChanged.bind(_this);
|
|
55
|
+
_this.hitTest = _this.hitTest.bind(_this);
|
|
56
|
+
_this.enrichHitTest = _this.enrichHitTest.bind(_this);
|
|
57
|
+
_this.dataSeries = (options === null || options === void 0 ? void 0 : options.dataSeries) || undefined;
|
|
53
58
|
_this.isVisibleProperty = (options === null || options === void 0 ? void 0 : options.isVisible) !== undefined ? options === null || options === void 0 ? void 0 : options.isVisible : true;
|
|
54
59
|
_this.pointMarkerProperty = (options === null || options === void 0 ? void 0 : options.pointMarker) || undefined;
|
|
55
60
|
_this.strokeProperty = (options === null || options === void 0 ? void 0 : options.stroke) || "#FFFFFF";
|
|
56
61
|
_this.shininessProperty = (options === null || options === void 0 ? void 0 : options.shininess) === undefined ? 64 : options.shininess;
|
|
57
62
|
_this.opacityProperty = (_b = options === null || options === void 0 ? void 0 : options.opacity) !== null && _b !== void 0 ? _b : 1;
|
|
58
|
-
_this.pointMarkerPropertyChanged = _this.pointMarkerPropertyChanged.bind(_this);
|
|
59
|
-
_this.onDpiChanged = _this.onDpiChanged.bind(_this);
|
|
60
|
-
_this.hitTest = _this.hitTest.bind(_this);
|
|
61
|
-
_this.enrichHitTest = _this.enrichHitTest.bind(_this);
|
|
62
63
|
return _this;
|
|
63
64
|
}
|
|
64
65
|
/** @inheritDoc */
|
|
@@ -132,7 +133,11 @@ var BaseRenderableSeries3D = /** @class */ (function (_super) {
|
|
|
132
133
|
},
|
|
133
134
|
/** @inheritDoc */
|
|
134
135
|
set: function (dataSeries) {
|
|
136
|
+
var _a, _b;
|
|
135
137
|
this.dataSeriesProperty = dataSeries;
|
|
138
|
+
(_a = this.dataSeriesProperty) === null || _a === void 0 ? void 0 : _a.dataChanged.unsubscribe(this.dataSeriesDataChanged);
|
|
139
|
+
this.dataSeriesProperty = dataSeries;
|
|
140
|
+
(_b = this.dataSeriesProperty) === null || _b === void 0 ? void 0 : _b.dataChanged.subscribe(this.dataSeriesDataChanged);
|
|
136
141
|
this.notifyPropertyChanged(Constants_1.PROPERTY.DATA_SERIES);
|
|
137
142
|
},
|
|
138
143
|
enumerable: false,
|
|
@@ -216,6 +221,15 @@ var BaseRenderableSeries3D = /** @class */ (function (_super) {
|
|
|
216
221
|
}
|
|
217
222
|
return SeriesInfo3D_1.SeriesInfo3D.empty();
|
|
218
223
|
};
|
|
224
|
+
/**
|
|
225
|
+
* Is being called when the data for the underlying DataSeries changes
|
|
226
|
+
* @protected
|
|
227
|
+
*/
|
|
228
|
+
BaseRenderableSeries3D.prototype.dataSeriesDataChanged = function () {
|
|
229
|
+
if (this.invalidateParentCallback) {
|
|
230
|
+
this.invalidateParentCallback();
|
|
231
|
+
}
|
|
232
|
+
};
|
|
219
233
|
BaseRenderableSeries3D.prototype.enrichHitTest = function (hitTestInfo) {
|
|
220
234
|
var _a;
|
|
221
235
|
var hitDataSeries = (_a = hitTestInfo.associatedSeries) === null || _a === void 0 ? void 0 : _a.dataSeries;
|
|
@@ -11,7 +11,6 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.SciChart3DRenderer = void 0;
|
|
13
13
|
var IAnnotation_1 = require("../../Charting/Visuals/Annotations/IAnnotation");
|
|
14
|
-
var DpiHelper_1 = require("../../Charting/Visuals/TextureManager/DpiHelper");
|
|
15
14
|
var Deleter_1 = require("../../Core/Deleter");
|
|
16
15
|
var Guard_1 = require("../../Core/Guard");
|
|
17
16
|
var Rect_1 = require("../../Core/Rect");
|
|
@@ -84,12 +83,15 @@ var SciChart3DRenderer = /** @class */ (function () {
|
|
|
84
83
|
if (!this.isSurfaceValid(this.scs)) {
|
|
85
84
|
throw Error("SciChart3DSurface is not valid");
|
|
86
85
|
}
|
|
86
|
+
// Enable/disable hit test as required.
|
|
87
|
+
this.scs.webAssemblyContext3D.SCRTSetIsSelectionBufferEnabled(this.scs.isHitTestEnabled);
|
|
87
88
|
// Step 1: Update the current active SceneWorld and camera
|
|
88
89
|
var sceneWorld = this.scs.getSceneWorld();
|
|
89
90
|
if (!sceneWorld) {
|
|
90
91
|
console.warn("SciChart3DRenderer: Undefined scene world!");
|
|
91
92
|
return;
|
|
92
93
|
}
|
|
94
|
+
this.scs.preRender.raiseEvent();
|
|
93
95
|
this.wasmContext.SCRTSetActiveWorld(sceneWorld);
|
|
94
96
|
this.updateWorldDimensions(sceneWorld, this.scs.worldDimensions);
|
|
95
97
|
var tsrCamera = sceneWorld.GetMainCamera();
|
|
@@ -98,7 +100,6 @@ var SciChart3DRenderer = /** @class */ (function () {
|
|
|
98
100
|
var _a = this.scs.viewportManager, width = _a.width, height = _a.height;
|
|
99
101
|
var viewRect = new Rect_1.Rect(0, 0, width, height);
|
|
100
102
|
this.scs.setSeriesViewRect(viewRect);
|
|
101
|
-
this.updateSvgCanvasSize(viewRect);
|
|
102
103
|
// Animation Step
|
|
103
104
|
var timeElapsed = this.previousTime ? Date.now() - this.previousTime : undefined;
|
|
104
105
|
this.previousTime = Date.now();
|
|
@@ -130,30 +131,6 @@ var SciChart3DRenderer = /** @class */ (function () {
|
|
|
130
131
|
setTimeout(this.scs.invalidateElement, 0);
|
|
131
132
|
}
|
|
132
133
|
};
|
|
133
|
-
SciChart3DRenderer.prototype.updateSvgCanvasSize = function (seriesViewRect) {
|
|
134
|
-
// Convert seriesViewRect back to device pixels
|
|
135
|
-
// e.g. at Retina display canvas size may be 400x300 but seriesViewRect size would be 800x600
|
|
136
|
-
var viewRectInDevicePixels = new Rect_1.Rect(seriesViewRect.x / DpiHelper_1.DpiHelper.PIXEL_RATIO, seriesViewRect.y / DpiHelper_1.DpiHelper.PIXEL_RATIO, seriesViewRect.width / DpiHelper_1.DpiHelper.PIXEL_RATIO, seriesViewRect.height / DpiHelper_1.DpiHelper.PIXEL_RATIO);
|
|
137
|
-
if (!this.prevRect) {
|
|
138
|
-
this.prevRect = viewRectInDevicePixels;
|
|
139
|
-
}
|
|
140
|
-
else if (Rect_1.Rect.isEqual(this.prevRect, viewRectInDevicePixels)) {
|
|
141
|
-
return;
|
|
142
|
-
}
|
|
143
|
-
var svgRootElement = this.scs.domSvgContainer;
|
|
144
|
-
if (svgRootElement) {
|
|
145
|
-
svgRootElement.style.marginLeft = "".concat(viewRectInDevicePixels.x, "px");
|
|
146
|
-
svgRootElement.style.marginTop = "".concat(viewRectInDevicePixels.y, "px");
|
|
147
|
-
// Set width, height
|
|
148
|
-
svgRootElement.setAttribute("width", viewRectInDevicePixels.width.toString());
|
|
149
|
-
svgRootElement.setAttribute("height", viewRectInDevicePixels.height.toString());
|
|
150
|
-
// Set display width, height
|
|
151
|
-
svgRootElement.style.width = viewRectInDevicePixels.width + "px";
|
|
152
|
-
svgRootElement.style.height = viewRectInDevicePixels.height + "px";
|
|
153
|
-
// Set scaling so annotations, tooltips etc are in right position after DPI Scaling
|
|
154
|
-
svgRootElement.currentScale = 1;
|
|
155
|
-
}
|
|
156
|
-
};
|
|
157
134
|
SciChart3DRenderer.prototype.updateWatermark = function () {
|
|
158
135
|
var chartHeight = this.scs.getMainCanvas().clientHeight;
|
|
159
136
|
var chartWidth = this.scs.getMainCanvas().clientWidth;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { IChartModifierBase } from "../../Charting/ChartModifiers/ChartModifierBase";
|
|
2
2
|
import { IThemeProvider } from "../../Charting/Themes/IThemeProvider";
|
|
3
|
-
import { I2DSurfaceOptions } from "../../Charting/Visuals/I2DSurfaceOptions";
|
|
4
3
|
import { ESurfaceType, SciChartSurfaceBase, TSciChartConfig } from "../../Charting/Visuals/SciChartSurfaceBase";
|
|
5
4
|
import { TDpiChangedEventArgs } from "../../Charting/Visuals/TextureManager/DpiHelper";
|
|
6
5
|
import { IGenericAnimation } from "../../Core/Animations/GenericAnimation";
|
|
@@ -17,6 +16,8 @@ import { IRenderableSeries3D } from "./RenderableSeries/BaseRenderableSeries3D";
|
|
|
17
16
|
import { RootSceneEntity } from "./RootSceneEntity";
|
|
18
17
|
import { ViewportManager3DBase } from "./ViewportManager3DBase";
|
|
19
18
|
import { EWatermarkPosition } from "../../types/WatermarkPosition";
|
|
19
|
+
import { EventHandler } from "../../Core/EventHandler";
|
|
20
|
+
import { Thickness } from "../../Core/Thickness";
|
|
20
21
|
export declare type TSciChart3D = TWasmContext;
|
|
21
22
|
export declare type TWebAssemblyChart3D = {
|
|
22
23
|
wasmContext: TSciChart3D;
|
|
@@ -62,9 +63,9 @@ export declare class SciChart3DSurface extends SciChartSurfaceBase {
|
|
|
62
63
|
/**
|
|
63
64
|
* USED INTERNALLY - performs a similar operation to {@link SciChart3DSurface.create} but used internally for testing
|
|
64
65
|
* @param divElement The Div Element ID or reference where the {@link SciChartSurface} will reside
|
|
65
|
-
* @param options Optional parameters of type {@link
|
|
66
|
+
* @param options Optional parameters of type {@link I3DSurfaceOptions}
|
|
66
67
|
*/
|
|
67
|
-
static createSingle(divElement: string | HTMLDivElement, options?:
|
|
68
|
+
static createSingle(divElement: string | HTMLDivElement, options?: I3DSurfaceOptions): Promise<TWebAssemblyChart3D>;
|
|
68
69
|
/**
|
|
69
70
|
* Allows setting of web URL for Wasm and Data files, in the case you are loading SciChart outside of npm/webpack environment.
|
|
70
71
|
* Note if loading from CDN the version number of data/wasm Urls must match the version number of SciChart.js you are using.
|
|
@@ -87,9 +88,9 @@ export declare class SciChart3DSurface extends SciChartSurfaceBase {
|
|
|
87
88
|
* Creates a {@link SciChart3DSurface} and {@link TSciChart3D | WebAssembly Context} to occupy the div by element ID in your DOM.
|
|
88
89
|
* @remarks This method is async and must be awaited
|
|
89
90
|
* @param divElementId The ID or reference of Div Element where the {@link SciChart3DSurface} will reside
|
|
90
|
-
* @param options Optional parameters of type {@link
|
|
91
|
+
* @param options Optional parameters of type {@link I3DSurfaceOptions}
|
|
91
92
|
*/
|
|
92
|
-
static create(divElementId: string | HTMLDivElement, options?:
|
|
93
|
+
static create(divElementId: string | HTMLDivElement, options?: I3DSurfaceOptions): Promise<TWebAssemblyChart3D>;
|
|
93
94
|
static disposeSharedWasmContext(): void;
|
|
94
95
|
/**
|
|
95
96
|
* @summary Gets the collection of {@link IRenderableSeries3D} - the chart types or seres on this {@link SciChart3DSurface}
|
|
@@ -127,6 +128,11 @@ export declare class SciChart3DSurface extends SciChartSurfaceBase {
|
|
|
127
128
|
readonly webAssemblyContext3D: TSciChart3D;
|
|
128
129
|
/** The position of the watermark for trials and community licenses */
|
|
129
130
|
watermarkPosition: EWatermarkPosition;
|
|
131
|
+
/**
|
|
132
|
+
* An event handler which notifies its subscribers when a render operation starts. Use this
|
|
133
|
+
* to update elements of the chart for the current render. Any updates made here will not trigger a subsequent render.
|
|
134
|
+
*/
|
|
135
|
+
preRender: EventHandler<void>;
|
|
130
136
|
protected animationList: IGenericAnimation[];
|
|
131
137
|
private xAxisProperty;
|
|
132
138
|
private yAxisProperty;
|
|
@@ -326,6 +332,7 @@ export declare class SciChart3DSurface extends SciChartSurfaceBase {
|
|
|
326
332
|
* @inheritDoc
|
|
327
333
|
*/
|
|
328
334
|
updateWatermark(left: number, bottom: number): void;
|
|
335
|
+
getSeriesViewRectPadding(scaled: boolean): Thickness;
|
|
329
336
|
protected applyOptions(options: I3DSurfaceOptions): void;
|
|
330
337
|
/**
|
|
331
338
|
* @inheritDoc
|
|
@@ -37,6 +37,8 @@ var SciChartDefaults_1 = require("../../Charting/Visuals/SciChartDefaults");
|
|
|
37
37
|
var WebGlHelper_1 = require("../../Core/WebGlHelper");
|
|
38
38
|
var Globals_1 = require("../../Core/Globals");
|
|
39
39
|
var createMaster_1 = require("../../Charting/Visuals/createMaster");
|
|
40
|
+
var EventHandler_1 = require("../../Core/EventHandler");
|
|
41
|
+
var Thickness_1 = require("../../Core/Thickness");
|
|
40
42
|
exports.sciChartConfig3D = {};
|
|
41
43
|
/**
|
|
42
44
|
* @summary The {@link SciChart3DSurface} is the root 3D Chart control in SciChart's High Performance Real-time
|
|
@@ -68,6 +70,11 @@ var SciChart3DSurface = /** @class */ (function (_super) {
|
|
|
68
70
|
_this = _super.call(this, webAssemblyContext, options === null || options === void 0 ? void 0 : options.canvases) || this;
|
|
69
71
|
/** The position of the watermark for trials and community licenses */
|
|
70
72
|
_this.watermarkPosition = SciChartDefaults_1.SciChartDefaults.watermarkPosition;
|
|
73
|
+
/**
|
|
74
|
+
* An event handler which notifies its subscribers when a render operation starts. Use this
|
|
75
|
+
* to update elements of the chart for the current render. Any updates made here will not trigger a subsequent render.
|
|
76
|
+
*/
|
|
77
|
+
_this.preRender = new EventHandler_1.EventHandler();
|
|
71
78
|
_this.animationList = [];
|
|
72
79
|
_this.isAxisCubeRenderedProperty = false;
|
|
73
80
|
_this.isHitTestEnabledProperty = false;
|
|
@@ -123,7 +130,7 @@ var SciChart3DSurface = /** @class */ (function (_super) {
|
|
|
123
130
|
/**
|
|
124
131
|
* USED INTERNALLY - performs a similar operation to {@link SciChart3DSurface.create} but used internally for testing
|
|
125
132
|
* @param divElement The Div Element ID or reference where the {@link SciChartSurface} will reside
|
|
126
|
-
* @param options Optional parameters of type {@link
|
|
133
|
+
* @param options Optional parameters of type {@link I3DSurfaceOptions}
|
|
127
134
|
*/
|
|
128
135
|
SciChart3DSurface.createSingle = function (divElement, options) {
|
|
129
136
|
return (0, createSingle3d_1.createSingle3dInternal)(divElement, options).then(function (result) {
|
|
@@ -160,7 +167,7 @@ var SciChart3DSurface = /** @class */ (function (_super) {
|
|
|
160
167
|
* Creates a {@link SciChart3DSurface} and {@link TSciChart3D | WebAssembly Context} to occupy the div by element ID in your DOM.
|
|
161
168
|
* @remarks This method is async and must be awaited
|
|
162
169
|
* @param divElementId The ID or reference of Div Element where the {@link SciChart3DSurface} will reside
|
|
163
|
-
* @param options Optional parameters of type {@link
|
|
170
|
+
* @param options Optional parameters of type {@link I3DSurfaceOptions}
|
|
164
171
|
*/
|
|
165
172
|
SciChart3DSurface.create = function (divElementId, options) {
|
|
166
173
|
return (0, createMaster3d_1.createMultichart3d)(divElementId, options).then(function (result) {
|
|
@@ -390,7 +397,6 @@ var SciChart3DSurface = /** @class */ (function (_super) {
|
|
|
390
397
|
set: function (isEnabled) {
|
|
391
398
|
if (isEnabled !== this.isHitTestEnabledProperty) {
|
|
392
399
|
this.isHitTestEnabledProperty = isEnabled;
|
|
393
|
-
this.webAssemblyContext3D.SCRTSetIsSelectionBufferEnabled(isEnabled);
|
|
394
400
|
this.invalidateElement();
|
|
395
401
|
}
|
|
396
402
|
},
|
|
@@ -456,7 +462,10 @@ var SciChart3DSurface = /** @class */ (function (_super) {
|
|
|
456
462
|
* Called after the {@link SciChart3DSurface} has rendered.
|
|
457
463
|
*/
|
|
458
464
|
SciChart3DSurface.prototype.onSciChartRendered = function () {
|
|
459
|
-
|
|
465
|
+
this.chartModifiers.asArray().forEach(function (cm) {
|
|
466
|
+
cm.onParentSurfaceRendered();
|
|
467
|
+
});
|
|
468
|
+
this.rendered.raiseEvent();
|
|
460
469
|
};
|
|
461
470
|
/**
|
|
462
471
|
* Called internally - the main drawing loop
|
|
@@ -480,10 +489,12 @@ var SciChart3DSurface = /** @class */ (function (_super) {
|
|
|
480
489
|
* @inheritDoc
|
|
481
490
|
*/
|
|
482
491
|
SciChart3DSurface.prototype.changeViewportSize = function (pixelWidth, pixelHeight) {
|
|
483
|
-
if (!pixelWidth || !pixelHeight) {
|
|
492
|
+
if (!pixelWidth || !pixelHeight || this.isDeleted) {
|
|
484
493
|
return;
|
|
485
494
|
}
|
|
486
|
-
|
|
495
|
+
var backBufferWidth = pixelWidth * DpiHelper_1.DpiHelper.PIXEL_RATIO;
|
|
496
|
+
var backBufferHeight = pixelHeight * DpiHelper_1.DpiHelper.PIXEL_RATIO;
|
|
497
|
+
this.viewportManager.setSize(backBufferWidth, backBufferHeight);
|
|
487
498
|
if (this.isCopyCanvasSurface) {
|
|
488
499
|
this.changeMasterCanvasViewportSize(this.webAssemblyContext3D, pixelWidth, pixelHeight);
|
|
489
500
|
if (this.domCanvas2D) {
|
|
@@ -493,6 +504,21 @@ var SciChart3DSurface = /** @class */ (function (_super) {
|
|
|
493
504
|
else {
|
|
494
505
|
this.changeWebGLCanvasViewportSize(this.webAssemblyContext3D, pixelWidth, pixelHeight);
|
|
495
506
|
}
|
|
507
|
+
var svgRootElement = this.domSvgContainer;
|
|
508
|
+
if (svgRootElement) {
|
|
509
|
+
// Set width, height
|
|
510
|
+
svgRootElement.setAttribute("width", pixelWidth.toString());
|
|
511
|
+
svgRootElement.setAttribute("height", pixelHeight.toString());
|
|
512
|
+
// Set display width, height
|
|
513
|
+
svgRootElement.style.width = pixelWidth + "px";
|
|
514
|
+
svgRootElement.style.height = pixelHeight + "px";
|
|
515
|
+
// Set scaling so annotations, tooltips etc are in right position after DPI Scaling
|
|
516
|
+
svgRootElement.currentScale = 1;
|
|
517
|
+
}
|
|
518
|
+
if (this.domSvgAdornerLayer) {
|
|
519
|
+
this.domSvgAdornerLayer.setAttribute("width", pixelWidth.toString());
|
|
520
|
+
this.domSvgAdornerLayer.setAttribute("height", pixelHeight.toString());
|
|
521
|
+
}
|
|
496
522
|
this.invalidateElement();
|
|
497
523
|
};
|
|
498
524
|
/**
|
|
@@ -577,6 +603,9 @@ var SciChart3DSurface = /** @class */ (function (_super) {
|
|
|
577
603
|
this.webAssemblyContext3D.SCRT3DSetWaterMarkProperties(this.watermarkProperties);
|
|
578
604
|
}
|
|
579
605
|
};
|
|
606
|
+
SciChart3DSurface.prototype.getSeriesViewRectPadding = function (scaled) {
|
|
607
|
+
return Thickness_1.Thickness.fromNumber(0);
|
|
608
|
+
};
|
|
580
609
|
SciChart3DSurface.prototype.applyOptions = function (options) {
|
|
581
610
|
_super.prototype.applyOptions.call(this, options);
|
|
582
611
|
this.camera = new CameraController_1.CameraController(this.webAssemblyContext3D, options === null || options === void 0 ? void 0 : options.cameraOptions);
|
|
@@ -198,12 +198,17 @@ var createMaster = function () {
|
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
200
|
else {
|
|
201
|
-
|
|
202
|
-
if (
|
|
203
|
-
|
|
204
|
-
|
|
201
|
+
try {
|
|
202
|
+
if (process.env.NODE_ENV !== "production") {
|
|
203
|
+
if (MemoryUsageHelper_1.MemoryUsageHelper.isMemoryUsageDebugEnabled &&
|
|
204
|
+
sciChart3DSurface.otherSurfaces.length === 0) {
|
|
205
|
+
console.warn("SciChart3DSurface.autoDisposeWasmContext is disabled, thus wasmContext should be disposed explicitly using \"SciChartSurface.disposeSharedWasmContext()\".");
|
|
206
|
+
}
|
|
205
207
|
}
|
|
206
208
|
}
|
|
209
|
+
catch (err) {
|
|
210
|
+
console.warn(err);
|
|
211
|
+
}
|
|
207
212
|
}
|
|
208
213
|
}
|
|
209
214
|
});
|
package/Core/BuildStamp.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { TSciChart } from "../types/TSciChart";
|
|
2
2
|
import { TSciChart3D } from "../types/TSciChart3D";
|
|
3
|
-
export declare const libraryVersion = "3.2.
|
|
3
|
+
export declare const libraryVersion = "3.2.442";
|
|
4
4
|
export declare const checkBuildStamp: (wasmContext: TSciChart | TSciChart3D) => boolean;
|
package/Core/BuildStamp.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.checkBuildStamp = exports.libraryVersion = void 0;
|
|
4
|
-
var buildStamp = "2023-07-
|
|
4
|
+
var buildStamp = "2023-07-27T00:00:00";
|
|
5
5
|
var result;
|
|
6
6
|
// tslint:disable-next-line:no-var-requires
|
|
7
|
-
exports.libraryVersion = "3.2.
|
|
7
|
+
exports.libraryVersion = "3.2.442";
|
|
8
8
|
var checkBuildStamp = function (wasmContext) {
|
|
9
9
|
if (result !== undefined)
|
|
10
10
|
return result;
|
|
@@ -1,27 +1,33 @@
|
|
|
1
1
|
import type { TSciChart } from "../types/TSciChart";
|
|
2
2
|
import { IDeletable } from "./IDeletable";
|
|
3
|
+
/** @ignore */
|
|
4
|
+
export declare const createTrackableProxy: <T extends IDeletable>(target: T, isWasmObject?: boolean) => T;
|
|
5
|
+
/** Utility class responsible for adding its instance to {@link MemoryUsageHelper.objectRegistry} when Memory Usage Debug Mode is enabled
|
|
6
|
+
* @remarks
|
|
7
|
+
* It wraps the returned instance into a proxy object, so internal reference comparisons may fail
|
|
8
|
+
* */
|
|
3
9
|
export declare abstract class DeletableEntity implements IDeletable {
|
|
4
10
|
constructor(entity?: IDeletable);
|
|
5
11
|
abstract delete(): void;
|
|
6
12
|
}
|
|
7
|
-
|
|
8
|
-
delete(): void;
|
|
9
|
-
}
|
|
10
|
-
export declare const wrapDeletableEntity: (entity: any) => DeletableEntityWrapper;
|
|
13
|
+
/** @ignore */
|
|
11
14
|
export declare class DeletableEntityProxyHandler implements ProxyHandler<any> {
|
|
12
15
|
protected disposableEntityId: string;
|
|
13
|
-
constructor(
|
|
16
|
+
constructor(id: string);
|
|
14
17
|
construct(real: any, constructParams: any[]): any;
|
|
15
18
|
apply(target: any, thisArg: any, argArray: any[]): void;
|
|
16
19
|
get(constructedEntity: any, propertyName: string, receiver: any): any;
|
|
17
20
|
}
|
|
21
|
+
/** @ignore */
|
|
18
22
|
export declare class WasmObjectConstructorProxyHandler implements ProxyHandler<any> {
|
|
19
23
|
construct(targetFunction: any, constructParams: any[], newTarget: Function): object;
|
|
20
24
|
}
|
|
25
|
+
/** @ignore */
|
|
21
26
|
export declare class WasmContextProxyHandler implements ProxyHandler<TSciChart> {
|
|
22
27
|
protected constructorProxyHandler: WasmObjectConstructorProxyHandler;
|
|
23
28
|
get(target: any, name: string, receiver: any): any;
|
|
24
29
|
}
|
|
30
|
+
/** @ignore */
|
|
25
31
|
export declare const createWasmContextRevocableProxy: <TContextType extends object>(wasmContext: TContextType) => {
|
|
26
32
|
proxy: TContextType;
|
|
27
33
|
revoke: () => void;
|