scichart 2.1.0-beta.40 → 2.1.2261

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/Charting/ChartModifiers/RolloverModifier.d.ts +5 -3
  2. package/Charting/ChartModifiers/RolloverModifier.js +38 -80
  3. package/Charting/Model/PointSeries/BasePointSeriesResampled.js +2 -2
  4. package/Charting/Numerics/Resamplers/ExtremeResamplerHelper.d.ts +1 -1
  5. package/Charting/Numerics/Resamplers/ExtremeResamplerHelper.js +3 -1
  6. package/Charting/Services/SciChartRenderer.js +3 -0
  7. package/Charting/Visuals/Axis/CategoryAxisBase.d.ts +51 -0
  8. package/Charting/Visuals/Axis/CategoryAxisBase.js +85 -20
  9. package/Charting/Visuals/Axis/LabelProvider/SmartDateLabelProvider.js +7 -4
  10. package/Charting/Visuals/RenderableSeries/BaseOhlcRenderableSeries.js +70 -16
  11. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.d.ts +2 -1
  12. package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.js +15 -11
  13. package/Charting/Visuals/RenderableSeries/DrawingProviders/ColumnSeriesDrawingProvider.d.ts +1 -0
  14. package/Charting/Visuals/RenderableSeries/DrawingProviders/ColumnSeriesDrawingProvider.js +27 -8
  15. package/Charting/Visuals/RenderableSeries/FastBubbleRenderableSeries.d.ts +5 -0
  16. package/Charting/Visuals/RenderableSeries/FastBubbleRenderableSeries.js +12 -0
  17. package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.d.ts +1 -0
  18. package/Charting/Visuals/SciChartPieSurface/SciChartPieSurface.js +7 -2
  19. package/Charting/Visuals/licenseManager2D.js +2 -0
  20. package/Charting/Visuals/loader.js +2 -0
  21. package/Charting/Visuals/sciChartInitCommon.js +4 -0
  22. package/Core/BuildStamp.d.ts +1 -1
  23. package/Core/BuildStamp.js +2 -2
  24. package/_wasm/scichart.browser.js +1 -1
  25. package/_wasm/scichart2d.js +10 -10
  26. package/_wasm/scichart2d.wasm +0 -0
  27. package/_wasm/scichart3d.js +1 -1
  28. package/_wasm/scichart3d.wasm +0 -0
  29. package/package.json +1 -1
  30. package/types/TSciChart.d.ts +1 -0
  31. package/utils/tooltip.d.ts +42 -0
  32. package/utils/tooltip.js +119 -0
@@ -68,6 +68,7 @@ export declare abstract class BaseRenderableSeries implements IRenderableSeries
68
68
  protected dataSeriesProperty: IDataSeries;
69
69
  protected animationFSM: SeriesAnimationFiniteStateMachine;
70
70
  protected animationQueue: SeriesAnimation[];
71
+ protected paletteProviderProperty: IPaletteProvider;
71
72
  protected typeMap: Map<string, string>;
72
73
  protected resamplerHelper: ExtremeResamplerHelper;
73
74
  protected pointSeries: XyPointSeriesResampled;
@@ -80,7 +81,6 @@ export declare abstract class BaseRenderableSeries implements IRenderableSeries
80
81
  private drawNaNAsProperty;
81
82
  private isVisibleProperty;
82
83
  private effectProperty;
83
- private paletteProviderProperty;
84
84
  private isDigitalLineProperty;
85
85
  private isSelectedProperty;
86
86
  private isHoveredProperty;
@@ -291,6 +291,7 @@ export declare abstract class BaseRenderableSeries implements IRenderableSeries
291
291
  */
292
292
  protected dataSeriesDataChanged(): void;
293
293
  protected valueChanged(oldValue: any, newValue: any): boolean;
294
+ protected setPaletteProvider(paletteProvider: IPaletteProvider): void;
294
295
  private invalidateParent;
295
296
  private effectPropertyChanged;
296
297
  private get canDraw();
