scichart 2.1.2273 → 2.1.2290

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.
Files changed (32) hide show
  1. package/Builder/buildSeries.d.ts +5 -0
  2. package/Builder/buildSeries.js +4 -0
  3. package/Charting/Themes/IThemeProvider.d.ts +6 -0
  4. package/Charting/Themes/SciChartJSDarkTheme.d.ts +2 -0
  5. package/Charting/Themes/SciChartJSDarkTheme.js +2 -0
  6. package/Charting/Themes/SciChartJSLightTheme.d.ts +2 -0
  7. package/Charting/Themes/SciChartJSLightTheme.js +2 -0
  8. package/Charting/Visuals/Axis/CategoryAxisBase.d.ts +5 -0
  9. package/Charting/Visuals/Axis/CategoryAxisBase.js +19 -9
  10. package/Charting/Visuals/RenderableSeries/Animations/animationHelpers.d.ts +1 -1
  11. package/Charting/Visuals/RenderableSeries/DrawingProviders/UniformContoursDrawingProvider.js +30 -8
  12. package/Charting/Visuals/RenderableSeries/DrawingProviders/UniformHeatmapDrawingProvider.js +6 -2
  13. package/Charting/Visuals/RenderableSeries/FastColumnRenderableSeries.d.ts +1 -1
  14. package/Charting/Visuals/RenderableSeries/FastImpulseRenderableSeries.d.ts +84 -0
  15. package/Charting/Visuals/RenderableSeries/FastImpulseRenderableSeries.js +179 -0
  16. package/Charting/Visuals/RenderableSeries/HitTest/ImpulseSeriesHitTestProvider.d.ts +20 -0
  17. package/Charting/Visuals/RenderableSeries/HitTest/ImpulseSeriesHitTestProvider.js +100 -0
  18. package/Charting/Visuals/RenderableSeries/HitTest/hitTestHelpers.d.ts +2 -0
  19. package/Charting/Visuals/RenderableSeries/HitTest/hitTestHelpers.js +14 -1
  20. package/Core/BuildStamp.d.ts +1 -1
  21. package/Core/BuildStamp.js +2 -2
  22. package/_wasm/scichart.browser.js +1 -1
  23. package/_wasm/scichart2d.js +95 -95
  24. package/_wasm/scichart2d.wasm +0 -0
  25. package/_wasm/scichart3d.js +95 -95
  26. package/_wasm/scichart3d.wasm +0 -0
  27. package/constants/performanceWarnings.js +2 -2
  28. package/package.json +1 -1
  29. package/types/SeriesType.d.ts +2 -0
  30. package/types/SeriesType.js +2 -0
  31. package/utils/pointUtil.d.ts +1 -1
  32. package/utils/pointUtil.js +3 -2
