scichart 3.0.266 → 3.0.280
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/ChartModifierBase2D.js +2 -3
- package/Charting/ChartModifiers/CursorModifier.d.ts +27 -12
- package/Charting/ChartModifiers/CursorModifier.js +87 -12
- package/Charting/ChartModifiers/XAxisDragModifier.d.ts +15 -12
- package/Charting/ChartModifiers/YAxisDragModifier.d.ts +15 -12
- package/Charting/ChartModifiers/constants.d.ts +4 -1
- package/Charting/ChartModifiers/constants.js +3 -0
- package/Charting/Drawing/FontKey.d.ts +0 -0
- package/Charting/Drawing/FontKey.js +0 -0
- package/Charting/Drawing/WebGlRenderContext2D.d.ts +6 -2
- package/Charting/Drawing/WebGlRenderContext2D.js +16 -7
- package/Charting/LayoutManager/BaseAxisLayoutStrategy.d.ts +1 -0
- package/Charting/LayoutManager/BaseAxisLayoutStrategy.js +1 -0
- package/Charting/LayoutManager/BottomAlignedInnerAxisLayoutStrategy.js +5 -0
- package/Charting/LayoutManager/BottomAlignedOuterAxisLayoutStrategy.js +5 -0
- package/Charting/LayoutManager/BottomAlignedOuterHorizontallyStackedAxisLayoutStrategy.d.ts +1 -0
- package/Charting/LayoutManager/BottomAlignedOuterHorizontallyStackedAxisLayoutStrategy.js +1 -1
- package/Charting/LayoutManager/LayoutManager.d.ts +14 -4
- package/Charting/LayoutManager/LayoutManager.js +105 -5
- package/Charting/LayoutManager/LeftAlignedInnerAxisLayoutStrategy.js +5 -0
- package/Charting/LayoutManager/LeftAlignedOuterAxisLayoutStrategy.js +5 -0
- package/Charting/LayoutManager/LeftAlignedOuterVerticallyStackedAxisLayoutStrategy.d.ts +1 -0
- package/Charting/LayoutManager/LeftAlignedOuterVerticallyStackedAxisLayoutStrategy.js +3 -3
- package/Charting/LayoutManager/RightAlignedInnerAxisLayoutStrategy.js +5 -0
- package/Charting/LayoutManager/RightAlignedOuterAxisLayoutStrategy.js +5 -0
- package/Charting/LayoutManager/RightAlignedOuterVerticallyStackedAxisLayoutStrategy.d.ts +1 -0
- package/Charting/LayoutManager/RightAlignedOuterVerticallyStackedAxisLayoutStrategy.js +1 -1
- package/Charting/LayoutManager/TopAlignedInnerAxisLayoutStrategy.js +5 -0
- package/Charting/LayoutManager/TopAlignedOuterAxisLayoutStrategy.js +5 -0
- package/Charting/LayoutManager/TopAlignedOuterHorizontallyStackedAxisLayoutStrategy.d.ts +1 -0
- package/Charting/LayoutManager/TopAlignedOuterHorizontallyStackedAxisLayoutStrategy.js +1 -1
- package/Charting/Visuals/Annotations/AnnotationBase.d.ts +6 -6
- package/Charting/Visuals/Annotations/AnnotationBase.js +13 -9
- package/Charting/Visuals/Annotations/AxisMarkerAnnotation.d.ts +1 -1
- package/Charting/Visuals/Annotations/AxisMarkerAnnotation.js +7 -7
- package/Charting/Visuals/Annotations/BoxAnnotation.d.ts +1 -1
- package/Charting/Visuals/Annotations/BoxAnnotation.js +21 -21
- package/Charting/Visuals/Annotations/LineAnnotation.d.ts +1 -1
- package/Charting/Visuals/Annotations/LineAnnotation.js +4 -4
- package/Charting/Visuals/Annotations/NativeTextAnnotation.d.ts +1 -1
- package/Charting/Visuals/Annotations/NativeTextAnnotation.js +21 -21
- package/Charting/Visuals/Annotations/SvgAnnotationBase.d.ts +1 -1
- package/Charting/Visuals/Axis/AxisBase2D.d.ts +0 -5
- package/Charting/Visuals/Axis/AxisBase2D.js +13 -19
- package/Charting/Visuals/Axis/AxisCore.js +4 -1
- package/Charting/Visuals/Helpers/NativeObject.d.ts +6 -0
- package/Charting/Visuals/Helpers/NativeObject.js +21 -4
- package/Charting/Visuals/I2DSurfaceOptions.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.js +14 -0
- package/Charting/Visuals/SciChartDefaults.d.ts +4 -0
- package/Charting/Visuals/SciChartDefaults.js +4 -0
- package/Charting/Visuals/SciChartSurface.d.ts +6 -2
- package/Charting/Visuals/SciChartSurface.js +10 -4
- package/Charting/Visuals/licenseManager2D.js +4 -2
- package/Core/BuildStamp.d.ts +1 -1
- package/Core/BuildStamp.js +2 -2
- package/Core/Telemetry.js +4 -1
- package/README.md +56 -14
- package/_wasm/scichart.browser.js +1 -1
- package/_wasm/scichart2d.js +10 -10
- package/_wasm/scichart2d.wasm +0 -0
- package/_wasm/scichart3d.js +10 -10
- package/_wasm/scichart3d.wasm +0 -0
- package/package.json +1 -1
- package/types/AxisAlignment.d.ts +1 -0
- package/types/AxisAlignment.js +5 -1
- package/types/TSciChart.d.ts +1 -0
- package/utils/array.d.ts +9 -0
- package/utils/array.js +19 -1
|
@@ -119,11 +119,10 @@ var ChartModifierBase2D = /** @class */ (function (_super) {
|
|
|
119
119
|
*/
|
|
120
120
|
ChartModifierBase2D.prototype.growBy = function (mousePoint, axis, fraction) {
|
|
121
121
|
var isHorizontalAxis = axis.isHorizontalAxis, isAxisFlipped = axis.isAxisFlipped, viewRect = axis.viewRect, flippedCoordinates = axis.flippedCoordinates;
|
|
122
|
+
var seriesViewRect = this.parentSurface.seriesViewRect;
|
|
122
123
|
var size = isHorizontalAxis ? viewRect.width : viewRect.height;
|
|
123
124
|
if (axis.isStackedAxis && this.parentSurface) {
|
|
124
|
-
size = isHorizontalAxis
|
|
125
|
-
? this.parentSurface.seriesViewRect.width
|
|
126
|
-
: this.parentSurface.seriesViewRect.height;
|
|
125
|
+
size = isHorizontalAxis ? seriesViewRect.width : seriesViewRect.height;
|
|
127
126
|
}
|
|
128
127
|
var coord = isHorizontalAxis ? mousePoint.x : mousePoint.y;
|
|
129
128
|
// Compute relative fractions to expand or contract the axis VisibleRange by
|
|
@@ -120,10 +120,6 @@ export declare class CursorModifier extends ChartModifierBase2D implements IIncl
|
|
|
120
120
|
* Gets or sets whether we should display the tooltip. Default is false
|
|
121
121
|
*/
|
|
122
122
|
showTooltip: boolean;
|
|
123
|
-
/**
|
|
124
|
-
* Gets or sets whether we should display axis labels. Default is true
|
|
125
|
-
*/
|
|
126
|
-
showAxisLabels: boolean;
|
|
127
123
|
/**
|
|
128
124
|
* Gets or sets both axis label text color as an HTML Color code
|
|
129
125
|
*/
|
|
@@ -160,14 +156,6 @@ export declare class CursorModifier extends ChartModifierBase2D implements IIncl
|
|
|
160
156
|
* Gets or sets the legend Y offset
|
|
161
157
|
*/
|
|
162
158
|
tooltipLegendOffsetY: number;
|
|
163
|
-
/**
|
|
164
|
-
* Gets or sets whether we should display the X Line. Default is true
|
|
165
|
-
*/
|
|
166
|
-
showXLine: boolean;
|
|
167
|
-
/**
|
|
168
|
-
* Gets or sets whether we should display the Y Line. Default is true
|
|
169
|
-
*/
|
|
170
|
-
showYLine: boolean;
|
|
171
159
|
/**
|
|
172
160
|
* If this is set greater than the default of zero, the toolip will only show values for points in this radius, rather than all points on the vertical line
|
|
173
161
|
*/
|
|
@@ -180,6 +168,9 @@ export declare class CursorModifier extends ChartModifierBase2D implements IIncl
|
|
|
180
168
|
protected tooltipDataTemplateProperty?: TCursorTooltipDataTemplate;
|
|
181
169
|
protected includedSeriesMap: Map<IRenderableSeries, boolean>;
|
|
182
170
|
protected placementDivIdProperty: string;
|
|
171
|
+
protected showXLineProperty: boolean;
|
|
172
|
+
protected showYLineProperty: boolean;
|
|
173
|
+
protected showAxisLabelsProperty: boolean;
|
|
183
174
|
/**
|
|
184
175
|
* Creates an instance of the CursorModifier
|
|
185
176
|
*
|
|
@@ -232,6 +223,30 @@ export declare class CursorModifier extends ChartModifierBase2D implements IIncl
|
|
|
232
223
|
* Gets or sets the crosshair line Stroke color as an HTML Color code
|
|
233
224
|
*/
|
|
234
225
|
set crosshairStroke(value: string);
|
|
226
|
+
/**
|
|
227
|
+
* Gets or sets whether we should display the X Line. Default is true
|
|
228
|
+
*/
|
|
229
|
+
get showXLine(): boolean;
|
|
230
|
+
/**
|
|
231
|
+
* Gets or sets whether we should display the X Line. Default is true
|
|
232
|
+
*/
|
|
233
|
+
set showXLine(value: boolean);
|
|
234
|
+
/**
|
|
235
|
+
* Gets or sets whether we should display the Y Line. Default is true
|
|
236
|
+
*/
|
|
237
|
+
get showYLine(): boolean;
|
|
238
|
+
/**
|
|
239
|
+
* Gets or sets whether we should display the Y Line. Default is true
|
|
240
|
+
*/
|
|
241
|
+
set showYLine(value: boolean);
|
|
242
|
+
/**
|
|
243
|
+
* Gets or sets whether we should display the Axis Labels. Default is true
|
|
244
|
+
*/
|
|
245
|
+
get showAxisLabels(): boolean;
|
|
246
|
+
/**
|
|
247
|
+
* Gets or sets whether we should display the Axis Labels. Default is true
|
|
248
|
+
*/
|
|
249
|
+
set showAxisLabels(value: boolean);
|
|
235
250
|
/**
|
|
236
251
|
* Gets or sets the parent div element reference or id for the Tooltip
|
|
237
252
|
*/
|
|
@@ -17,6 +17,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.adjustTooltipPosition = exports.calcTooltipSize = exports.CursorModifier = void 0;
|
|
19
19
|
var classFactory_1 = require("../../Builder/classFactory");
|
|
20
|
+
var Deleter_1 = require("../../Core/Deleter");
|
|
20
21
|
var BaseType_1 = require("../../types/BaseType");
|
|
21
22
|
var ChartModifierType_1 = require("../../types/ChartModifierType");
|
|
22
23
|
var MousePosition_1 = require("../../types/MousePosition");
|
|
@@ -86,10 +87,6 @@ var CursorModifier = /** @class */ (function (_super) {
|
|
|
86
87
|
* Gets or sets whether we should display the tooltip. Default is false
|
|
87
88
|
*/
|
|
88
89
|
_this.showTooltip = false;
|
|
89
|
-
/**
|
|
90
|
-
* Gets or sets whether we should display axis labels. Default is true
|
|
91
|
-
*/
|
|
92
|
-
_this.showAxisLabels = true;
|
|
93
90
|
/**
|
|
94
91
|
* Gets or sets both axis label text color as an HTML Color code
|
|
95
92
|
*/
|
|
@@ -122,14 +119,6 @@ var CursorModifier = /** @class */ (function (_super) {
|
|
|
122
119
|
* Gets or sets the legend Y offset
|
|
123
120
|
*/
|
|
124
121
|
_this.tooltipLegendOffsetY = 0;
|
|
125
|
-
/**
|
|
126
|
-
* Gets or sets whether we should display the X Line. Default is true
|
|
127
|
-
*/
|
|
128
|
-
_this.showXLine = true;
|
|
129
|
-
/**
|
|
130
|
-
* Gets or sets whether we should display the Y Line. Default is true
|
|
131
|
-
*/
|
|
132
|
-
_this.showYLine = true;
|
|
133
122
|
/**
|
|
134
123
|
* If this is set greater than the default of zero, the toolip will only show values for points in this radius, rather than all points on the vertical line
|
|
135
124
|
*/
|
|
@@ -137,6 +126,9 @@ var CursorModifier = /** @class */ (function (_super) {
|
|
|
137
126
|
_this.mousePosition = MousePosition_1.EMousePosition.OutOfCanvas;
|
|
138
127
|
_this.crosshairStrokeProperty = SciChartSurfaceBase_1.SciChartSurfaceBase.DEFAULT_THEME.cursorLineBrush;
|
|
139
128
|
_this.includedSeriesMap = new Map();
|
|
129
|
+
_this.showXLineProperty = true;
|
|
130
|
+
_this.showYLineProperty = true;
|
|
131
|
+
_this.showAxisLabelsProperty = true;
|
|
140
132
|
if (options === null || options === void 0 ? void 0 : options.tooltipSvgTemplate) {
|
|
141
133
|
if (typeof options.tooltipSvgTemplate === "string") {
|
|
142
134
|
_this.typeMap.set("tooltipSvgTemplate", options.tooltipSvgTemplate);
|
|
@@ -312,6 +304,89 @@ var CursorModifier = /** @class */ (function (_super) {
|
|
|
312
304
|
enumerable: false,
|
|
313
305
|
configurable: true
|
|
314
306
|
});
|
|
307
|
+
Object.defineProperty(CursorModifier.prototype, "showXLine", {
|
|
308
|
+
/**
|
|
309
|
+
* Gets or sets whether we should display the X Line. Default is true
|
|
310
|
+
*/
|
|
311
|
+
get: function () {
|
|
312
|
+
return this.showXLineProperty;
|
|
313
|
+
},
|
|
314
|
+
/**
|
|
315
|
+
* Gets or sets whether we should display the X Line. Default is true
|
|
316
|
+
*/
|
|
317
|
+
set: function (value) {
|
|
318
|
+
if (this.showXLineProperty !== value) {
|
|
319
|
+
this.showXLineProperty = value;
|
|
320
|
+
if (this.showXLineProperty && !this.xLineAnnotation) {
|
|
321
|
+
var xAxisLabelFill = this.xAxisLabelFill ? this.xAxisLabelFill : this.axisLabelFill;
|
|
322
|
+
var xAxisLabelStroke = this.xAxisLabelStroke ? this.xAxisLabelStroke : this.axisLabelStroke;
|
|
323
|
+
this.xLineAnnotation = this.newLineAnnotation(xAxisLabelFill, xAxisLabelStroke);
|
|
324
|
+
this.parentSurface.modifierAnnotations.add(this.xLineAnnotation);
|
|
325
|
+
}
|
|
326
|
+
else if (!this.showXLineProperty && this.xLineAnnotation) {
|
|
327
|
+
this.parentSurface.modifierAnnotations.remove(this.xLineAnnotation);
|
|
328
|
+
this.xLineAnnotation = (0, Deleter_1.deleteSafe)(this.xLineAnnotation);
|
|
329
|
+
}
|
|
330
|
+
this.notifyPropertyChanged(constants_1.PROPERTY.X_LINE);
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
enumerable: false,
|
|
334
|
+
configurable: true
|
|
335
|
+
});
|
|
336
|
+
Object.defineProperty(CursorModifier.prototype, "showYLine", {
|
|
337
|
+
/**
|
|
338
|
+
* Gets or sets whether we should display the Y Line. Default is true
|
|
339
|
+
*/
|
|
340
|
+
get: function () {
|
|
341
|
+
return this.showYLineProperty;
|
|
342
|
+
},
|
|
343
|
+
/**
|
|
344
|
+
* Gets or sets whether we should display the Y Line. Default is true
|
|
345
|
+
*/
|
|
346
|
+
set: function (value) {
|
|
347
|
+
if (this.showYLineProperty !== value) {
|
|
348
|
+
this.showYLineProperty = value;
|
|
349
|
+
if (this.showYLineProperty && !this.yLineAnnotation) {
|
|
350
|
+
var yAxisLabelFill = this.yAxisLabelFill ? this.yAxisLabelFill : this.axisLabelFill;
|
|
351
|
+
var yAxisLabelStroke = this.yAxisLabelStroke ? this.yAxisLabelStroke : this.axisLabelStroke;
|
|
352
|
+
this.yLineAnnotation = this.newLineAnnotation(yAxisLabelFill, yAxisLabelStroke);
|
|
353
|
+
this.parentSurface.modifierAnnotations.add(this.yLineAnnotation);
|
|
354
|
+
}
|
|
355
|
+
else if (!this.showYLineProperty && this.yLineAnnotation) {
|
|
356
|
+
this.parentSurface.modifierAnnotations.remove(this.yLineAnnotation);
|
|
357
|
+
this.yLineAnnotation = (0, Deleter_1.deleteSafe)(this.yLineAnnotation);
|
|
358
|
+
}
|
|
359
|
+
this.notifyPropertyChanged(constants_1.PROPERTY.Y_LINE);
|
|
360
|
+
}
|
|
361
|
+
},
|
|
362
|
+
enumerable: false,
|
|
363
|
+
configurable: true
|
|
364
|
+
});
|
|
365
|
+
Object.defineProperty(CursorModifier.prototype, "showAxisLabels", {
|
|
366
|
+
/**
|
|
367
|
+
* Gets or sets whether we should display the Axis Labels. Default is true
|
|
368
|
+
*/
|
|
369
|
+
get: function () {
|
|
370
|
+
return this.showAxisLabelsProperty;
|
|
371
|
+
},
|
|
372
|
+
/**
|
|
373
|
+
* Gets or sets whether we should display the Axis Labels. Default is true
|
|
374
|
+
*/
|
|
375
|
+
set: function (value) {
|
|
376
|
+
if (this.showAxisLabelsProperty !== value) {
|
|
377
|
+
this.showAxisLabelsProperty = value;
|
|
378
|
+
if (this.xLineAnnotation) {
|
|
379
|
+
this.xLineAnnotation.showLabel = this.showAxisLabelsProperty;
|
|
380
|
+
}
|
|
381
|
+
if (this.yLineAnnotation) {
|
|
382
|
+
this.yLineAnnotation.showLabel = this.showAxisLabelsProperty;
|
|
383
|
+
}
|
|
384
|
+
this.notifyPropertyChanged(constants_1.PROPERTY.AXIS_LABELS);
|
|
385
|
+
}
|
|
386
|
+
},
|
|
387
|
+
enumerable: false,
|
|
388
|
+
configurable: true
|
|
389
|
+
});
|
|
315
390
|
Object.defineProperty(CursorModifier.prototype, "placementDivId", {
|
|
316
391
|
/**
|
|
317
392
|
* Gets or sets the parent div element reference or id for the Tooltip
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { NumberRange } from "../../Core/NumberRange";
|
|
2
|
+
import { Point } from "../../Core/Point";
|
|
3
|
+
import { ECursorStyle } from "../../types/CursorStyle";
|
|
1
4
|
import { EDragMode } from "../../types/DragMode";
|
|
2
5
|
import { AxisBase2D } from "../Visuals/Axis/AxisBase2D";
|
|
3
6
|
import { ChartModifierBase2D, IChartModifierBaseOptions } from "./ChartModifierBase2D";
|
|
@@ -31,12 +34,12 @@ export declare class XAxisDragModifier extends ChartModifierBase2D {
|
|
|
31
34
|
readonly type = EChart2DModifierType.XAxisDrag;
|
|
32
35
|
dragMode: EDragMode;
|
|
33
36
|
protected isClickedOverXAxis: boolean;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
protected pointFrom: Point;
|
|
38
|
+
protected activeAxes: AxisBase2D[];
|
|
39
|
+
protected initialVisibleRanges: NumberRange[];
|
|
40
|
+
protected isVerticalChart: boolean;
|
|
41
|
+
protected cursorStyle: ECursorStyle;
|
|
42
|
+
protected includedSeriesMapProperty: Map<string, boolean>;
|
|
40
43
|
/**
|
|
41
44
|
* Creates an instance of a XAxisDragModifier
|
|
42
45
|
* @param options optional parameters to pass to the XAxisDragModifier to configure it upon construction
|
|
@@ -71,10 +74,10 @@ export declare class XAxisDragModifier extends ChartModifierBase2D {
|
|
|
71
74
|
type: string;
|
|
72
75
|
options: Required<Omit<IChartModifierBaseOptions, never>>;
|
|
73
76
|
};
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
77
|
+
protected updateCursor(mousePoint: Point): void;
|
|
78
|
+
protected doPanning(mousePoint: Point): void;
|
|
79
|
+
protected doScaling(pointTo: Point): void;
|
|
80
|
+
protected getHorizontalXAxes(): AxisBase2D[];
|
|
81
|
+
protected getVerticalXAxes(): AxisBase2D[];
|
|
82
|
+
protected startDragging(axes: AxisBase2D[], args: ModifierMouseArgs): void;
|
|
80
83
|
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { IIncludeAxis } from "../../Core/IIncludeAxis";
|
|
2
|
+
import { NumberRange } from "../../Core/NumberRange";
|
|
3
|
+
import { Point } from "../../Core/Point";
|
|
2
4
|
import { EChart2DModifierType } from "../../types/ChartModifierType";
|
|
5
|
+
import { ECursorStyle } from "../../types/CursorStyle";
|
|
3
6
|
import { EDragMode } from "../../types/DragMode";
|
|
4
7
|
import { AxisBase2D } from "../Visuals/Axis/AxisBase2D";
|
|
5
8
|
import { ChartModifierBase2D, IChartModifierBaseOptions } from "./ChartModifierBase2D";
|
|
@@ -32,12 +35,12 @@ export declare class YAxisDragModifier extends ChartModifierBase2D implements II
|
|
|
32
35
|
readonly type = EChart2DModifierType.YAxisDrag;
|
|
33
36
|
dragMode: EDragMode;
|
|
34
37
|
protected isClickedOverYAxis: boolean;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
protected pointFrom: Point;
|
|
39
|
+
protected activeAxes: AxisBase2D[];
|
|
40
|
+
protected initialVisibleRanges: NumberRange[];
|
|
41
|
+
protected isVerticalChart: boolean;
|
|
42
|
+
protected cursorStyle: ECursorStyle;
|
|
43
|
+
protected includedSeriesMapProperty: Map<string, boolean>;
|
|
41
44
|
/**
|
|
42
45
|
* Creates an instance of a XAxisDragModifier
|
|
43
46
|
* @param options optional parameters to pass to the XAxisDragModifier to configure it upon construction
|
|
@@ -72,10 +75,10 @@ export declare class YAxisDragModifier extends ChartModifierBase2D implements II
|
|
|
72
75
|
type: string;
|
|
73
76
|
options: Required<Omit<IChartModifierBaseOptions, never>>;
|
|
74
77
|
};
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
protected updateCursor(mousePoint: Point): void;
|
|
79
|
+
protected doPanning(mousePoint: Point): void;
|
|
80
|
+
protected doScaling(pointTo: Point): void;
|
|
81
|
+
protected getVerticalYAxes(): AxisBase2D[];
|
|
82
|
+
protected getHorizontalYAxes(): AxisBase2D[];
|
|
83
|
+
protected startDragging(axes: AxisBase2D[], args: ModifierMouseArgs): void;
|
|
81
84
|
}
|
|
@@ -21,5 +21,8 @@ export declare enum PROPERTY {
|
|
|
21
21
|
TOOLTIP_DATA_TEMPLATE = "TOOLTIP_DATA_TEMPLATE",
|
|
22
22
|
X_AXIS_ID = "X_AXIS_ID",
|
|
23
23
|
Y_AXIS_ID = "Y_AXIS_ID",
|
|
24
|
-
PLACEMENT_DIV_ID = "PLACEMENT_DIV_ID"
|
|
24
|
+
PLACEMENT_DIV_ID = "PLACEMENT_DIV_ID",
|
|
25
|
+
X_LINE = "X_LINE",
|
|
26
|
+
Y_LINE = "Y_LINE",
|
|
27
|
+
AXIS_LABELS = "AXIS_LABELS"
|
|
25
28
|
}
|
|
@@ -26,4 +26,7 @@ var PROPERTY;
|
|
|
26
26
|
PROPERTY["X_AXIS_ID"] = "X_AXIS_ID";
|
|
27
27
|
PROPERTY["Y_AXIS_ID"] = "Y_AXIS_ID";
|
|
28
28
|
PROPERTY["PLACEMENT_DIV_ID"] = "PLACEMENT_DIV_ID";
|
|
29
|
+
PROPERTY["X_LINE"] = "X_LINE";
|
|
30
|
+
PROPERTY["Y_LINE"] = "Y_LINE";
|
|
31
|
+
PROPERTY["AXIS_LABELS"] = "AXIS_LABELS";
|
|
29
32
|
})(PROPERTY = exports.PROPERTY || (exports.PROPERTY = {}));
|
|
File without changes
|
|
File without changes
|
|
@@ -124,8 +124,12 @@ export declare class WebGlRenderContext2D implements IRenderContext2D {
|
|
|
124
124
|
*/
|
|
125
125
|
drawRect(rect: Rect, viewRect: Rect, strokePen?: IPen2D, fillBrush?: IBrush2D): void;
|
|
126
126
|
printBlendMode(): void;
|
|
127
|
-
/**
|
|
128
|
-
|
|
127
|
+
/**
|
|
128
|
+
* Get a native font. Fonts are cached and shared within webassembly so there is no need to cache them in JS.
|
|
129
|
+
* Set advanced: true if you are planning to rotate or scale the text.
|
|
130
|
+
* Set drawEarly: true if you are planning to call font.End() early. Otherwise all native text will be drawn at the end of the render cycle.
|
|
131
|
+
*/
|
|
132
|
+
getFont(labelStyle: TTextStyle, advanced?: boolean, drawEarly?: boolean): SCRTFont;
|
|
129
133
|
/** End all fonts, causing text to be drawn */
|
|
130
134
|
endFonts(force?: boolean): void;
|
|
131
135
|
}
|
|
@@ -291,12 +291,16 @@ var WebGlRenderContext2D = /** @class */ (function () {
|
|
|
291
291
|
throw new Error("Unhandled blendmode ");
|
|
292
292
|
}
|
|
293
293
|
};
|
|
294
|
-
/**
|
|
295
|
-
|
|
296
|
-
|
|
294
|
+
/**
|
|
295
|
+
* Get a native font. Fonts are cached and shared within webassembly so there is no need to cache them in JS.
|
|
296
|
+
* Set advanced: true if you are planning to rotate or scale the text.
|
|
297
|
+
* Set drawEarly: true if you are planning to call font.End() early. Otherwise all native text will be drawn at the end of the render cycle.
|
|
298
|
+
*/
|
|
299
|
+
WebGlRenderContext2D.prototype.getFont = function (labelStyle, advanced, drawEarly) {
|
|
300
|
+
var _this = this;
|
|
297
301
|
if (advanced === void 0) { advanced = false; }
|
|
298
|
-
if (
|
|
299
|
-
var fontKey = (0, NativeObject_1.getFontKey)(this.webAssemblyContext, labelStyle, advanced,
|
|
302
|
+
if (drawEarly === void 0) { drawEarly = false; }
|
|
303
|
+
var fontKey = (0, NativeObject_1.getFontKey)(this.webAssemblyContext, labelStyle, advanced, drawEarly);
|
|
300
304
|
var nativeContext = this.getNativeContext();
|
|
301
305
|
var nativeFont = nativeContext.AquireFont(fontKey);
|
|
302
306
|
if (!nativeFont) {
|
|
@@ -309,10 +313,15 @@ var WebGlRenderContext2D = /** @class */ (function () {
|
|
|
309
313
|
}
|
|
310
314
|
var currentFontName = nativeFont.GetFaceName();
|
|
311
315
|
if (currentFontName === "SCRT_Loading") {
|
|
312
|
-
|
|
316
|
+
setTimeout(function () { var _a; return _this.webAssemblyContext.TSRRequestCanvasDraw((_a = _this.canvasId) !== null && _a !== void 0 ? _a : "undefinedCanvasId"); }, 100);
|
|
313
317
|
}
|
|
314
318
|
else if (currentFontName !== fontKey.m_strName) {
|
|
315
|
-
|
|
319
|
+
// @ts-ignore
|
|
320
|
+
if (!fontKey.warned) {
|
|
321
|
+
console.warn("Font ".concat(fontKey.m_strName, " could not be found on the server and has not been registered. Falling back to Arial.\n Use await scichartSurface.registerFont if you need to load the font from a remote url"));
|
|
322
|
+
// @ts-ignore
|
|
323
|
+
fontKey.warned = true;
|
|
324
|
+
}
|
|
316
325
|
}
|
|
317
326
|
return nativeFont;
|
|
318
327
|
};
|
|
@@ -8,6 +8,7 @@ import { ChartLayoutState } from "./ChartLayoutState";
|
|
|
8
8
|
*/
|
|
9
9
|
export declare abstract class BaseAxisLayoutStrategy {
|
|
10
10
|
abstract readonly type: ELayoutStrategyType;
|
|
11
|
+
readonly isStacked: boolean;
|
|
11
12
|
/**
|
|
12
13
|
* The {@link LayoutAxisPartsStrategy} for current Axis Layout Strategy
|
|
13
14
|
*/
|
|
@@ -8,6 +8,7 @@ var AxisLayoutHelpers_1 = require("./AxisLayoutHelpers");
|
|
|
8
8
|
*/
|
|
9
9
|
var BaseAxisLayoutStrategy = /** @class */ (function () {
|
|
10
10
|
function BaseAxisLayoutStrategy() {
|
|
11
|
+
this.isStacked = false;
|
|
11
12
|
}
|
|
12
13
|
BaseAxisLayoutStrategy.prototype.toJSON = function () {
|
|
13
14
|
return { type: this.type };
|
|
@@ -41,6 +41,11 @@ var BottomAlignedInnerAxisLayoutStrategy = /** @class */ (function (_super) {
|
|
|
41
41
|
chartLayoutState.bottomInnerAreaSize = Math.max(chartLayoutState.bottomInnerAreaSize, requiredSize);
|
|
42
42
|
};
|
|
43
43
|
BottomAlignedInnerAxisLayoutStrategy.prototype.layoutAxes = function (left, top, right, bottom, axes) {
|
|
44
|
+
// Set axisLength to default value which is seriesViewRect.width
|
|
45
|
+
axes.forEach(function (axis) {
|
|
46
|
+
axis.axisLength = undefined;
|
|
47
|
+
axis.offset = 0;
|
|
48
|
+
});
|
|
44
49
|
if (axes.length === 0) {
|
|
45
50
|
return;
|
|
46
51
|
}
|
|
@@ -43,6 +43,11 @@ var BottomAlignedOuterAxisLayoutStrategy = /** @class */ (function (_super) {
|
|
|
43
43
|
chartLayoutState.bottomOuterAreaSize = Math.max(chartLayoutState.bottomOuterAreaSize, requiredSize);
|
|
44
44
|
};
|
|
45
45
|
BottomAlignedOuterAxisLayoutStrategy.prototype.layoutAxes = function (left, top, right, bottom, axes) {
|
|
46
|
+
// Set axisLength to default value which is seriesViewRect.width
|
|
47
|
+
axes.forEach(function (axis) {
|
|
48
|
+
axis.axisLength = undefined;
|
|
49
|
+
axis.offset = 0;
|
|
50
|
+
});
|
|
46
51
|
this.layoutAxesFromTopToBottom(left, top, right, bottom, axes);
|
|
47
52
|
};
|
|
48
53
|
return BottomAlignedOuterAxisLayoutStrategy;
|
|
@@ -8,6 +8,7 @@ import { ChartLayoutState } from "./ChartLayoutState";
|
|
|
8
8
|
*/
|
|
9
9
|
export declare class BottomAlignedOuterHorizontallyStackedAxisLayoutStrategy extends BaseAxisLayoutStrategy {
|
|
10
10
|
readonly type = ELayoutStrategyType.BottomStacked;
|
|
11
|
+
readonly isStacked: boolean;
|
|
11
12
|
constructor();
|
|
12
13
|
measureAxes(sciChartSurface: SciChartSurface, chartLayoutState: ChartLayoutState, axes: AxisBase2D[]): void;
|
|
13
14
|
layoutAxes(left: number, top: number, right: number, bottom: number, axes: AxisBase2D[]): void;
|
|
@@ -28,6 +28,7 @@ var BottomAlignedOuterHorizontallyStackedAxisLayoutStrategy = /** @class */ (fun
|
|
|
28
28
|
function BottomAlignedOuterHorizontallyStackedAxisLayoutStrategy() {
|
|
29
29
|
var _this = _super.call(this) || this;
|
|
30
30
|
_this.type = LayoutStrategyType_1.ELayoutStrategyType.BottomStacked;
|
|
31
|
+
_this.isStacked = true;
|
|
31
32
|
_this.layoutAxisPartsStrategy = AxisLayoutHelpers_1.layoutAxisPartsBottomStrategy;
|
|
32
33
|
return _this;
|
|
33
34
|
}
|
|
@@ -77,7 +78,6 @@ var BottomAlignedOuterHorizontallyStackedAxisLayoutStrategy = /** @class */ (fun
|
|
|
77
78
|
leftOffset += additionalLeftSize;
|
|
78
79
|
axis.offset = leftOffset - left;
|
|
79
80
|
axis.axisLength = rightOffset - leftOffset;
|
|
80
|
-
axis.isStackedAxis = true;
|
|
81
81
|
axis.isPrimaryAxis = true;
|
|
82
82
|
axis.viewRect = Rect_1.Rect.createWithCoords(leftOffset, topOffset, rightOffset, bottomOffset);
|
|
83
83
|
leftOffset = rightOffset + additionalRightSize;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { TLayoutManagerDefinition } from "../../Builder/buildSurface";
|
|
2
2
|
import { Rect } from "../../Core/Rect";
|
|
3
3
|
import { Thickness } from "../../Core/Thickness";
|
|
4
|
+
import { EAxisAlignment } from "../../types/AxisAlignment";
|
|
4
5
|
import { ELayoutManagerType } from "../../types/LayoutMangerType";
|
|
5
6
|
import { ELayoutStrategyType } from "../../types/LayoutStrategyType";
|
|
6
7
|
import { Size } from "../../types/Size";
|
|
@@ -41,19 +42,19 @@ export declare class LayoutManager {
|
|
|
41
42
|
/**
|
|
42
43
|
* Layout strategy for layout of left aligned axis outside
|
|
43
44
|
*/
|
|
44
|
-
|
|
45
|
+
protected leftOuterAxesLayoutStrategyProperty: BaseAxisLayoutStrategy;
|
|
45
46
|
/**
|
|
46
47
|
* Layout strategy for layout of right aligned axis outside
|
|
47
48
|
*/
|
|
48
|
-
|
|
49
|
+
protected rightOuterAxesLayoutStrategyProperty: BaseAxisLayoutStrategy;
|
|
49
50
|
/**
|
|
50
51
|
* Layout strategy for layout of top aligned axis outside
|
|
51
52
|
*/
|
|
52
|
-
|
|
53
|
+
protected topOuterAxesLayoutStrategyProperty: BaseAxisLayoutStrategy;
|
|
53
54
|
/**
|
|
54
55
|
* Layout strategy for layout of bottom aligned axis outside
|
|
55
56
|
*/
|
|
56
|
-
|
|
57
|
+
protected bottomOuterAxesLayoutStrategyProperty: BaseAxisLayoutStrategy;
|
|
57
58
|
/**
|
|
58
59
|
* Layout strategy for layout of left aligned inner axis
|
|
59
60
|
*/
|
|
@@ -74,6 +75,15 @@ export declare class LayoutManager {
|
|
|
74
75
|
protected chartLayoutState: ChartLayoutState;
|
|
75
76
|
protected axesGroupedByLayoutStrategy: LayoutStrategyAxes;
|
|
76
77
|
constructor(options?: ILayoutManagerOptions);
|
|
78
|
+
get leftOuterAxesLayoutStrategy(): BaseAxisLayoutStrategy;
|
|
79
|
+
set leftOuterAxesLayoutStrategy(value: BaseAxisLayoutStrategy);
|
|
80
|
+
get rightOuterAxesLayoutStrategy(): BaseAxisLayoutStrategy;
|
|
81
|
+
set rightOuterAxesLayoutStrategy(value: BaseAxisLayoutStrategy);
|
|
82
|
+
get topOuterAxesLayoutStrategy(): BaseAxisLayoutStrategy;
|
|
83
|
+
set topOuterAxesLayoutStrategy(value: BaseAxisLayoutStrategy);
|
|
84
|
+
get bottomOuterAxesLayoutStrategy(): BaseAxisLayoutStrategy;
|
|
85
|
+
set bottomOuterAxesLayoutStrategy(value: BaseAxisLayoutStrategy);
|
|
86
|
+
getAxisLayoutStrategy(axisAlignment: EAxisAlignment, isInnerAxis: boolean): BaseAxisLayoutStrategy;
|
|
77
87
|
layoutChart(viewportSize: Size, padding?: Thickness): Rect;
|
|
78
88
|
toJSON(): TLayoutManagerDefinition;
|
|
79
89
|
protected measureLeftOuterAxes(): void;
|
|
@@ -29,19 +29,19 @@ var LayoutManager = /** @class */ (function () {
|
|
|
29
29
|
/**
|
|
30
30
|
* Layout strategy for layout of left aligned axis outside
|
|
31
31
|
*/
|
|
32
|
-
this.
|
|
32
|
+
this.leftOuterAxesLayoutStrategyProperty = new LeftAlignedOuterAxisLayoutStrategy_1.LeftAlignedOuterAxisLayoutStrategy();
|
|
33
33
|
/**
|
|
34
34
|
* Layout strategy for layout of right aligned axis outside
|
|
35
35
|
*/
|
|
36
|
-
this.
|
|
36
|
+
this.rightOuterAxesLayoutStrategyProperty = new RightAlignedOuterAxisLayoutStrategy_1.RightAlignedOuterAxisLayoutStrategy();
|
|
37
37
|
/**
|
|
38
38
|
* Layout strategy for layout of top aligned axis outside
|
|
39
39
|
*/
|
|
40
|
-
this.
|
|
40
|
+
this.topOuterAxesLayoutStrategyProperty = new TopAlignedOuterAxisLayoutStrategy_1.TopAlignedOuterAxisLayoutStrategy();
|
|
41
41
|
/**
|
|
42
42
|
* Layout strategy for layout of bottom aligned axis outside
|
|
43
43
|
*/
|
|
44
|
-
this.
|
|
44
|
+
this.bottomOuterAxesLayoutStrategyProperty = new BottomAlignedOuterAxisLayoutStrategy_1.BottomAlignedOuterAxisLayoutStrategy();
|
|
45
45
|
/**
|
|
46
46
|
* Layout strategy for layout of left aligned inner axis
|
|
47
47
|
*/
|
|
@@ -69,6 +69,101 @@ var LayoutManager = /** @class */ (function () {
|
|
|
69
69
|
this.topInnerAxesLayoutStrategy = this.createStrategy(options === null || options === void 0 ? void 0 : options.TopInner, this.topInnerAxesLayoutStrategy);
|
|
70
70
|
this.bottomInnerAxesLayoutStrategy = this.createStrategy(options === null || options === void 0 ? void 0 : options.BottomInner, this.bottomInnerAxesLayoutStrategy);
|
|
71
71
|
}
|
|
72
|
+
Object.defineProperty(LayoutManager.prototype, "leftOuterAxesLayoutStrategy", {
|
|
73
|
+
get: function () {
|
|
74
|
+
return this.leftOuterAxesLayoutStrategyProperty;
|
|
75
|
+
},
|
|
76
|
+
set: function (value) {
|
|
77
|
+
var _a;
|
|
78
|
+
var currentValue = this.leftOuterAxesLayoutStrategyProperty;
|
|
79
|
+
if (currentValue !== value) {
|
|
80
|
+
this.leftOuterAxesLayoutStrategyProperty = value;
|
|
81
|
+
if (currentValue.isStacked && !value.isStacked) {
|
|
82
|
+
this.groupAxesByLayoutStrategy();
|
|
83
|
+
resetAxes(this.axesGroupedByLayoutStrategy.leftOuterAxes);
|
|
84
|
+
}
|
|
85
|
+
(_a = this.sciChartSurface) === null || _a === void 0 ? void 0 : _a.invalidateElement();
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
enumerable: false,
|
|
89
|
+
configurable: true
|
|
90
|
+
});
|
|
91
|
+
Object.defineProperty(LayoutManager.prototype, "rightOuterAxesLayoutStrategy", {
|
|
92
|
+
get: function () {
|
|
93
|
+
return this.rightOuterAxesLayoutStrategyProperty;
|
|
94
|
+
},
|
|
95
|
+
set: function (value) {
|
|
96
|
+
var _a;
|
|
97
|
+
var currentValue = this.rightOuterAxesLayoutStrategyProperty;
|
|
98
|
+
if (currentValue !== value) {
|
|
99
|
+
this.rightOuterAxesLayoutStrategyProperty = value;
|
|
100
|
+
if (currentValue.isStacked && !value.isStacked) {
|
|
101
|
+
this.groupAxesByLayoutStrategy();
|
|
102
|
+
resetAxes(this.axesGroupedByLayoutStrategy.rightOuterAxes);
|
|
103
|
+
}
|
|
104
|
+
(_a = this.sciChartSurface) === null || _a === void 0 ? void 0 : _a.invalidateElement();
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
enumerable: false,
|
|
108
|
+
configurable: true
|
|
109
|
+
});
|
|
110
|
+
Object.defineProperty(LayoutManager.prototype, "topOuterAxesLayoutStrategy", {
|
|
111
|
+
get: function () {
|
|
112
|
+
return this.topOuterAxesLayoutStrategyProperty;
|
|
113
|
+
},
|
|
114
|
+
set: function (value) {
|
|
115
|
+
var _a;
|
|
116
|
+
var currentValue = this.topOuterAxesLayoutStrategyProperty;
|
|
117
|
+
if (currentValue !== value) {
|
|
118
|
+
this.topOuterAxesLayoutStrategyProperty = value;
|
|
119
|
+
if (currentValue.isStacked && !value.isStacked) {
|
|
120
|
+
this.groupAxesByLayoutStrategy();
|
|
121
|
+
resetAxes(this.axesGroupedByLayoutStrategy.topOuterAxes);
|
|
122
|
+
}
|
|
123
|
+
(_a = this.sciChartSurface) === null || _a === void 0 ? void 0 : _a.invalidateElement();
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
enumerable: false,
|
|
127
|
+
configurable: true
|
|
128
|
+
});
|
|
129
|
+
Object.defineProperty(LayoutManager.prototype, "bottomOuterAxesLayoutStrategy", {
|
|
130
|
+
get: function () {
|
|
131
|
+
return this.bottomOuterAxesLayoutStrategyProperty;
|
|
132
|
+
},
|
|
133
|
+
set: function (value) {
|
|
134
|
+
var _a;
|
|
135
|
+
var currentValue = this.bottomOuterAxesLayoutStrategyProperty;
|
|
136
|
+
if (currentValue !== value) {
|
|
137
|
+
this.bottomOuterAxesLayoutStrategyProperty = value;
|
|
138
|
+
if (currentValue.isStacked && !value.isStacked) {
|
|
139
|
+
this.groupAxesByLayoutStrategy();
|
|
140
|
+
resetAxes(this.axesGroupedByLayoutStrategy.bottomOuterAxes);
|
|
141
|
+
}
|
|
142
|
+
(_a = this.sciChartSurface) === null || _a === void 0 ? void 0 : _a.invalidateElement();
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
enumerable: false,
|
|
146
|
+
configurable: true
|
|
147
|
+
});
|
|
148
|
+
LayoutManager.prototype.getAxisLayoutStrategy = function (axisAlignment, isInnerAxis) {
|
|
149
|
+
switch (axisAlignment) {
|
|
150
|
+
case AxisAlignment_1.EAxisAlignment.Left: {
|
|
151
|
+
return isInnerAxis ? this.leftInnerAxesLayoutStrategy : this.leftOuterAxesLayoutStrategy;
|
|
152
|
+
}
|
|
153
|
+
case AxisAlignment_1.EAxisAlignment.Right: {
|
|
154
|
+
return isInnerAxis ? this.rightInnerAxesLayoutStrategy : this.rightOuterAxesLayoutStrategy;
|
|
155
|
+
}
|
|
156
|
+
case AxisAlignment_1.EAxisAlignment.Top: {
|
|
157
|
+
return isInnerAxis ? this.topInnerAxesLayoutStrategy : this.topOuterAxesLayoutStrategy;
|
|
158
|
+
}
|
|
159
|
+
case AxisAlignment_1.EAxisAlignment.Bottom: {
|
|
160
|
+
return isInnerAxis ? this.bottomInnerAxesLayoutStrategy : this.bottomOuterAxesLayoutStrategy;
|
|
161
|
+
}
|
|
162
|
+
default: {
|
|
163
|
+
return (0, AxisAlignment_1.handleInvalidAxisAlignment)(axisAlignment);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
};
|
|
72
167
|
LayoutManager.prototype.layoutChart = function (viewportSize, padding) {
|
|
73
168
|
var _a, _b, _c, _d;
|
|
74
169
|
this.groupAxesByLayoutStrategy();
|
|
@@ -170,7 +265,7 @@ var LayoutManager = /** @class */ (function () {
|
|
|
170
265
|
var _a = this.axesGroupedByLayoutStrategy, topInnerAxes = _a.topInnerAxes, bottomInnerAxes = _a.bottomInnerAxes, leftInnerAxes = _a.leftInnerAxes, rightInnerAxes = _a.rightInnerAxes, topOuterAxes = _a.topOuterAxes, bottomOuterAxes = _a.bottomOuterAxes, leftOuterAxes = _a.leftOuterAxes, rightOuterAxes = _a.rightOuterAxes;
|
|
171
266
|
var groupAxes = function (axes) {
|
|
172
267
|
axes.forEach(function (axis) {
|
|
173
|
-
var axisAlignment = axis.axisAlignment, isInnerAxis = axis.isInnerAxis;
|
|
268
|
+
var axisAlignment = axis.axisAlignment, isInnerAxis = axis.isInnerAxis, isVisible = axis.isVisible;
|
|
174
269
|
if (isInnerAxis) {
|
|
175
270
|
switch (axisAlignment) {
|
|
176
271
|
case AxisAlignment_1.EAxisAlignment.Top:
|
|
@@ -240,3 +335,8 @@ var LayoutManager = /** @class */ (function () {
|
|
|
240
335
|
return LayoutManager;
|
|
241
336
|
}());
|
|
242
337
|
exports.LayoutManager = LayoutManager;
|
|
338
|
+
var resetAxes = function (axes) {
|
|
339
|
+
if (axes.length > 0) {
|
|
340
|
+
axes[0].isPrimaryAxis = true;
|
|
341
|
+
}
|
|
342
|
+
};
|