scichart 3.2.491 → 3.2.516
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/CursorModifier.js +3 -7
- package/Charting/ChartModifiers/RolloverModifier.js +1 -2
- package/Charting/ChartModifiers/VerticalSliceModifier.js +6 -0
- package/Charting/LayoutManager/SynchronizedLayoutManager.js +12 -0
- package/Charting/Numerics/TickCoordinateProviders/DefaultTickCoordinatesProvider.d.ts +5 -0
- package/Charting/Numerics/TickCoordinateProviders/DefaultTickCoordinatesProvider.js +11 -1
- package/Charting/Numerics/TickCoordinateProviders/StaticTickCoordinatesProvider.d.ts +19 -0
- package/Charting/Numerics/TickCoordinateProviders/StaticTickCoordinatesProvider.js +86 -0
- package/Charting/Numerics/TickCoordinateProviders/TickCoordinatesProvider.d.ts +2 -0
- package/Charting/Numerics/TickProviders/LogarithmicTickProvider.d.ts +1 -0
- package/Charting/Numerics/TickProviders/LogarithmicTickProvider.js +6 -1
- package/Charting/Visuals/Annotations/AxisMarkerAnnotation.js +1 -2
- package/Charting/Visuals/Annotations/BoxAnnotation.js +1 -2
- package/Charting/Visuals/Annotations/CursorTooltipSvgAnnotation.d.ts +1 -2
- package/Charting/Visuals/Annotations/CursorTooltipSvgAnnotation.js +2 -3
- package/Charting/Visuals/Annotations/LineAnnotation.js +1 -2
- package/Charting/Visuals/Annotations/NativeTextAnnotation.js +1 -2
- package/Charting/Visuals/Annotations/OverviewCustomResizableAnnotation.js +1 -2
- package/Charting/Visuals/Annotations/RolloverMarkerSvgAnnotation.js +1 -1
- package/Charting/Visuals/Annotations/RolloverTooltipSvgAnnotation.d.ts +1 -2
- package/Charting/Visuals/Annotations/RolloverTooltipSvgAnnotation.js +16 -17
- package/Charting/Visuals/Annotations/SvgAnnotationBase.d.ts +2 -0
- package/Charting/Visuals/Annotations/SvgAnnotationBase.js +11 -7
- package/Charting/Visuals/Axis/AxisBase2D.d.ts +14 -1
- package/Charting/Visuals/Axis/AxisBase2D.js +51 -19
- package/Charting/Visuals/Axis/AxisCore.d.ts +1 -1
- package/Charting/Visuals/Axis/DeltaCalculator/LogarithmicDeltaCalculator.d.ts +1 -0
- package/Charting/Visuals/Axis/DeltaCalculator/LogarithmicDeltaCalculator.js +13 -4
- package/Charting/Visuals/Axis/IAxisCoreOptions.d.ts +2 -2
- package/Charting/Visuals/Axis/LogarithmicAxis.d.ts +6 -1
- package/Charting/Visuals/Axis/LogarithmicAxis.js +27 -10
- package/Charting/Visuals/Axis/constants.d.ts +2 -1
- package/Charting/Visuals/Axis/constants.js +1 -0
- package/Charting/Visuals/Helpers/createPen.js +8 -0
- package/Charting/Visuals/Legend/SciChartLegendBase.d.ts +1 -1
- package/Charting/Visuals/Legend/SciChartLegendBase.js +8 -3
- package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.d.ts +7 -0
- package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.js +41 -16
- package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelProvider.js +1 -1
- package/Charting/Visuals/RenderableSeries/DataLabels/DataLabelState.js +4 -4
- package/Charting/Visuals/RenderableSeries/IBaseRenderableSeriesOptions.d.ts +5 -0
- package/Charting/Visuals/RenderableSeries/RolloverModifier/RolloverModifierRenderableSeriesProps.js +7 -2
- package/Charting/Visuals/RenderableSeries/constants.d.ts +2 -1
- package/Charting/Visuals/RenderableSeries/constants.js +1 -0
- package/Charting/Visuals/SciChartOverview.js +3 -2
- package/Charting/Visuals/SciChartPieSurface/IPieSurfaceOptions.d.ts +1 -0
- package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.js +9 -8
- package/Charting/Visuals/SciChartSurfaceBase.js +5 -1
- package/Charting3D/Visuals/Axis/AxisBase3D.d.ts +1 -1
- package/Core/BuildStamp.d.ts +1 -1
- package/Core/BuildStamp.js +2 -2
- package/README.md +10 -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/index.d.ts +1 -0
- package/index.dev.js +323 -123
- package/index.js +13 -11
- package/index.min.js +1 -1
- package/package.json +1 -1
- package/types/TSciChart.d.ts +18 -17
- package/types/TSciChart3D.d.ts +1 -0
|
@@ -43,6 +43,7 @@ var Pen2DCache_1 = require("../../Drawing/Pen2DCache");
|
|
|
43
43
|
var SolidBrushCache_1 = require("../../Drawing/SolidBrushCache");
|
|
44
44
|
var WebGlRenderContext2D_1 = require("../../Drawing/WebGlRenderContext2D");
|
|
45
45
|
var DefaultTickCoordinatesProvider_1 = require("../../Numerics/TickCoordinateProviders/DefaultTickCoordinatesProvider");
|
|
46
|
+
var StaticTickCoordinatesProvider_1 = require("../../Numerics/TickCoordinateProviders/StaticTickCoordinatesProvider");
|
|
46
47
|
var createNativeRect_1 = require("../Helpers/createNativeRect");
|
|
47
48
|
var drawBorder_1 = require("../Helpers/drawBorder");
|
|
48
49
|
var NativeObject_1 = require("../Helpers/NativeObject");
|
|
@@ -102,7 +103,7 @@ var AxisBase2D = /** @class */ (function (_super) {
|
|
|
102
103
|
*/
|
|
103
104
|
function AxisBase2D(webAssemblyContext, options) {
|
|
104
105
|
var _this = this;
|
|
105
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
106
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
106
107
|
_this = _super.call(this, options) || this;
|
|
107
108
|
/**
|
|
108
109
|
* Gets the {@link AxisLayoutState} class which manages layout
|
|
@@ -142,6 +143,7 @@ var AxisBase2D = /** @class */ (function (_super) {
|
|
|
142
143
|
_this.offsetOverrideProperty = undefined;
|
|
143
144
|
_this.tickCache = undefined;
|
|
144
145
|
_this.clipToXRangeProperty = true;
|
|
146
|
+
_this.isStaticAxisProperty = false;
|
|
145
147
|
_this.webAssemblyContext2D = webAssemblyContext;
|
|
146
148
|
_this.penCacheForMajorGridLines = new Pen2DCache_1.Pen2DCache(webAssemblyContext);
|
|
147
149
|
_this.penCacheForMinorGridLines = new Pen2DCache_1.Pen2DCache(webAssemblyContext);
|
|
@@ -156,16 +158,18 @@ var AxisBase2D = /** @class */ (function (_super) {
|
|
|
156
158
|
(_b = options === null || options === void 0 ? void 0 : options.hideOverlappingLabels) !== null && _b !== void 0 ? _b : _this.axisRenderer.hideOverlappingLabels;
|
|
157
159
|
_this.axisRenderer.axisThickness = (_c = options === null || options === void 0 ? void 0 : options.axisThickness) !== null && _c !== void 0 ? _c : _this.axisRenderer.axisThickness;
|
|
158
160
|
_this.axisTitleRenderer = new AxisTitleRenderer_1.AxisTitleRenderer(webAssemblyContext);
|
|
159
|
-
_this.
|
|
160
|
-
|
|
161
|
-
|
|
161
|
+
_this.isStaticAxis = (_d = options === null || options === void 0 ? void 0 : options.isStaticAxis) !== null && _d !== void 0 ? _d : _this.isStaticAxisProperty;
|
|
162
|
+
// setting isStaticAxis sets the tickCoordinatesProvider
|
|
163
|
+
//this.tickCoordinatesProvider = new DefaultTickCoordinatesProvider();
|
|
164
|
+
_this.visibleRangeLimit = (_e = options === null || options === void 0 ? void 0 : options.visibleRangeLimit) !== null && _e !== void 0 ? _e : _this.visibleRangeLimit;
|
|
165
|
+
_this.visibleRangeSizeLimit = (_f = options === null || options === void 0 ? void 0 : options.visibleRangeSizeLimit) !== null && _f !== void 0 ? _f : _this.visibleRangeSizeLimit;
|
|
162
166
|
_this.zoomExtentsRange = (options === null || options === void 0 ? void 0 : options.zoomExtentsToInitialRange) ? _this.visibleRange : options === null || options === void 0 ? void 0 : options.zoomExtentsRange;
|
|
163
|
-
_this.axisAlignment = (
|
|
164
|
-
_this.axisTitle = (
|
|
167
|
+
_this.axisAlignment = (_g = options === null || options === void 0 ? void 0 : options.axisAlignment) !== null && _g !== void 0 ? _g : _this.axisAlignment;
|
|
168
|
+
_this.axisTitle = (_h = options === null || options === void 0 ? void 0 : options.axisTitle) !== null && _h !== void 0 ? _h : _this.axisTitle;
|
|
165
169
|
_this.labelStyle = _this.getlabelStyleProxy(__assign(__assign({}, _this.labelStyle), options === null || options === void 0 ? void 0 : options.labelStyle));
|
|
166
170
|
_this.axisBorder = __assign(__assign({}, _this.axisBorder), options === null || options === void 0 ? void 0 : options.axisBorder);
|
|
167
|
-
_this.isInnerAxis = (
|
|
168
|
-
_this.stackedAxisLength = (
|
|
171
|
+
_this.isInnerAxis = (_j = options === null || options === void 0 ? void 0 : options.isInnerAxis) !== null && _j !== void 0 ? _j : _this.isInnerAxis;
|
|
172
|
+
_this.stackedAxisLength = (_k = options === null || options === void 0 ? void 0 : options.stackedAxisLength) !== null && _k !== void 0 ? _k : _this.stackedAxisLength;
|
|
169
173
|
_this.solidBrushCacheBorder = new SolidBrushCache_1.SolidBrushCache(webAssemblyContext);
|
|
170
174
|
if (options === null || options === void 0 ? void 0 : options.labelProvider) {
|
|
171
175
|
if (!("getLabels" in (options === null || options === void 0 ? void 0 : options.labelProvider))) {
|
|
@@ -173,9 +177,9 @@ var AxisBase2D = /** @class */ (function (_super) {
|
|
|
173
177
|
}
|
|
174
178
|
}
|
|
175
179
|
_this.autoRangeAnimationProperty = options === null || options === void 0 ? void 0 : options.autoRangeAnimation;
|
|
176
|
-
_this.backgroundColor = (
|
|
180
|
+
_this.backgroundColor = (_l = options === null || options === void 0 ? void 0 : options.backgroundColor) !== null && _l !== void 0 ? _l : _this.backgroundColor;
|
|
177
181
|
_this.offsetOverrideProperty = options === null || options === void 0 ? void 0 : options.overrideOffset; // undefined if not set
|
|
178
|
-
_this.clipToXRangeProperty = (
|
|
182
|
+
_this.clipToXRangeProperty = (_m = options === null || options === void 0 ? void 0 : options.clipToXRange) !== null && _m !== void 0 ? _m : _this.clipToXRange;
|
|
179
183
|
return _this;
|
|
180
184
|
}
|
|
181
185
|
Object.defineProperty(AxisBase2D.prototype, "labelProvider", {
|
|
@@ -595,6 +599,28 @@ var AxisBase2D = /** @class */ (function (_super) {
|
|
|
595
599
|
enumerable: false,
|
|
596
600
|
configurable: true
|
|
597
601
|
});
|
|
602
|
+
Object.defineProperty(AxisBase2D.prototype, "isStaticAxis", {
|
|
603
|
+
/**
|
|
604
|
+
* Gets whether the gridlines and axis labels keep their initial position when the visible range changes.
|
|
605
|
+
*/
|
|
606
|
+
get: function () {
|
|
607
|
+
return this.isStaticAxisProperty;
|
|
608
|
+
},
|
|
609
|
+
/**
|
|
610
|
+
* Sets whether the gridlines and axis labels keep their initial position when the visible range changes.
|
|
611
|
+
*/
|
|
612
|
+
set: function (value) {
|
|
613
|
+
this.isStaticAxisProperty = value;
|
|
614
|
+
if (value) {
|
|
615
|
+
this.tickCoordinatesProvider = new StaticTickCoordinatesProvider_1.StaticTickCoordinatesProvider();
|
|
616
|
+
}
|
|
617
|
+
else {
|
|
618
|
+
this.tickCoordinatesProvider = new DefaultTickCoordinatesProvider_1.DefaultTickCoordinatesProvider();
|
|
619
|
+
}
|
|
620
|
+
},
|
|
621
|
+
enumerable: false,
|
|
622
|
+
configurable: true
|
|
623
|
+
});
|
|
598
624
|
/** @inheritDoc */
|
|
599
625
|
AxisBase2D.prototype.applyTheme = function (themeProvider) {
|
|
600
626
|
var previousThemeProvider = this.parentSurface.previousThemeProvider;
|
|
@@ -1011,7 +1037,8 @@ var AxisBase2D = /** @class */ (function (_super) {
|
|
|
1011
1037
|
// @ts-ignore
|
|
1012
1038
|
labelProvider: this.labelProvider.toJSON(),
|
|
1013
1039
|
keepLabelsWithinAxis: this.axisRenderer.keepLabelsWithinAxis,
|
|
1014
|
-
clipToXRange: this.clipToXRange
|
|
1040
|
+
clipToXRange: this.clipToXRange,
|
|
1041
|
+
isStaticAxis: this.isStaticAxis
|
|
1015
1042
|
};
|
|
1016
1043
|
return { type: this.type, options: options };
|
|
1017
1044
|
};
|
|
@@ -1207,13 +1234,15 @@ var AxisBase2D = /** @class */ (function (_super) {
|
|
|
1207
1234
|
this.minorDeltaProperty = delta.min;
|
|
1208
1235
|
this.majorDeltaProperty = delta.max;
|
|
1209
1236
|
}
|
|
1237
|
+
// See if tickCoordinatesProvider has cached ticks (if isStaticAxis)
|
|
1238
|
+
var _c = this.tickCoordinatesProvider.getTickCoordinates(undefined, undefined), majorTickCoords = _c.majorTickCoords, minorTickCoords = _c.minorTickCoords, majorTickOverrides = _c.majorTickOverrides, minorTickOverRides = _c.minorTickOverRides;
|
|
1210
1239
|
var majorTicks = this.drawLabels || this.drawMajorGridLines || this.drawMajorTickLines
|
|
1211
|
-
? this.tickProvider.getMajorTicks((_a = this.minorDeltaProperty) !== null && _a !== void 0 ? _a : this.majorDeltaProperty / this.minorsPerMajor, this.majorDeltaProperty, this.visibleRange)
|
|
1240
|
+
? majorTickOverrides !== null && majorTickOverrides !== void 0 ? majorTickOverrides : this.tickProvider.getMajorTicks((_a = this.minorDeltaProperty) !== null && _a !== void 0 ? _a : this.majorDeltaProperty / this.minorsPerMajor, this.majorDeltaProperty, this.visibleRange)
|
|
1212
1241
|
: [];
|
|
1213
1242
|
var minorTicks = this.drawMinorGridLines || this.drawMinorTickLines
|
|
1214
|
-
? this.tickProvider.getMinorTicks((_b = this.minorDeltaProperty) !== null && _b !== void 0 ? _b : this.majorDeltaProperty / this.minorsPerMajor, this.majorDeltaProperty, this.visibleRange)
|
|
1243
|
+
? minorTickOverRides !== null && minorTickOverRides !== void 0 ? minorTickOverRides : this.tickProvider.getMinorTicks((_b = this.minorDeltaProperty) !== null && _b !== void 0 ? _b : this.majorDeltaProperty / this.minorsPerMajor, this.majorDeltaProperty, this.visibleRange)
|
|
1215
1244
|
: [];
|
|
1216
|
-
var
|
|
1245
|
+
var _d = this.visibleRange, min_1 = _d.min, max_1 = _d.max;
|
|
1217
1246
|
majorTicks = majorTicks.filter(function (t) { return t >= min_1 && t <= max_1; });
|
|
1218
1247
|
minorTicks = minorTicks.filter(function (t) { return t >= min_1 && t <= max_1; });
|
|
1219
1248
|
var majorTickLabels = [];
|
|
@@ -1226,9 +1255,9 @@ var AxisBase2D = /** @class */ (function (_super) {
|
|
|
1226
1255
|
this.tickCache = {
|
|
1227
1256
|
majorTicks: majorTicks,
|
|
1228
1257
|
majorTickLabels: majorTickLabels,
|
|
1229
|
-
majorTickCoords:
|
|
1258
|
+
majorTickCoords: majorTickCoords,
|
|
1230
1259
|
minorTicks: minorTicks,
|
|
1231
|
-
minorTickCoords:
|
|
1260
|
+
minorTickCoords: minorTickCoords // probably undefined unless isStaticAxis
|
|
1232
1261
|
};
|
|
1233
1262
|
}
|
|
1234
1263
|
return this.tickCache;
|
|
@@ -1237,9 +1266,12 @@ var AxisBase2D = /** @class */ (function (_super) {
|
|
|
1237
1266
|
if (!this.tickCache) {
|
|
1238
1267
|
this.getTicks(true);
|
|
1239
1268
|
}
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1269
|
+
if (this.tickCache.majorTickCoords === undefined) {
|
|
1270
|
+
var _a = this.tickCoordinatesProvider.getTickCoordinates(this.tickCache.majorTicks, this.tickCache.minorTicks), majorTickCoords = _a.majorTickCoords, minorTickCoords = _a.minorTickCoords;
|
|
1271
|
+
// tick values are never overridden at this point. If they could be, it would have been done in the call from measure.
|
|
1272
|
+
this.tickCache.majorTickCoords = majorTickCoords;
|
|
1273
|
+
this.tickCache.minorTickCoords = minorTickCoords;
|
|
1274
|
+
}
|
|
1243
1275
|
return this.tickCache;
|
|
1244
1276
|
};
|
|
1245
1277
|
AxisBase2D.prototype.applyVisibleRangeLimit = function (visibleRange) {
|
|
@@ -784,7 +784,7 @@ export declare abstract class AxisCore extends DeletableEntity implements IAxisP
|
|
|
784
784
|
/**
|
|
785
785
|
* Gets the long dimension of the axis, in pixels
|
|
786
786
|
*/
|
|
787
|
-
|
|
787
|
+
abstract getAxisSize(): number;
|
|
788
788
|
/**
|
|
789
789
|
* SET INTERNALLY. Sets whether this axis is an XAxis or not
|
|
790
790
|
* @remarks
|
|
@@ -11,6 +11,7 @@ export declare class LogarithmicDeltaCalculator extends DeltaCalculator {
|
|
|
11
11
|
* Gets or sets the logarithmic base. Defaults to 10
|
|
12
12
|
*/
|
|
13
13
|
logarithmicBase: number;
|
|
14
|
+
isHighPrecisionTicks: boolean;
|
|
14
15
|
private webAssemblyContext;
|
|
15
16
|
/**
|
|
16
17
|
* Creates an instance of the {@link LogarithmicDeltaCalculator}
|
|
@@ -36,6 +36,7 @@ var LogarithmicDeltaCalculator = /** @class */ (function (_super) {
|
|
|
36
36
|
* Gets or sets the logarithmic base. Defaults to 10
|
|
37
37
|
*/
|
|
38
38
|
_this.logarithmicBase = 10;
|
|
39
|
+
_this.isHighPrecisionTicks = true;
|
|
39
40
|
_this.webAssemblyContext = webAssemblyContext;
|
|
40
41
|
return _this;
|
|
41
42
|
}
|
|
@@ -54,10 +55,18 @@ var LogarithmicDeltaCalculator = /** @class */ (function (_super) {
|
|
|
54
55
|
min = max;
|
|
55
56
|
max = temp;
|
|
56
57
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
if (this.isHighPrecisionTicks) {
|
|
59
|
+
var delta = this.webAssemblyContext.NiceLogScale.CalculateTickSpacing(min, max, this.logarithmicBase, minorsPerMajor, maxTicks);
|
|
60
|
+
var tsDelta = new NumberRange_1.NumberRange(delta.minD, delta.maxD);
|
|
61
|
+
delta.delete();
|
|
62
|
+
return tsDelta;
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
var delta = this.webAssemblyContext.NiceLogScale.CalculateLowPrecisionTickSpacing(min, max, this.logarithmicBase, minorsPerMajor, maxTicks);
|
|
66
|
+
var tsDelta = new NumberRange_1.NumberRange(delta.minD, delta.maxD);
|
|
67
|
+
delta.delete();
|
|
68
|
+
return tsDelta;
|
|
69
|
+
}
|
|
61
70
|
};
|
|
62
71
|
return LogarithmicDeltaCalculator;
|
|
63
72
|
}(DeltaCalculator_1.DeltaCalculator));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NumberRange } from "../../../Core/NumberRange";
|
|
2
2
|
import { EAutoRange } from "../../../types/AutoRange";
|
|
3
|
-
import {
|
|
3
|
+
import { TAxisTitleStyle, TGridLineStyle, TTickLineStyle } from "./AxisCore";
|
|
4
4
|
/**
|
|
5
5
|
* Optional parameters passed to {@link AxisCore} constructor to set defaults at construction time
|
|
6
6
|
*/
|
|
@@ -70,7 +70,7 @@ export interface IAxisCoreOptions {
|
|
|
70
70
|
* @summary Sets the Axis Title style
|
|
71
71
|
* @remarks See {@link TTextStyle} for the type which contains style options
|
|
72
72
|
*/
|
|
73
|
-
axisTitleStyle?:
|
|
73
|
+
axisTitleStyle?: TAxisTitleStyle;
|
|
74
74
|
/**
|
|
75
75
|
* The maximum number of ticks on the axis when SciChart's Axis is in {@link AxisCore.autoTicks} mode
|
|
76
76
|
* @remarks
|
|
@@ -34,6 +34,8 @@ export interface ILogarithmicAxisOptions extends INumericAxisOptions {
|
|
|
34
34
|
* the first linear minor tick would be more than 70% of the major tick)
|
|
35
35
|
*/
|
|
36
36
|
minorTickMode?: ELogarithmicMinorTickMode;
|
|
37
|
+
/** If false, only ticks that are whole number multiples of the log base will be used */
|
|
38
|
+
isHighPrecisionTicks?: boolean;
|
|
37
39
|
}
|
|
38
40
|
/**
|
|
39
41
|
* Creates an instance of a {@link LogarithmicAxis}
|
|
@@ -45,6 +47,7 @@ export declare class LogarithmicAxis extends AxisBase2D {
|
|
|
45
47
|
readonly type = EAxisType.LogarithmicAxis;
|
|
46
48
|
private logBaseProperty;
|
|
47
49
|
private isNegativeProperty;
|
|
50
|
+
private isHighPrecisionTicksProperty;
|
|
48
51
|
constructor(wasmContext: TSciChart, options?: ILogarithmicAxisOptions);
|
|
49
52
|
/**
|
|
50
53
|
* Gets or sets the Logarithmic Base for the axis. Defaults to 10
|
|
@@ -56,6 +59,8 @@ export declare class LogarithmicAxis extends AxisBase2D {
|
|
|
56
59
|
set logBase(logBase: number);
|
|
57
60
|
get isNegative(): boolean;
|
|
58
61
|
set isNegative(isNegative: boolean);
|
|
62
|
+
get isHighPrecisionTicks(): boolean;
|
|
63
|
+
set isHighPrecisionTicks(isHighPrecisionTicks: boolean);
|
|
59
64
|
getDefaultNonZeroRange(): NumberRange;
|
|
60
65
|
hasValidVisibleRange(): boolean;
|
|
61
66
|
get tickProvider(): TickProvider;
|
|
@@ -102,5 +107,5 @@ export declare class LogarithmicAxis extends AxisBase2D {
|
|
|
102
107
|
protected getCurrentCoordinateCalculatorInternal(): CoordinateCalculatorBase;
|
|
103
108
|
protected getMaxXRange(): NumberRange;
|
|
104
109
|
private get logTickProvider();
|
|
105
|
-
private
|
|
110
|
+
private updateProviders;
|
|
106
111
|
}
|
|
@@ -39,10 +39,11 @@ var LogarithmicAxis = /** @class */ (function (_super) {
|
|
|
39
39
|
__extends(LogarithmicAxis, _super);
|
|
40
40
|
function LogarithmicAxis(wasmContext, options) {
|
|
41
41
|
var _this = this;
|
|
42
|
-
var _a, _b, _c;
|
|
42
|
+
var _a, _b, _c, _d;
|
|
43
43
|
_this = _super.call(this, wasmContext, options) || this;
|
|
44
44
|
_this.type = AxisType_1.EAxisType.LogarithmicAxis;
|
|
45
45
|
_this.logBaseProperty = 10;
|
|
46
|
+
_this.isHighPrecisionTicksProperty = true;
|
|
46
47
|
_this.tickProvider = new LogarithmicTickProvider_1.LogarithmicTickProvider(wasmContext);
|
|
47
48
|
_this.deltaCalculator = new LogarithmicDeltaCalculator_1.LogarithmicDeltaCalculator(wasmContext);
|
|
48
49
|
_this.labelProvider =
|
|
@@ -52,6 +53,7 @@ var LogarithmicAxis = /** @class */ (function (_super) {
|
|
|
52
53
|
_this.visibleRange = (options === null || options === void 0 ? void 0 : options.visibleRange) || _this.getDefaultNonZeroRange();
|
|
53
54
|
_this.majorTickMode = (options === null || options === void 0 ? void 0 : options.majorTickMode) || _this.majorTickMode;
|
|
54
55
|
_this.minorTickMode = (options === null || options === void 0 ? void 0 : options.minorTickMode) || _this.minorTickMode;
|
|
56
|
+
_this.isHighPrecisionTicks = (_d = options === null || options === void 0 ? void 0 : options.isHighPrecisionTicks) !== null && _d !== void 0 ? _d : _this.isHighPrecisionTicksProperty;
|
|
55
57
|
if (options === null || options === void 0 ? void 0 : options.visibleRangeLimit) {
|
|
56
58
|
_this.visibleRangeLimit = options.visibleRangeLimit;
|
|
57
59
|
}
|
|
@@ -80,7 +82,7 @@ var LogarithmicAxis = /** @class */ (function (_super) {
|
|
|
80
82
|
if (this.logBaseProperty !== logBase) {
|
|
81
83
|
this.logBaseProperty = logBase;
|
|
82
84
|
this.clearCoordCalcCache();
|
|
83
|
-
this.
|
|
85
|
+
this.updateProviders();
|
|
84
86
|
this.notifyPropertyChanged(constants_1.PROPERTY.LOG_BASE);
|
|
85
87
|
}
|
|
86
88
|
},
|
|
@@ -104,6 +106,18 @@ var LogarithmicAxis = /** @class */ (function (_super) {
|
|
|
104
106
|
enumerable: false,
|
|
105
107
|
configurable: true
|
|
106
108
|
});
|
|
109
|
+
Object.defineProperty(LogarithmicAxis.prototype, "isHighPrecisionTicks", {
|
|
110
|
+
get: function () {
|
|
111
|
+
return this.isHighPrecisionTicksProperty;
|
|
112
|
+
},
|
|
113
|
+
set: function (isHighPrecisionTicks) {
|
|
114
|
+
this.isHighPrecisionTicksProperty = isHighPrecisionTicks;
|
|
115
|
+
this.updateProviders();
|
|
116
|
+
this.notifyPropertyChanged(constants_1.PROPERTY.HIGH_PRECISION_TICKS);
|
|
117
|
+
},
|
|
118
|
+
enumerable: false,
|
|
119
|
+
configurable: true
|
|
120
|
+
});
|
|
107
121
|
LogarithmicAxis.prototype.getDefaultNonZeroRange = function () {
|
|
108
122
|
var adj = this.isNegativeProperty ? -1 : 1;
|
|
109
123
|
return new NumberRange_1.NumberRange(adj * Math.pow(this.logBase, -1), adj * Math.pow(this.logBase, 2));
|
|
@@ -117,7 +131,7 @@ var LogarithmicAxis = /** @class */ (function (_super) {
|
|
|
117
131
|
},
|
|
118
132
|
set: function (tickProvider) {
|
|
119
133
|
this.tickProviderProperty = tickProvider;
|
|
120
|
-
this.
|
|
134
|
+
this.updateProviders();
|
|
121
135
|
this.notifyPropertyChanged(constants_1.PROPERTY.TICK_PROVIDER);
|
|
122
136
|
},
|
|
123
137
|
enumerable: false,
|
|
@@ -129,7 +143,7 @@ var LogarithmicAxis = /** @class */ (function (_super) {
|
|
|
129
143
|
},
|
|
130
144
|
set: function (deltaCalculator) {
|
|
131
145
|
this.deltaCalculatorProperty = deltaCalculator;
|
|
132
|
-
this.
|
|
146
|
+
this.updateProviders();
|
|
133
147
|
this.notifyPropertyChanged(constants_1.PROPERTY.DELTA_CALCULATOR);
|
|
134
148
|
},
|
|
135
149
|
enumerable: false,
|
|
@@ -141,7 +155,7 @@ var LogarithmicAxis = /** @class */ (function (_super) {
|
|
|
141
155
|
},
|
|
142
156
|
set: function (labelProvider) {
|
|
143
157
|
this.labelProviderProperty = labelProvider;
|
|
144
|
-
this.
|
|
158
|
+
this.updateProviders();
|
|
145
159
|
this.notifyPropertyChanged(constants_1.PROPERTY.LABEL_PROVIDER);
|
|
146
160
|
},
|
|
147
161
|
enumerable: false,
|
|
@@ -268,7 +282,8 @@ var LogarithmicAxis = /** @class */ (function (_super) {
|
|
|
268
282
|
logBase: this.logBase,
|
|
269
283
|
isNegative: this.isNegative,
|
|
270
284
|
majorTickMode: this.majorTickMode,
|
|
271
|
-
minorTickMode: this.minorTickMode
|
|
285
|
+
minorTickMode: this.minorTickMode,
|
|
286
|
+
isHighPrecisionTicks: this.isHighPrecisionTicks
|
|
272
287
|
};
|
|
273
288
|
Object.assign(json.options, options);
|
|
274
289
|
return json;
|
|
@@ -300,18 +315,20 @@ var LogarithmicAxis = /** @class */ (function (_super) {
|
|
|
300
315
|
enumerable: false,
|
|
301
316
|
configurable: true
|
|
302
317
|
});
|
|
303
|
-
LogarithmicAxis.prototype.
|
|
318
|
+
LogarithmicAxis.prototype.updateProviders = function () {
|
|
304
319
|
var logTickProvider = this.tickProvider;
|
|
305
320
|
if (logTickProvider) {
|
|
306
|
-
logTickProvider.logarithmicBase = logBase;
|
|
321
|
+
logTickProvider.logarithmicBase = this.logBase;
|
|
322
|
+
logTickProvider.isHighPrecisionTicks = this.isHighPrecisionTicks;
|
|
307
323
|
}
|
|
308
324
|
var logDeltaCalculator = this.deltaCalculator;
|
|
309
325
|
if (logDeltaCalculator) {
|
|
310
|
-
logDeltaCalculator.logarithmicBase = logBase;
|
|
326
|
+
logDeltaCalculator.logarithmicBase = this.logBase;
|
|
327
|
+
logDeltaCalculator.isHighPrecisionTicks = this.isHighPrecisionTicks;
|
|
311
328
|
}
|
|
312
329
|
var logLabelProvider = this.labelProvider;
|
|
313
330
|
if (logLabelProvider) {
|
|
314
|
-
logLabelProvider.logarithmicBase = logBase;
|
|
331
|
+
logLabelProvider.logarithmicBase = this.logBase;
|
|
315
332
|
}
|
|
316
333
|
};
|
|
317
334
|
return LogarithmicAxis;
|
|
@@ -46,5 +46,6 @@ export declare enum PROPERTY {
|
|
|
46
46
|
TICK_PROVIDER = "TICK_PROVIDER",
|
|
47
47
|
VIEW_RECT = "VIEW_RECT",
|
|
48
48
|
ZOOMEXTENTS_RANGE = "ZOOMEXTENTS_RANGE",
|
|
49
|
-
DRAW_ONLY_WITHIN_XRANGE = "DRAW_ONLY_WITHIN_XRANGE"
|
|
49
|
+
DRAW_ONLY_WITHIN_XRANGE = "DRAW_ONLY_WITHIN_XRANGE",
|
|
50
|
+
HIGH_PRECISION_TICKS = "HIGH_PRECISION_TICKS"
|
|
50
51
|
}
|
|
@@ -51,4 +51,5 @@ var PROPERTY;
|
|
|
51
51
|
PROPERTY["VIEW_RECT"] = "VIEW_RECT";
|
|
52
52
|
PROPERTY["ZOOMEXTENTS_RANGE"] = "ZOOMEXTENTS_RANGE";
|
|
53
53
|
PROPERTY["DRAW_ONLY_WITHIN_XRANGE"] = "DRAW_ONLY_WITHIN_XRANGE";
|
|
54
|
+
PROPERTY["HIGH_PRECISION_TICKS"] = "HIGH_PRECISION_TICKS";
|
|
54
55
|
})(PROPERTY = exports.PROPERTY || (exports.PROPERTY = {}));
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createSCRTPen = void 0;
|
|
4
4
|
var app_1 = require("../../../constants/app");
|
|
5
|
+
var MemoryUsageHelper_1 = require("../../../utils/MemoryUsageHelper");
|
|
5
6
|
var colorUtil_1 = require("../../../utils/colorUtil");
|
|
6
7
|
var parseColor_1 = require("../../../utils/parseColor");
|
|
7
8
|
/**
|
|
@@ -27,6 +28,13 @@ var createSCRTPen = function (wasmContext, htmlColorCode, strokeThickness, opaci
|
|
|
27
28
|
if (strokeDashArray && strokeDashArray.length) {
|
|
28
29
|
// Create a dashed pen
|
|
29
30
|
var strokeDashFloatVector_1 = new wasmContext.FloatVector();
|
|
31
|
+
if (process.env.NODE_ENV !== "production") {
|
|
32
|
+
// prevent unnecessary warning
|
|
33
|
+
if (MemoryUsageHelper_1.MemoryUsageHelper.isMemoryUsageDebugEnabled) {
|
|
34
|
+
var vectorId = MemoryUsageHelper_1.MemoryUsageHelper.objectRegistry.getObjectId(strokeDashFloatVector_1);
|
|
35
|
+
MemoryUsageHelper_1.MemoryUsageHelper.unregister(vectorId);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
30
38
|
strokeDashArray.forEach(function (item) { return strokeDashFloatVector_1.push_back(item); });
|
|
31
39
|
return wasmContext.SCRTCreateDahedPen(colorArgb, strokeThickness, antiAliased, strokeDashFloatVector_1);
|
|
32
40
|
}
|
|
@@ -235,4 +235,4 @@ export declare abstract class SciChartLegendBase extends DeletableEntity impleme
|
|
|
235
235
|
protected getParentDiv(): HTMLDivElement;
|
|
236
236
|
}
|
|
237
237
|
export declare const getLegendItemHtml: (orientation: ELegendOrientation, showCheckboxes: boolean, showSeriesMarkers: boolean, item: TLegendItem) => string;
|
|
238
|
-
export declare const getLegendContainerHtml: (placement: ELegendPlacement, textColor: string, backgroundColor: string, margin: Thickness, body: string) => string;
|
|
238
|
+
export declare const getLegendContainerHtml: (placement: ELegendPlacement, textColor: string, backgroundColor: string, margin: Thickness, body: string, isExternal?: boolean) => string;
|
|
@@ -297,7 +297,7 @@ var SciChartLegendBase = /** @class */ (function (_super) {
|
|
|
297
297
|
var _a;
|
|
298
298
|
return (prev + _this.getLegendItemHTML(orientation, showCheckboxes, (_a = curr.showMarker) !== null && _a !== void 0 ? _a : showSeriesMarkers, curr));
|
|
299
299
|
}, "");
|
|
300
|
-
return (0, exports.getLegendContainerHtml)(placement, textColor, backgroundColor, margin, body);
|
|
300
|
+
return (0, exports.getLegendContainerHtml)(placement, textColor, backgroundColor, margin, body, this.isExternal());
|
|
301
301
|
};
|
|
302
302
|
/**
|
|
303
303
|
* Gets HTML string for legend items
|
|
@@ -368,11 +368,16 @@ var getLegendItemHtml = function (orientation, showCheckboxes, showSeriesMarkers
|
|
|
368
368
|
return str;
|
|
369
369
|
};
|
|
370
370
|
exports.getLegendItemHtml = getLegendItemHtml;
|
|
371
|
-
var getLegendContainerHtml = function (placement, textColor, backgroundColor, margin, body) {
|
|
371
|
+
var getLegendContainerHtml = function (placement, textColor, backgroundColor, margin, body, isExternal) {
|
|
372
|
+
if (isExternal === void 0) { isExternal = false; }
|
|
372
373
|
if (!body)
|
|
373
374
|
return "";
|
|
374
375
|
//const float = [ELegendPlacement.TopLeft, ELegendPlacement.BottomLeft].includes(placement) ? "left" : "right";
|
|
376
|
+
var position = "";
|
|
375
377
|
var positionStyle = "";
|
|
378
|
+
if (!isExternal) {
|
|
379
|
+
position = "position: absolute;";
|
|
380
|
+
}
|
|
376
381
|
if (placement === ELegendPlacement.TopLeft) {
|
|
377
382
|
positionStyle = "left: 0; top: 0;";
|
|
378
383
|
}
|
|
@@ -385,7 +390,7 @@ var getLegendContainerHtml = function (placement, textColor, backgroundColor, ma
|
|
|
385
390
|
else if (placement === ELegendPlacement.BottomRight) {
|
|
386
391
|
positionStyle = "right: 0; bottom: 0;";
|
|
387
392
|
}
|
|
388
|
-
var htmlStr = "<div class=\"scichart__legend\" style=\"height: 100%; position
|
|
393
|
+
var htmlStr = "<div class=\"scichart__legend\" style=\"height: 100%; ".concat(position, " display: flex; ").concat(positionStyle, " text-align: center;\">");
|
|
389
394
|
var alignSelf = [ELegendPlacement.TopLeft, ELegendPlacement.TopRight].includes(placement)
|
|
390
395
|
? "flex-start"
|
|
391
396
|
: "flex-end";
|
|
@@ -91,6 +91,7 @@ export declare abstract class BaseRenderableSeries extends DeletableEntity imple
|
|
|
91
91
|
private isHoveredProperty;
|
|
92
92
|
private resamplingModeProperty;
|
|
93
93
|
private resamplingPrecisionProperty;
|
|
94
|
+
private clipToYRangeProperty;
|
|
94
95
|
/**
|
|
95
96
|
* Creates an instance of the {@link BaseRenderableSeries}
|
|
96
97
|
* @param webAssemblyContext The {@link TSciChart | SciChart WebAssembly Context} containing
|
|
@@ -186,6 +187,12 @@ export declare abstract class BaseRenderableSeries extends DeletableEntity imple
|
|
|
186
187
|
*/
|
|
187
188
|
get resamplingPrecision(): number;
|
|
188
189
|
set resamplingPrecision(value: number);
|
|
190
|
+
/**
|
|
191
|
+
* If true, the drawing will be clipped to the visibleRange of the associated Y Axis.
|
|
192
|
+
* This is only really relevant if you are using Stacked Y Axes and do not want the series to be drawn outside that axis range
|
|
193
|
+
*/
|
|
194
|
+
get clipToYRange(): boolean;
|
|
195
|
+
set clipToYRange(value: boolean);
|
|
189
196
|
/** @inheritDoc */
|
|
190
197
|
get isSpline(): boolean;
|
|
191
198
|
/** @inheritDoc */
|
|
@@ -50,6 +50,7 @@ var SeriesHoveredArgs_1 = require("./SeriesHoveredArgs");
|
|
|
50
50
|
var SeriesSelectedArgs_1 = require("./SeriesSelectedArgs");
|
|
51
51
|
var SeriesVisibleChangedArgs_1 = require("./SeriesVisibleChangedArgs");
|
|
52
52
|
var DataLabelProviderType_1 = require("../../../types/DataLabelProviderType");
|
|
53
|
+
var Rect_1 = require("../../../Core/Rect");
|
|
53
54
|
var DeletableEntity_1 = require("../../../Core/DeletableEntity");
|
|
54
55
|
var XyzSeriesInfo_1 = require("../../Model/ChartData/XyzSeriesInfo");
|
|
55
56
|
/**
|
|
@@ -72,7 +73,7 @@ var BaseRenderableSeries = /** @class */ (function (_super) {
|
|
|
72
73
|
*/
|
|
73
74
|
function BaseRenderableSeries(webAssemblyContext, options) {
|
|
74
75
|
var _this = this;
|
|
75
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
76
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
76
77
|
_this = _super.call(this) || this;
|
|
77
78
|
/** @inheritDoc */
|
|
78
79
|
_this.rolloverModifierProps = new RolloverModifierRenderableSeriesProps_1.RolloverModifierRenderableSeriesProps(_this);
|
|
@@ -99,6 +100,7 @@ var BaseRenderableSeries = /** @class */ (function (_super) {
|
|
|
99
100
|
_this.isDigitalLineProperty = false;
|
|
100
101
|
_this.resamplingModeProperty = ResamplingMode_1.EResamplingMode.Auto;
|
|
101
102
|
_this.resamplingPrecisionProperty = 0;
|
|
103
|
+
_this.clipToYRangeProperty = false;
|
|
102
104
|
_this.isStacked = false;
|
|
103
105
|
_this.webAssemblyContext = webAssemblyContext;
|
|
104
106
|
_this.id = (_a = options === null || options === void 0 ? void 0 : options.id) !== null && _a !== void 0 ? _a : (0, guid_1.generateGuid)();
|
|
@@ -155,6 +157,7 @@ var BaseRenderableSeries = /** @class */ (function (_super) {
|
|
|
155
157
|
_this.hitTestProvider = _this.newHitTestProvider();
|
|
156
158
|
_this.isSelected = (_q = options === null || options === void 0 ? void 0 : options.isSelected) !== null && _q !== void 0 ? _q : false;
|
|
157
159
|
_this.isHovered = (_r = options === null || options === void 0 ? void 0 : options.isHovered) !== null && _r !== void 0 ? _r : false;
|
|
160
|
+
_this.clipToYRangeProperty = (_s = options === null || options === void 0 ? void 0 : options.clipToYRange) !== null && _s !== void 0 ? _s : _this.clipToYRangeProperty;
|
|
158
161
|
if (options === null || options === void 0 ? void 0 : options.onIsVisibleChanged) {
|
|
159
162
|
if (typeof options.onIsVisibleChanged === "string") {
|
|
160
163
|
_this.typeMap.set("onIsVisibleChanged", options.onIsVisibleChanged);
|
|
@@ -563,6 +566,23 @@ var BaseRenderableSeries = /** @class */ (function (_super) {
|
|
|
563
566
|
enumerable: false,
|
|
564
567
|
configurable: true
|
|
565
568
|
});
|
|
569
|
+
Object.defineProperty(BaseRenderableSeries.prototype, "clipToYRange", {
|
|
570
|
+
/**
|
|
571
|
+
* If true, the drawing will be clipped to the visibleRange of the associated Y Axis.
|
|
572
|
+
* This is only really relevant if you are using Stacked Y Axes and do not want the series to be drawn outside that axis range
|
|
573
|
+
*/
|
|
574
|
+
get: function () {
|
|
575
|
+
return this.clipToYRangeProperty;
|
|
576
|
+
},
|
|
577
|
+
set: function (value) {
|
|
578
|
+
if (this.clipToYRangeProperty !== value) {
|
|
579
|
+
this.clipToYRangeProperty = value;
|
|
580
|
+
this.notifyPropertyChanged(constants_1.PROPERTY.CLIPTOYRANGE);
|
|
581
|
+
}
|
|
582
|
+
},
|
|
583
|
+
enumerable: false,
|
|
584
|
+
configurable: true
|
|
585
|
+
});
|
|
566
586
|
Object.defineProperty(BaseRenderableSeries.prototype, "isSpline", {
|
|
567
587
|
/** @inheritDoc */
|
|
568
588
|
get: function () {
|
|
@@ -573,29 +593,33 @@ var BaseRenderableSeries = /** @class */ (function (_super) {
|
|
|
573
593
|
});
|
|
574
594
|
/** @inheritDoc */
|
|
575
595
|
BaseRenderableSeries.prototype.draw = function (renderContext, renderPassData) {
|
|
576
|
-
var _a;
|
|
596
|
+
var _a, _b;
|
|
577
597
|
this.currentRenderPassData = renderPassData;
|
|
578
598
|
(_a = this.hitTestProvider) === null || _a === void 0 ? void 0 : _a.update(renderPassData);
|
|
579
599
|
if (this.canDraw) {
|
|
580
|
-
|
|
581
|
-
|
|
600
|
+
var nativeContext = renderContext.getNativeContext();
|
|
601
|
+
var viewRect = (_b = this.parentSurface) === null || _b === void 0 ? void 0 : _b.seriesViewRect;
|
|
582
602
|
try {
|
|
583
603
|
renderContext.pushShaderEffect(this.effect);
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
604
|
+
if (this.clipToYRange) {
|
|
605
|
+
var _c = renderPassData.xCoordinateCalculator, x = _c.offset, width = _c.viewportDimension;
|
|
606
|
+
var _d = renderPassData.yCoordinateCalculator, y = _d.offset, height = _d.viewportDimension;
|
|
607
|
+
if (renderPassData.isVerticalChart) {
|
|
608
|
+
var clipRect = new Rect_1.Rect(viewRect.x + y, viewRect.y + x, height, width);
|
|
609
|
+
nativeContext.SetClipRect(clipRect.x, clipRect.y, clipRect.width, clipRect.height);
|
|
610
|
+
}
|
|
611
|
+
else {
|
|
612
|
+
var clipRect = new Rect_1.Rect(viewRect.x + x, viewRect.y + y, width, height);
|
|
613
|
+
nativeContext.SetClipRect(clipRect.x, clipRect.y, clipRect.width, clipRect.height);
|
|
614
|
+
}
|
|
615
|
+
}
|
|
595
616
|
this.drawingProviders.forEach(function (dp) { return dp.draw(renderContext, renderPassData); });
|
|
596
617
|
}
|
|
597
618
|
finally {
|
|
598
|
-
|
|
619
|
+
if (this.clipToYRange) {
|
|
620
|
+
// Reset clip rect
|
|
621
|
+
nativeContext.SetClipRect(viewRect.x, viewRect.y, viewRect.width, viewRect.height);
|
|
622
|
+
}
|
|
599
623
|
renderContext.popShaderEffect();
|
|
600
624
|
}
|
|
601
625
|
if (this.dataLabelProvider) {
|
|
@@ -774,6 +798,7 @@ var BaseRenderableSeries = /** @class */ (function (_super) {
|
|
|
774
798
|
animation: this.animation,
|
|
775
799
|
resamplingMode: this.resamplingMode,
|
|
776
800
|
resamplingPrecision: this.resamplingPrecision,
|
|
801
|
+
clipToYRange: this.clipToYRange,
|
|
777
802
|
// @ts-ignore
|
|
778
803
|
dataLabelProvider: (_c = this.dataLabelProvider) === null || _c === void 0 ? void 0 : _c.toJSON()
|
|
779
804
|
// onSelectedChanged: this.onSelectedChanged
|
|
@@ -271,7 +271,7 @@ var DataLabelProvider = /** @class */ (function (_super) {
|
|
|
271
271
|
var firstlabel = this.getText(state);
|
|
272
272
|
var bounds = (0, NativeObject_1.getTextBounds)(this.webAssemblyContext);
|
|
273
273
|
state.font.CalculateStringBounds(firstlabel !== null && firstlabel !== void 0 ? firstlabel : "", bounds, (_b = (_a = this.style) === null || _a === void 0 ? void 0 : _a.lineSpacing) !== null && _b !== void 0 ? _b : 2);
|
|
274
|
-
return state.pointGap
|
|
274
|
+
return state.pointGap >= bounds.m_fWidth * this.pointGapThreshold;
|
|
275
275
|
};
|
|
276
276
|
DataLabelProvider.prototype.getPosition = function (state, textBounds) {
|
|
277
277
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
@@ -30,7 +30,7 @@ var DataLabelState = /** @class */ (function () {
|
|
|
30
30
|
var indicesRange = this.parentSeries.getIndicesRange(new NumberRange_1.NumberRange(renderPassData.xCoordinateCalculator.visibleMin, renderPassData.xCoordinateCalculator.visibleMax), isCategoryAxis);
|
|
31
31
|
this.indexStart = indicesRange.min;
|
|
32
32
|
this.indexEnd = indicesRange.max;
|
|
33
|
-
this.pointCount =
|
|
33
|
+
this.pointCount = renderPassData.indexRange.diff + 1;
|
|
34
34
|
if (this.pointCount > 1) {
|
|
35
35
|
this.pointGap = renderPassData.isVerticalChart
|
|
36
36
|
? Math.abs(this.yCoord(this.indexStart) - this.yCoord(this.indexEnd)) / this.pointCount
|
|
@@ -40,9 +40,9 @@ var DataLabelState = /** @class */ (function () {
|
|
|
40
40
|
this.pointGap = Infinity; // Single point
|
|
41
41
|
}
|
|
42
42
|
else {
|
|
43
|
-
this.indexStart = renderPassData.indexRange.min;
|
|
44
|
-
this.pointCount = renderPassData.indexRange.diff + 1;
|
|
45
|
-
this.indexEnd = renderPassData.indexRange.max;
|
|
43
|
+
this.indexStart = pointSeries.resampled ? 0 : renderPassData.indexRange.min;
|
|
44
|
+
this.pointCount = pointSeries.resampled ? pointSeries.count : renderPassData.indexRange.diff + 1;
|
|
45
|
+
this.indexEnd = pointSeries.resampled ? pointSeries.count - 1 : renderPassData.indexRange.max;
|
|
46
46
|
if (this.pointCount > 1) {
|
|
47
47
|
this.pointGap = renderPassData.isVerticalChart
|
|
48
48
|
? Math.abs(this.yCoord(this.indexStart) - this.yCoord(this.indexEnd)) / this.pointCount
|
|
@@ -180,4 +180,9 @@ export interface IBaseRenderableSeriesOptions {
|
|
|
180
180
|
* A {@link SeriesTextProvider} used for creating and drawing per-point text.
|
|
181
181
|
*/
|
|
182
182
|
dataLabelProvider?: BaseDataLabelProvider | TDataLabelProviderDefinition;
|
|
183
|
+
/**
|
|
184
|
+
* If true, the drawing will be clipped to the visibleRange of the associated Y Axis.
|
|
185
|
+
* This is only really relevant if you are using Stacked Y Axes and do not want the series to be drawn outside that axis range
|
|
186
|
+
*/
|
|
187
|
+
clipToYRange?: boolean;
|
|
183
188
|
}
|