@@ -0,0 +1,100 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.ImpulseSeriesHitTestProvider = void 0;
19
+ var pointUtil_1 = require("../../../../utils/pointUtil");
20
+ var DpiHelper_1 = require("../../TextureManager/DpiHelper");
21
+ var BaseHitTestProvider_1 = require("./BaseHitTestProvider");
22
+ var hitTestHelpers_1 = require("./hitTestHelpers");
23
+ var HitTestInfo_1 = require("./HitTestInfo");
24
+ /**
25
+ * Hit-test provider for {@link FastColumnRenderableSeries}. See base class {@link BaseHitTestProvider} for further info
26
+ */
27
+ var ImpulseSeriesHitTestProvider = /** @class */ (function (_super) {
28
+ __extends(ImpulseSeriesHitTestProvider, _super);
29
+ function ImpulseSeriesHitTestProvider() {
30
+ return _super !== null && _super.apply(this, arguments) || this;
31
+ }
32
+ /**
33
+ * @inheritDoc
34
+ */
35
+ ImpulseSeriesHitTestProvider.prototype.hitTest = function (x, y, hitTestRadius) {
36
+ if (hitTestRadius === void 0) { hitTestRadius = BaseHitTestProvider_1.BaseHitTestProvider.DEFAULT_HIT_TEST_RADIUS; }
37
+ var hitTestPoint = this.getTranslatedHitTestPoint(x, y);
38
+ if (!hitTestPoint) {
39
+ return HitTestInfo_1.HitTestInfo.empty();
40
+ }
41
+ var _a = this.currentRenderPassData, xCoordinateCalculator = _a.xCoordinateCalculator, yCoordinateCalculator = _a.yCoordinateCalculator, isVerticalChart = _a.isVerticalChart;
42
+ var xHitCoord = isVerticalChart ? hitTestPoint.y : hitTestPoint.x;
43
+ var yHitCoord = isVerticalChart ? hitTestPoint.x : hitTestPoint.y;
44
+ var dataSeries = this.parentSeries.dataSeries;
45
+ var nearestXyPointIndex = hitTestHelpers_1.hitTestHelpers.getNearestXyPoint(xCoordinateCalculator, yCoordinateCalculator, dataSeries, xHitCoord, yHitCoord);
46
+ var nearestPointIndex = hitTestHelpers_1.hitTestHelpers.getNearestXPoint(this.webAssemblyContext, xCoordinateCalculator, dataSeries, xHitCoord, dataSeries.dataDistributionCalculator.isSortedAscending);
47
+ var xNativeValues = dataSeries.getNativeXValues();
48
+ var yNativeValues = dataSeries.getNativeYValues();
49
+ var hitTestInfo = hitTestHelpers_1.hitTestHelpers.createHitTestInfo(this.parentSeries, xCoordinateCalculator, yCoordinateCalculator, isVerticalChart, dataSeries, xNativeValues, yNativeValues, xHitCoord, yHitCoord, nearestPointIndex, 0);
50
+ if (nearestPointIndex >= 0 || nearestXyPointIndex >= 0) {
51
+ hitTestInfo.isHit =
52
+ hitTestHelpers_1.hitTestHelpers.testIsHitForImpulse(xCoordinateCalculator, yCoordinateCalculator, this.parentSeries, xNativeValues, yNativeValues, nearestPointIndex, xHitCoord, yHitCoord, hitTestRadius) ||
53
+ hitTestHelpers_1.hitTestHelpers.testIsHitForPoint(xCoordinateCalculator, yCoordinateCalculator, xNativeValues, yNativeValues, nearestXyPointIndex, xHitCoord, yHitCoord, this.parentSeries.size);
54
+ }
55
+ else {
56
+ hitTestInfo.isHit = false;
57
+ }
58
+ return hitTestInfo;
59
+ };
60
+ /**
61
+ * @inheritDoc
62
+ */
63
+ ImpulseSeriesHitTestProvider.prototype.hitTestForDataPointSelectionModifier = function (x, y, hitTestRadius) {
64
+ if (hitTestRadius === void 0) { hitTestRadius = BaseHitTestProvider_1.BaseHitTestProvider.DEFAULT_HIT_TEST_RADIUS; }
65
+ return this.hitTest(x, y, hitTestRadius);
66
+ };
67
+ /**
68
+ * @inheritDoc
69
+ */
70
+ ImpulseSeriesHitTestProvider.prototype.hitTestXSlice = function (x, y) {
71
+ var _a;
72
+ var hitTestPoint = this.getTranslatedHitTestPoint(x, y);
73
+ if (!hitTestPoint) {
74
+ return HitTestInfo_1.HitTestInfo.empty();
75
+ }
76
+ var _b = this.currentRenderPassData, xCoordinateCalculator = _b.xCoordinateCalculator, yCoordinateCalculator = _b.yCoordinateCalculator, isVerticalChart = _b.isVerticalChart;
77
+ var xHitCoord = isVerticalChart ? hitTestPoint.y : hitTestPoint.x;
78
+ var yHitCoord = isVerticalChart ? hitTestPoint.x : hitTestPoint.y;
79
+ var dataSeries = this.parentSeries.dataSeries;
80
+ var xNativeValues = dataSeries.getNativeXValues();
81
+ var yNativeValues = dataSeries.getNativeYValues();
82
+ var nearestPointIndex = hitTestHelpers_1.hitTestHelpers.getNearestXPoint(this.webAssemblyContext, xCoordinateCalculator, dataSeries, xHitCoord, dataSeries.dataDistributionCalculator.isSortedAscending);
83
+ var hitTestInfo = hitTestHelpers_1.hitTestHelpers.createHitTestInfo(this.parentSeries, xCoordinateCalculator, yCoordinateCalculator, isVerticalChart, dataSeries, xNativeValues, yNativeValues, xHitCoord, yHitCoord, nearestPointIndex, 0);
84
+ var isCategoryAxis = xCoordinateCalculator.isCategoryCoordinateCalculator;
85
+ var markerWidth = ((_a = this.parentSeries.size) !== null && _a !== void 0 ? _a : 0) * DpiHelper_1.DpiHelper.PIXEL_RATIO;
86
+ var markerDataWidth = Math.abs(xCoordinateCalculator.getDataValue(markerWidth) - xCoordinateCalculator.getDataValue(0));
87
+ if (nearestPointIndex >= 0) {
88
+ var xFirstValue = isCategoryAxis ? 0 : xNativeValues.get(0);
89
+ var xLastValue = isCategoryAxis ? xNativeValues.size() - 1 : xNativeValues.get(xNativeValues.size() - 1);
90
+ hitTestInfo.isWithinDataBounds = (0, pointUtil_1.testIsInInterval)(hitTestInfo.hitTestPointValues.x, xFirstValue, xLastValue, markerDataWidth / 2);
91
+ hitTestInfo.isHit = hitTestInfo.isWithinDataBounds;
92
+ }
93
+ else {
94
+ hitTestInfo.isHit = false;
95
+ }
96
+ return hitTestInfo;
97
+ };
98
+ return ImpulseSeriesHitTestProvider;
99
+ }(BaseHitTestProvider_1.BaseHitTestProvider));
100
+ exports.ImpulseSeriesHitTestProvider = ImpulseSeriesHitTestProvider;
@@ -8,6 +8,7 @@ import { XyyDataSeries } from "../../../Model/XyyDataSeries";
8
8
  import { CoordinateCalculatorBase } from "../../../Numerics/CoordinateCalculators/CoordinateCalculatorBase";