@@ -62,6 +62,7 @@ var BaseRenderableSeries = /** @class */ (function () {
62
62
  /** @inheritDoc */
63
63
  this.hovered = new EventHandler_1.EventHandler();
64
64
  this.animationQueue = [];
65
+ this.paletteProviderProperty = IPaletteProvider_1.DefaultPaletteProvider.createEmpty();
65
66
  // used to track if registered types were used for function propertes, so they can be serialized
66
67
  this.typeMap = new Map();
67
68
  this.xAxisIdProperty = AxisCore_1.AxisCore.DEFAULT_AXIS_ID;
@@ -71,7 +72,6 @@ var BaseRenderableSeries = /** @class */ (function () {
71
72
  this.opacityProperty = 1;
72
73
  this.drawNaNAsProperty = WebGlRenderContext2D_1.ELineDrawMode.DiscontinuousLine;
73
74
  this.isVisibleProperty = true;
74
- this.paletteProviderProperty = IPaletteProvider_1.DefaultPaletteProvider.createEmpty();
75
75
  this.isDigitalLineProperty = false;
76
76
  this.resamplingModeProperty = ResamplingMode_1.EResamplingMode.Auto;
77
77
  this.resamplingPrecisionProperty = 0;
@@ -223,15 +223,7 @@ var BaseRenderableSeries = /** @class */ (function () {
223
223
  },
224
224
  /** @inheritDoc */
225
225
  set: function (paletteProvider) {
226
- var _a, _b;
227
- if ((_a = this.paletteProviderProperty) === null || _a === void 0 ? void 0 : _a.onDetached) {
228
- this.paletteProviderProperty.onDetached();
229
- }
230
- this.paletteProviderProperty = paletteProvider;
231
- if ((_b = this.paletteProviderProperty) === null || _b === void 0 ? void 0 : _b.onAttached) {
232
- this.paletteProviderProperty.onAttached(this);
233
- }
234
- this.notifyPropertyChanged(constants_1.PROPERTY.PALETTE_PROVIDER);
226
+ this.setPaletteProvider(paletteProvider);
235
227
  },
236
228
  enumerable: false,
237
229
  configurable: true
@@ -546,7 +538,8 @@ var BaseRenderableSeries = /** @class */ (function () {
546
538
  };
547
539
  /** @inheritDoc */
548
540
  BaseRenderableSeries.prototype.hasDataSeriesValues = function () {
549
- return this.dataSeries.hasValues;
541
+ var _a;
542
+ return (_a = this.dataSeries) === null || _a === void 0 ? void 0 : _a.hasValues;
550
543
  };
551
544
  /** @inheritDoc */
552
545
  BaseRenderableSeries.prototype.hasDataSeries = function () {
@@ -849,6 +842,17 @@ var BaseRenderableSeries = /** @class */ (function () {
849
842
  BaseRenderableSeries.prototype.valueChanged = function (oldValue, newValue) {
850
843
  return oldValue !== newValue;
851
844
  };
845
+ BaseRenderableSeries.prototype.setPaletteProvider = function (paletteProvider) {
846
+ var _a, _b;
847
+ if ((_a = this.paletteProviderProperty) === null || _a === void 0 ? void 0 : _a.onDetached) {
848
+ this.paletteProviderProperty.onDetached();
849
+ }
850
+ this.paletteProviderProperty = paletteProvider;
851
+ if ((_b = this.paletteProviderProperty) === null || _b === void 0 ? void 0 : _b.onAttached) {
852
+ this.paletteProviderProperty.onAttached(this);
853
+ }
854
+ this.notifyPropertyChanged(constants_1.PROPERTY.PALETTE_PROVIDER);
855
+ };
852
856
  BaseRenderableSeries.prototype.invalidateParent = function () {
853
857
  if (this.invalidateParentCallback) {
854
858
  this.invalidateParentCallback();
@@ -11,6 +11,7 @@ import { BaseSeriesDrawingProvider } from "./BaseSeriesDrawingProvider";
11
11
  export declare class ColumnSeriesDrawingProvider extends BaseSeriesDrawingProvider<FastColumnRenderableSeries> {
12
12
  private nativeDrawingProvider;
13
13
  private strokePenCache;
14
+ private strokePenFillColoredCache;
14
15
  private fillBrushCache;
15
16
  /**
16
17
  * Creates an instance of the {@link ColumnSeriesDrawingProvider}
@@ -37,9 +37,14 @@ var ColumnSeriesDrawingProvider = /** @class */ (function (_super) {
37
37
  var _this = _super.call(this, webAssemblyContext, parentSeries) || this;
38
38
  _this.nativeDrawingProvider = new webAssemblyContext.SCRTColumnSeriesDrawingProvider();
39
39
  _this.strokePenCache = new Pen2DCache_1.Pen2DCache(webAssemblyContext);
40
+ _this.strokePenFillColoredCache = new Pen2DCache_1.Pen2DCache(webAssemblyContext);
40
41
  _this.fillBrushCache = new BrushCache_1.BrushCache(webAssemblyContext);
41
42
  var _a = _this.parentSeries, stroke = _a.stroke, strokeThickness = _a.strokeThickness, fill = _a.fill, opacity = _a.opacity;
42
43
  (0, Pen2DCache_1.createPenInCache)(_this.strokePenCache, stroke, strokeThickness, opacity);
44
+ // the pen is used to fix a bug when columns disappear when zooming out with zero stroke thickness
45
+ if (strokeThickness === 0) {
46
+ (0, Pen2DCache_1.createPenInCache)(_this.strokePenFillColoredCache, fill, 1, opacity);
47
+ }
43
48
  (0, BrushCache_1.createBrushInCache)(_this.fillBrushCache, fill, opacity);
44
49
  return _this;
45
50
  }
@@ -49,6 +54,7 @@ var ColumnSeriesDrawingProvider = /** @class */ (function (_super) {
49
54
  ColumnSeriesDrawingProvider.prototype.delete = function () {
50
55
  this.nativeDrawingProvider = (0, Deleter_1.deleteSafe)(this.nativeDrawingProvider);
51
56
  this.strokePenCache = (0, Deleter_1.deleteSafe)(this.strokePenCache);
57
+ this.strokePenFillColoredCache = (0, Deleter_1.deleteSafe)(this.strokePenFillColoredCache);
52
58
  this.fillBrushCache = (0, Deleter_1.deleteSafe)(this.fillBrushCache);
53
59
  _super.prototype.delete.call(this);
54
60
  };
@@ -58,21 +64,28 @@ var ColumnSeriesDrawingProvider = /** @class */ (function (_super) {
58
64
  ColumnSeriesDrawingProvider.prototype.draw = function (renderContext, renderPassData) {
59
65
  var pointSeries = renderPassData.pointSeries;
60
66
  var viewRect = this.parentSeries.parentSurface.seriesViewRect;
67
+ var strokeThickness = this.parentSeries.strokeThickness;
61
68
  var args = new this.webAssemblyContext.SCRTColumnDrawingParams();
62
69
  args.forceShaderMethod = true;
63
70
  args.verticalChart = renderPassData.isVerticalChart;
64
71
  args.zeroLineY = this.parentSeries.zeroLineY;
65
72
  args.columnWidth = this.parentSeries.getDataPointWidth(renderPassData.xCoordinateCalculator, this.parentSeries.dataPointWidth);
66
- args.viewportWidth = viewRect.width;
67
- args.viewportHeight = viewRect.height;
68
- var fillBrush = (0, BrushCache_1.getScrtBrushFromCache)(this.fillBrushCache);
69
- if (fillBrush) {
70
- args.SetFillBrush(fillBrush);
73
+ var strokePenCache = this.strokePenCache;
74
+ // ISSUE: If the strokeThickness property is not provided,
75
+ // the fill will be disappeared with large zoom (when the column width will be small or zero)
76
+ if (args.columnWidth === 0 && strokeThickness === 0) {
77
+ strokePenCache = this.strokePenFillColoredCache;
71
78
  }
72
- var linesPen = (0, Pen2DCache_1.getScrtPenFromCache)(this.strokePenCache);
79
+ var linesPen = (0, Pen2DCache_1.getScrtPenFromCache)(strokePenCache);
73
80
  if (linesPen) {
74
81
  args.SetLinesPen(linesPen);
75
82
  }
83
+ var fillBrush = (0, BrushCache_1.getScrtBrushFromCache)(this.fillBrushCache);
84
+ if (fillBrush) {
85
+ args.SetFillBrush(fillBrush);
86
+ }
87
+ args.viewportWidth = viewRect.width;
88
+ args.viewportHeight = viewRect.height;
76
89
  // Paletting per point
77
90
  _super.prototype.applyStrokeFillPaletting.call(this, this.parentSeries.stroke, linesPen, this.parentSeries.fill, fillBrush, this.parentSeries.opacity);
78
91
  args.SetPalettedColors(this.palettingState.palettedColors);
@@ -96,16 +109,22 @@ var ColumnSeriesDrawingProvider = /** @class */ (function (_super) {
96
109
  */
97
110
  ColumnSeriesDrawingProvider.prototype.onSeriesPropertyChange = function (propertyName) {
98
111
  _super.prototype.onSeriesPropertyChange.call(this, propertyName);
112
+ var _a = this.parentSeries, stroke = _a.stroke, strokeThickness = _a.strokeThickness, opacity = _a.opacity, fill = _a.fill;
99
113
  if (propertyName === constants_1.PROPERTY.STROKE ||
100
114
  propertyName === constants_1.PROPERTY.STROKE_THICKNESS ||
101
115
  propertyName === constants_1.PROPERTY.OPACITY) {
102
- var _a = this.parentSeries, stroke = _a.stroke, strokeThickness = _a.strokeThickness, opacity = _a.opacity;
103
116
  (0, Pen2DCache_1.createPenInCache)(this.strokePenCache, stroke, strokeThickness, opacity);
104
117
  }
105
118
  if (propertyName === constants_1.PROPERTY.FILL || propertyName === constants_1.PROPERTY.OPACITY) {
106
- var _b = this.parentSeries, fill = _b.fill, opacity = _b.opacity;
107
119
  (0, BrushCache_1.createBrushInCache)(this.fillBrushCache, fill, opacity);
108
120
  }
121
+ if (strokeThickness === 0 &&
122
+ (propertyName === constants_1.PROPERTY.STROKE_THICKNESS ||
123
+ propertyName === constants_1.PROPERTY.STROKE ||
124
+ propertyName === constants_1.PROPERTY.OPACITY ||
125
+ propertyName === constants_1.PROPERTY.FILL)) {
126
+ (0, Pen2DCache_1.createPenInCache)(this.strokePenFillColoredCache, fill, strokeThickness, opacity);
127
+ }
109
128
  };
110
129
  return ColumnSeriesDrawingProvider;
111
130
  }(BaseSeriesDrawingProvider_1.BaseSeriesDrawingProvider));
@@ -1,4 +1,5 @@
1
1
  import { ESeriesType } from "../../../types/SeriesType";
2
+ import { IPointMarkerPaletteProvider } from "../../Model/IPaletteProvider";
2
3
  import { SCRTDoubleVector, TSciChart } from "../../../types/TSciChart";
3
4
  import { IPointSeries } from "../../Model/PointSeries/IPointSeries";
4
5
  import { ResamplingParams } from "../../Numerics/Resamplers/ResamplingParams";
@@ -43,6 +44,10 @@ export declare class FastBubbleRenderableSeries extends BaseRenderableSeries {
43
44
  */
44
45
  constructor(webAssemblyContext: TSciChart, options?: IBubbleRenderableSeriesOptions);
45
46
  /** @inheritDoc */
47
+ get paletteProvider(): IPointMarkerPaletteProvider;
48
+ /** @inheritDoc */
49
+ set paletteProvider(paletteProvider: IPointMarkerPaletteProvider);
50
+ /** @inheritDoc */
46
51
  applyTheme(themeProvider: IThemeProvider): void;
47
52
  /**
48
53
  * Gets the bubble diameter in pixels for the point index, by looking up the Z-value in the
@@ -70,6 +70,18 @@ var FastBubbleRenderableSeries = /** @class */ (function (_super) {
70
70
  }
71
71
  return _this;
72
72
  }
73
+ Object.defineProperty(FastBubbleRenderableSeries.prototype, "paletteProvider", {
74
+ /** @inheritDoc */
75
+ get: function () {
76
+ return this.paletteProviderProperty;
77
+ },
78
+ /** @inheritDoc */
79
+ set: function (paletteProvider) {
80
+ this.setPaletteProvider(paletteProvider);
81
+ },
82
+ enumerable: false,
83
+ configurable: true
84
+ });
73
85
  /** @inheritDoc */
74
86
  FastBubbleRenderableSeries.prototype.applyTheme = function (themeProvider) {
75
87
  _super.prototype.applyTheme.call(this, themeProvider);
@@ -57,6 +57,7 @@ export declare class SciChartPieSurface implements ISciChartSurfaceBase {
57
57
  readonly domChartRoot: HTMLDivElement;
58
58
  readonly domCanvas2D: HTMLCanvasElement;
59
59
  readonly domSvgContainer: SVGSVGElement;
60
+ readonly domSvgAdornerLayer: SVGSVGElement;
60
61
  readonly domDivContainer: HTMLDivElement;
61
62
  animate: boolean;
62
63
  /**
@@ -79,6 +79,7 @@ var SciChartPieSurface = /** @class */ (function () {
79
79
  this.domChartRoot = canvases.domChartRoot;
80
80
  this.domCanvas2D = canvases.domCanvas2D;
81
81
  this.domSvgContainer = canvases.domSvgContainer;
82
+ this.domSvgAdornerLayer = canvases.domSvgAdornerLayer;
82
83
  this.domDivContainer = canvases.domDivContainer;
83
84
  this.viewRect = new Rect_1.Rect(0, 0, this.domCanvas2D.width, this.domCanvas2D.height);
84
85
  this.drawChart = this.drawChart.bind(this);
@@ -328,13 +329,17 @@ var SciChartPieSurface = /** @class */ (function () {
328
329
  this.domChartRoot.style.height = "".concat(height, "px");
329
330
  }
330
331
  if (this.domCanvas2D) {
331
- this.domCanvas2D.width = width;
332
- this.domCanvas2D.height = height;
332
+ this.domCanvas2D.style.width = "".concat(width, "px");
333
+ this.domCanvas2D.style.height = "".concat(height, "px");
333
334
  }
334
335
  if (this.domSvgContainer) {
335
336
  this.domSvgContainer.setAttribute("width", width.toString());
336
337
  this.domSvgContainer.setAttribute("height", height.toString());
337
338
  }
339
+ if (this.domSvgAdornerLayer) {
340
+ this.domSvgAdornerLayer.setAttribute("width", width.toString());
341
+ this.domSvgAdornerLayer.setAttribute("height", height.toString());
342
+ }
338
343
  if (this.domDivContainer) {
339
344
  this.domDivContainer.style.height = "".concat(height, "px");
340
345
  }
@@ -794,6 +794,8 @@ var updateLicenseDisplayInternal = function (licenseInfo, sciChartSurface, is2D,
794
794
  if (premsg) {
795
795
  licenseMessageDiv.style.width = "100%";
796
796
  licenseMessageDiv.style.height = "100%";
797
+ licenseMessageDiv.style.top = "0";
798
+ licenseMessageDiv.style.left = "0";
797
799
  licenseMessageDiv.style.position = "absolute";
798
800
  licenseMessageDiv.style.pointerEvents = "auto";
799
801
  licenseMessageDiv.style.cursor = "pointer";
@@ -26,6 +26,8 @@ var DefaultSciChartLoader = /** @class */ (function () {
26
26
  loaderContainerDiv.style.background = theme.loadingAnimationBackground;
27
27
  loaderContainerDiv.style.height = "100%";
28
28
  loaderContainerDiv.style.width = "100%";
29
+ loaderContainerDiv.style.position = "relative";
30
+ loaderContainerDiv.style.zIndex = "11";
29
31
  var loaderDiv = document.createElement("div");
30
32
  var spinnerChunk = "<div><span style=\"background: ".concat(theme.loadingAnimationForeground, "\"/></div>");
31
33
  loaderDiv.innerHTML = spinnerChunk.repeat(8);
@@ -74,6 +74,10 @@ var initCanvas = function (divElement, aspectWidth, aspectHeight, activeCanvas)
74
74
  DpiHelper_1.DpiHelper.initialize();
75
75
  var chartRoot = getChartRootDomElement(divElement);
76
76
  chartRoot.innerHTML = "";
77
+ // prevent unexpected behavior with no positioned element
78
+ if (chartRoot.style.position === "") {
79
+ chartRoot.style.position = "relative";
80
+ }
77
81
  var divElementId = chartRoot.id;
78
82
  var divWidth = chartRoot.offsetWidth, divHeight = chartRoot.offsetHeight;
79
83
  var maxHeight = getMaxHeight(chartRoot);
@@ -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.0-beta.40";
3
+ export declare const libraryVersion = "2.1.2261";
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-01-25T00:00:00";
4
+ var buildStamp = "2022-01-31T00:00:00";
5
5
  var result;
6
6
  // tslint:disable-next-line:no-var-requires
7
- exports.libraryVersion = "2.1.0-beta.40";
7
+ exports.libraryVersion = "2.1.2261";
8
8
  var checkBuildStamp = function (wasmContext) {
9
9
  if (result !== undefined)
10
10
  return result;