scichart 3.0.0-beta.230 → 3.0.0-beta.235
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/Charting/ChartModifiers/OverviewRangeSelectionModifier.d.ts +0 -5
- package/Charting/ChartModifiers/OverviewRangeSelectionModifier.js +14 -15
- package/Charting/Services/SciChartRenderer.js +12 -0
- package/Charting/Visuals/Annotations/NativeTextAnnotation.js +1 -1
- package/Charting/Visuals/SciChartOverview.d.ts +2 -2
- package/Charting/Visuals/SciChartOverview.js +10 -9
- package/Charting/Visuals/sciChartInitCommon.js +1 -0
- package/Core/BuildStamp.d.ts +1 -1
- package/Core/BuildStamp.js +2 -2
- package/_wasm/scichart.browser.js +1 -1
- package/_wasm/scichart2d.data +0 -0
- package/_wasm/scichart2d.js +1 -1
- package/_wasm/scichart2d.wasm +0 -0
- package/_wasm/scichart3d.js +7 -7
- package/_wasm/scichart3d.wasm +0 -0
- package/package.json +1 -1
|
@@ -47,10 +47,6 @@ export declare class OverviewRangeSelectionModifier extends ChartModifierBase2D
|
|
|
47
47
|
* @inheritDoc
|
|
48
48
|
*/
|
|
49
49
|
onAttach(): void;
|
|
50
|
-
/**
|
|
51
|
-
* @inheritDoc
|
|
52
|
-
*/
|
|
53
|
-
onDetach(): void;
|
|
54
50
|
/**
|
|
55
51
|
* @inheritDoc
|
|
56
52
|
*/
|
|
@@ -81,5 +77,4 @@ export declare class OverviewRangeSelectionModifier extends ChartModifierBase2D
|
|
|
81
77
|
set selectedArea(value: NumberRange);
|
|
82
78
|
createAnnotation(options: ICustomResizableAnnotationOptions): OverviewCustomResizableAnnotation;
|
|
83
79
|
protected updateSelectionAnnotation(): void;
|
|
84
|
-
private xVisibleRangeChangeHandler;
|
|
85
80
|
}
|
|
@@ -67,7 +67,6 @@ var OverviewRangeSelectionModifier = /** @class */ (function (_super) {
|
|
|
67
67
|
_this.onSelectedAreaChanged = options === null || options === void 0 ? void 0 : options.onSelectedAreaChanged;
|
|
68
68
|
_this.xAxisId = (_a = options === null || options === void 0 ? void 0 : options.xAxisId) !== null && _a !== void 0 ? _a : _this.xAxisId;
|
|
69
69
|
_this.yAxisId = (_b = options === null || options === void 0 ? void 0 : options.yAxisId) !== null && _b !== void 0 ? _b : _this.yAxisId;
|
|
70
|
-
_this.xVisibleRangeChangeHandler = _this.xVisibleRangeChangeHandler.bind(_this);
|
|
71
70
|
return _this;
|
|
72
71
|
}
|
|
73
72
|
/**
|
|
@@ -77,13 +76,6 @@ var OverviewRangeSelectionModifier = /** @class */ (function (_super) {
|
|
|
77
76
|
_super.prototype.onAttach.call(this);
|
|
78
77
|
this.updateSelectionAnnotation();
|
|
79
78
|
};
|
|
80
|
-
/**
|
|
81
|
-
* @inheritDoc
|
|
82
|
-
*/
|
|
83
|
-
OverviewRangeSelectionModifier.prototype.onDetach = function () {
|
|
84
|
-
var xAxis = this.parentSurface.getXAxisById(this.xAxisId);
|
|
85
|
-
xAxis.visibleRangeChanged.unsubscribe(this.xVisibleRangeChangeHandler);
|
|
86
|
-
};
|
|
87
79
|
/**
|
|
88
80
|
* @inheritDoc
|
|
89
81
|
*/
|
|
@@ -251,25 +243,32 @@ var OverviewRangeSelectionModifier = /** @class */ (function (_super) {
|
|
|
251
243
|
this.rangeSelectionAnnotationProperty = dragBox;
|
|
252
244
|
this.annotationBeforeSelectedAreaProperty = annotationBeforeSelectedArea;
|
|
253
245
|
this.annotationAfterSelectedAreaProperty = annotationAfterSelectedArea;
|
|
254
|
-
xAxis.visibleRangeChanged.subscribe(this.xVisibleRangeChangeHandler);
|
|
255
246
|
}
|
|
256
247
|
};
|
|
257
|
-
OverviewRangeSelectionModifier.prototype.xVisibleRangeChangeHandler = function (args) {
|
|
258
|
-
this.annotationBeforeSelectedAreaProperty.x1 = args.visibleRange.min;
|
|
259
|
-
this.annotationAfterSelectedAreaProperty.x2 = args.visibleRange.max;
|
|
260
|
-
};
|
|
261
248
|
return OverviewRangeSelectionModifier;
|
|
262
249
|
}(ChartModifierBase2D_1.ChartModifierBase2D));
|
|
263
250
|
exports.OverviewRangeSelectionModifier = OverviewRangeSelectionModifier;
|
|
264
251
|
/** @ignore */
|
|
265
252
|
var horizontalAdornerSvgTemplate = function (x1, y1, x2, y2) {
|
|
266
253
|
var colorLine = "black";
|
|
267
|
-
|
|
254
|
+
var gridpHandleFill = "#2e2e2e";
|
|
255
|
+
var gripHandleHalfWidth = 3;
|
|
256
|
+
var gripHandleHeight = "40%";
|
|
257
|
+
var gripHandleYCoord = "30%";
|
|
258
|
+
var width = x2 - x1;
|
|
259
|
+
var height = y2 - y1;
|
|
260
|
+
return "<svg x=\"".concat(x1, "\" y=\"").concat(y1, "\" width=\"").concat(width, "px\" height=\"").concat(height, "px\" viewBox=\"0 0 ").concat(width, " ").concat(height, "\" overflow=\"visible\" xmlns=\"http://www.w3.org/2000/svg\">\n <line x1=\"0\" y1=\"0\" x2=\"").concat(width, "\" y2=\"0\" stroke=\"").concat(colorLine, "\" stroke-width=\"1\" />\n <line x1=\"0\" y1=\"").concat(height, "\" x2=\"").concat(width, "\" y2=\"").concat(height, "\" stroke=\"").concat(colorLine, "\" stroke-width=\"1\" />\n <line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"").concat(height, "\" stroke=\"").concat(colorLine, "\" stroke-width=\"1\" />\n <line x1=\"").concat(width, "\" y1=\"0\" x2=\"").concat(width, "\" y2=\"").concat(height, "\" stroke=\"").concat(colorLine, "\" stroke-width=\"1\" />\n <rect x=\"").concat(0 - gripHandleHalfWidth, "\" y=\"").concat(gripHandleYCoord, "\" width=\"7\" height=\"").concat(gripHandleHeight, "\" fill=\"").concat(gridpHandleFill, "\" rx=\"5\" stroke=\"").concat(colorLine, "\" />\n <rect x=\"").concat(width - gripHandleHalfWidth, "\" y=\"").concat(gripHandleYCoord, "\" width=\"7\" height=\"").concat(gripHandleHeight, "\" fill=\"").concat(gridpHandleFill, "\" rx=\"5\" stroke=\"").concat(colorLine, "\" />\n </svg>");
|
|
268
261
|
};
|
|
269
262
|
/** @ignore */
|
|
270
263
|
var verticalAdornerSvgTemplate = function (x1, y1, x2, y2) {
|
|
271
264
|
var colorLine = "black";
|
|
272
|
-
|
|
265
|
+
var gridpHandleFill = "#2e2e2e";
|
|
266
|
+
var gripHandleWidth = "40%";
|
|
267
|
+
var gripHandleHalfHeight = 3;
|
|
268
|
+
var gripHandleXCoord = "30%";
|
|
269
|
+
var width = x2 - x1;
|
|
270
|
+
var height = y2 - y1;
|
|
271
|
+
return "<svg x=\"".concat(x1, "\" y=\"").concat(y1, "\" width=\"").concat(width, "px\" height=\"").concat(height, "px\" viewBox=\"0 0 ").concat(width, " ").concat(height, "\" overflow=\"visible\" xmlns=\"http://www.w3.org/2000/svg\">\n <line x1=\"0\" y1=\"0\" x2=\"").concat(width, "\" y2=\"0\" stroke=\"").concat(colorLine, "\" stroke-width=\"1\" />\n <line x1=\"0\" y1=\"").concat(height, "\" x2=\"").concat(width, "\" y2=\"").concat(height, "\" stroke=\"").concat(colorLine, "\" stroke-width=\"1\" />\n <line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"").concat(height, "\" stroke=\"").concat(colorLine, "\" stroke-width=\"1\" />\n <line x1=\"").concat(width, "\" y1=\"0\" x2=\"").concat(width, "\" y2=\"").concat(height, "\" stroke=\"").concat(colorLine, "\" stroke-width=\"1\" />\n <rect x=\"").concat(gripHandleXCoord, "\" y=\"").concat(0 - gripHandleHalfHeight, "\" width=\"").concat(gripHandleWidth, "\" height=\"7\" fill=\"").concat(gridpHandleFill, "\" rx=\"5\" stroke=\"").concat(colorLine, "\" />\n <rect x=\"").concat(gripHandleXCoord, "\" y=\"").concat(height - gripHandleHalfHeight, "\" width=\"").concat(gripHandleWidth, "\" height=\"7\" fill=\"").concat(gridpHandleFill, "\" rx=\"5\" stroke=\"").concat(colorLine, "\" />\n </svg>");
|
|
273
272
|
};
|
|
274
273
|
var defaultSelectionAnnotationSvgString = "<svg width=\"50\" height=\"50\" preserveAspectRatio=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <rect width=\"100%\" height=\"100%\" style=\"fill:transparent\">\n </rect>\n</svg>";
|
|
275
274
|
var defaultUnSelectedAnnotationSvgString = "<svg width=\"50\" height=\"50\" preserveAspectRatio=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <rect width=\"100%\" height=\"100%\" style=\"fill:black\">\n </rect>\n </svg>";
|
|
@@ -239,6 +239,18 @@ var SciChartRenderer = /** @class */ (function () {
|
|
|
239
239
|
// Is XAxes and YAxes collection null or empty
|
|
240
240
|
// is XAxis a CategoryAxis and renderableseries is null or empty
|
|
241
241
|
// Do all renderableseries have dataseries
|
|
242
|
+
var errors = [];
|
|
243
|
+
if (this.sciChartSurface.renderableSeries.size() > 0) {
|
|
244
|
+
if (this.sciChartSurface.xAxes.size() === 0) {
|
|
245
|
+
errors.push("Chart must have at least one X axis");
|
|
246
|
+
}
|
|
247
|
+
if (this.sciChartSurface.yAxes.size() === 0) {
|
|
248
|
+
errors.push("Chart must have at least one Y axis");
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
if (errors.length > 0) {
|
|
252
|
+
throw new Error(errors.join("\n"));
|
|
253
|
+
}
|
|
242
254
|
};
|
|
243
255
|
SciChartRenderer.prototype.updateSvgCanvasSize = function (seriesViewRect) {
|
|
244
256
|
// Convert seriesViewRect back to device pixels
|
|
@@ -303,7 +303,7 @@ var NativeTextAnnotation = /** @class */ (function (_super) {
|
|
|
303
303
|
var y1 = this.getY1Coordinate(xCalc, yCalc);
|
|
304
304
|
var style = {
|
|
305
305
|
fontFamily: this.fontFamily,
|
|
306
|
-
fontSize: this.fontSize
|
|
306
|
+
fontSize: Math.round(this.fontSize * DpiHelper_1.DpiHelper.PIXEL_RATIO)
|
|
307
307
|
};
|
|
308
308
|
var colorNum = (0, parseColor_1.parseColorToUIntArgb)(this.textColor);
|
|
309
309
|
colorNum = (0, colorUtil_1.uintArgbColorOverrideOpacity)(colorNum, this.opacity);
|
|
@@ -32,10 +32,10 @@ export declare class SciChartOverview implements IDeletable, IThemeable {
|
|
|
32
32
|
* Creates a {@link SciChartOverview} and {@link TSciChart | WebAssembly Context} to occupy the div by element ID in your DOM.
|
|
33
33
|
* @remarks This method is async and must be awaited
|
|
34
34
|
* @param parentChart The {@link SciChartSurface} of the {@link SciChartOverview} will reside
|
|
35
|
-
* @param overviewRootElementId The Div Element ID where the {@link SciChartSurface} of the {@link SciChartOverview} will reside
|
|
35
|
+
* @param overviewRootElementId The Div Element ID or reference where the {@link SciChartSurface} of the {@link SciChartOverview} will reside
|
|
36
36
|
* @param options Optional - Optional parameters for chart creation. See {@link IOverviewOptions for more details}
|
|
37
37
|
*/
|
|
38
|
-
static create(parentChart: SciChartSurface,
|
|
38
|
+
static create(parentChart: SciChartSurface, overviewRootElement?: string | HTMLDivElement, options?: IOverviewOptions): Promise<SciChartOverview>;
|
|
39
39
|
private readonly overviewXAxisProperty;
|
|
40
40
|
private readonly overviewYAxisProperty;
|
|
41
41
|
private readonly rangeSelectionModifierProperty;
|
|
@@ -79,15 +79,15 @@ var SciChartOverview = /** @class */ (function () {
|
|
|
79
79
|
* Creates a {@link SciChartOverview} and {@link TSciChart | WebAssembly Context} to occupy the div by element ID in your DOM.
|
|
80
80
|
* @remarks This method is async and must be awaited
|
|
81
81
|
* @param parentChart The {@link SciChartSurface} of the {@link SciChartOverview} will reside
|
|
82
|
-
* @param overviewRootElementId The Div Element ID where the {@link SciChartSurface} of the {@link SciChartOverview} will reside
|
|
82
|
+
* @param overviewRootElementId The Div Element ID or reference where the {@link SciChartSurface} of the {@link SciChartOverview} will reside
|
|
83
83
|
* @param options Optional - Optional parameters for chart creation. See {@link IOverviewOptions for more details}
|
|
84
84
|
*/
|
|
85
|
-
SciChartOverview.create = function (parentChart,
|
|
85
|
+
SciChartOverview.create = function (parentChart, overviewRootElement, options) {
|
|
86
86
|
return __awaiter(this, void 0, void 0, function () {
|
|
87
87
|
var _a, sciChartSurface, wasmContext, rangeSelectionModifier, xAxis, yAxis;
|
|
88
88
|
return __generator(this, function (_b) {
|
|
89
89
|
switch (_b.label) {
|
|
90
|
-
case 0: return [4 /*yield*/, createSciChartOverview(parentChart,
|
|
90
|
+
case 0: return [4 /*yield*/, createSciChartOverview(parentChart, overviewRootElement, options)];
|
|
91
91
|
case 1:
|
|
92
92
|
_a = _b.sent(), sciChartSurface = _a.sciChartSurface, wasmContext = _a.wasmContext, rangeSelectionModifier = _a.rangeSelectionModifier, xAxis = _a.xAxis, yAxis = _a.yAxis;
|
|
93
93
|
return [2 /*return*/, new SciChartOverview(parentChart, sciChartSurface, wasmContext, rangeSelectionModifier, xAxis, yAxis)];
|
|
@@ -158,13 +158,13 @@ var SciChartOverview = /** @class */ (function () {
|
|
|
158
158
|
}());
|
|
159
159
|
exports.SciChartOverview = SciChartOverview;
|
|
160
160
|
/** @ignore */
|
|
161
|
-
var createSciChartOverview = function (originalSciChartSurface,
|
|
161
|
+
var createSciChartOverview = function (originalSciChartSurface, overviewRootElement, options) { return __awaiter(void 0, void 0, void 0, function () {
|
|
162
162
|
var _a, wasmContext, sciChartSurface, mainAxisId, secondaryAxisId, originalMainAxis, originalSecondaryAxis, originalXAxis, originalYAxis, xAxisOptions, yAxisOptions, xAxis, yAxis, mainOverviewAxis, defaultTransform, renderableSeries, rangeSelectionModifier;
|
|
163
163
|
var _b;
|
|
164
164
|
var _c, _d, _e, _f;
|
|
165
165
|
return __generator(this, function (_g) {
|
|
166
166
|
switch (_g.label) {
|
|
167
|
-
case 0: return [4 /*yield*/, SciChartSurface_1.SciChartSurface.create(
|
|
167
|
+
case 0: return [4 /*yield*/, SciChartSurface_1.SciChartSurface.create(overviewRootElement, options)];
|
|
168
168
|
case 1:
|
|
169
169
|
_a = _g.sent(), wasmContext = _a.wasmContext, sciChartSurface = _a.sciChartSurface;
|
|
170
170
|
mainAxisId = (_c = options === null || options === void 0 ? void 0 : options.mainAxisId) !== null && _c !== void 0 ? _c : AxisBase2D_1.AxisBase2D.DEFAULT_AXIS_ID;
|
|
@@ -225,12 +225,13 @@ var createSciChartOverview = function (originalSciChartSurface, overviewRootElem
|
|
|
225
225
|
if ((options === null || options === void 0 ? void 0 : options.rangeSelectionAnnotationSvgString) !== undefined) {
|
|
226
226
|
rangeSelectionModifier.rangeSelectionAnnotation.svgString = options.rangeSelectionAnnotationSvgString;
|
|
227
227
|
}
|
|
228
|
+
xAxis.visibleRangeChanged.subscribe(function (_a) {
|
|
229
|
+
var overviewVisibleRange = _a.visibleRange;
|
|
230
|
+
var updatedSelectedRange = originalMainAxis.visibleRange.clip(overviewVisibleRange);
|
|
231
|
+
rangeSelectionModifier.selectedArea = updatedSelectedRange;
|
|
232
|
+
});
|
|
228
233
|
originalMainAxis.visibleRangeChanged.subscribe(function (_a) {
|
|
229
234
|
var visibleRange = _a.visibleRange;
|
|
230
|
-
if (visibleRange.min < mainOverviewAxis.visibleRange.min ||
|
|
231
|
-
visibleRange.max > mainOverviewAxis.visibleRange.max) {
|
|
232
|
-
mainOverviewAxis.visibleRange = new NumberRange_1.NumberRange(Math.min(visibleRange.min, mainOverviewAxis.visibleRange.min), Math.max(visibleRange.max, mainOverviewAxis.visibleRange.max));
|
|
233
|
-
}
|
|
234
235
|
var updatedSelectedRange = visibleRange.clip(mainOverviewAxis.visibleRange);
|
|
235
236
|
var shouldUpdateSelectedRange = !updatedSelectedRange.equals(rangeSelectionModifier.selectedArea);
|
|
236
237
|
if (shouldUpdateSelectedRange) {
|
|
@@ -149,6 +149,7 @@ var initCanvas = function (divElement, aspectWidth, aspectHeight, activeCanvas,
|
|
|
149
149
|
svgAdornerLayer.style.pointerEvents = "none";
|
|
150
150
|
svgAdornerLayer.style.width = "100%";
|
|
151
151
|
svgAdornerLayer.style.height = "100%";
|
|
152
|
+
svgAdornerLayer.style.zIndex = "1";
|
|
152
153
|
chartRoot.appendChild(svgAdornerLayer);
|
|
153
154
|
// Root Div Element
|
|
154
155
|
var divRootElement = document.createElement("div");
|
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.0.0-beta.
|
|
3
|
+
export declare const libraryVersion = "3.0.0-beta.235";
|
|
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 = "2022-12-
|
|
4
|
+
var buildStamp = "2022-12-21T00:00:00";
|
|
5
5
|
var result;
|
|
6
6
|
// tslint:disable-next-line:no-var-requires
|
|
7
|
-
exports.libraryVersion = "3.0.0-beta.
|
|
7
|
+
exports.libraryVersion = "3.0.0-beta.235";
|
|
8
8
|
var checkBuildStamp = function (wasmContext) {
|
|
9
9
|
if (result !== undefined)
|
|
10
10
|
return result;
|