9
9
  import { BaseOhlcRenderableSeries } from "../BaseOhlcRenderableSeries";
10
10
  import { FastColumnRenderableSeries } from "../FastColumnRenderableSeries";
11
+ import { FastImpulseRenderableSeries } from "../FastImpulseRenderableSeries";
11
12
  import { IRenderableSeries } from "../IRenderableSeries";
12
13
  import { HitTestInfo } from "./HitTestInfo";
13
14
  export declare const hitTestHelpers: {
@@ -41,4 +42,5 @@ export declare const hitTestHelpers: {
41
42
  isHit: boolean;
42
43
  secondPointIndex: number;
43
44
  };
45
+ testIsHitForImpulse: (xCoordinateCalculator: CoordinateCalculatorBase, yCoordinateCalculator: CoordinateCalculatorBase, renderableSeries: FastImpulseRenderableSeries, xValues: SCRTDoubleVector, yValues: SCRTDoubleVector, pointIndex: number, xHitCoord: number, yHitCoord: number, hitTestRadius: number) => boolean;
44
46
  };
@@ -268,6 +268,18 @@ var testIsHitForColumn = function (xCoordinateCalculator, yCoordinateCalculator,
268
268
  var bottomColumnSide = zeroLineYCoord > yCoord ? yCoord : zeroLineYCoord;
269
269
  return (0, pointUtil_1.testIsInBounds)(xHitCoord, yHitCoord, xCoord - halfWidth, topColumnSide, xCoord + halfWidth, bottomColumnSide);
270
270
  };
271
+ var testIsHitForImpulse = function (xCoordinateCalculator, yCoordinateCalculator, renderableSeries, xValues, yValues, pointIndex, xHitCoord, yHitCoord, hitTestRadius) {
272
+ var zeroLineY = renderableSeries.zeroLineY;
273
+ var isCategoryAxis = xCoordinateCalculator.isCategoryCoordinateCalculator;
274
+ var xValue = isCategoryAxis ? pointIndex : xValues.get(pointIndex);
275
+ var yValue = yValues.get(pointIndex);
276
+ var xCoord = xCoordinateCalculator.getCoordinate(xValue);
277
+ var yCoord = yCoordinateCalculator.getCoordinate(yValue);
278
+ var zeroLineYCoord = yCoordinateCalculator.getCoordinate(zeroLineY);
279
+ var topColumnSide = zeroLineYCoord > yCoord ? zeroLineYCoord : yCoord;
280
+ var bottomColumnSide = zeroLineYCoord > yCoord ? yCoord : zeroLineYCoord;
281
+ return (0, pointUtil_1.testIsInBounds)(xHitCoord, yHitCoord, xCoord, topColumnSide, xCoord, bottomColumnSide, hitTestRadius);
282
+ };
271
283
  var testIsHitForOHLC = function (xCoordinateCalculator, yCoordinateCalculator, renderableSeries, dataSeries, pointIndex, xHitCoord, yHitCoord, hitTestRadius) {
272
284
  var getDataPointWidth = renderableSeries.getDataPointWidth, dataPointWidth = renderableSeries.dataPointWidth;
273
285
  var isCategoryAxis = xCoordinateCalculator.isCategoryCoordinateCalculator;
@@ -344,5 +356,6 @@ exports.hitTestHelpers = {
344
356
  testIsHitForBand: testIsHitForBand,
345
357
  testIsHitForColumn: testIsHitForColumn,
346
358
  testIsHitForOHLC: testIsHitForOHLC,
347
- testIsHitForMountain: testIsHitForMountain
359
+ testIsHitForMountain: testIsHitForMountain,
360
+ testIsHitForImpulse: testIsHitForImpulse
348
361
  };
@@ -1,4 +1,4 @@
1
1
  import { TSciChart } from "../types/TSciChart";
2
2
  import { TSciChart3D } from "../types/TSciChart3D";
3
- export declare const libraryVersion = "2.1.2273";
3
+ export declare const libraryVersion = "2.1.2290";
4
4
  export declare const checkBuildStamp: (wasmContext: TSciChart | TSciChart3D) => boolean;
@@ -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-02-14T00:00:00";
4
+ var buildStamp = "2022-03-08T00:00:00";
5
5
  var result;
6
6
  // tslint:disable-next-line:no-var-requires
7
- exports.libraryVersion = "2.1.2273";
7
+ exports.libraryVersion = "2.1.2290";
8
8
  var checkBuildStamp = function (wasmContext) {
9
9
  if (result !== undefined)
10
10
  return result;