scichart 2.0.2179 → 2.0.2185

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.
@@ -24,6 +24,10 @@ export interface ICursorModifierOptions extends IChartModifierBaseOptions {
24
24
  showAxisLabels?: boolean;
25
25
  axisLabelStroke?: string;
26
26
  axisLabelFill?: string;
27
+ xAxisLabelStroke?: string;
28
+ xAxisLabelFill?: string;
29
+ yAxisLabelStroke?: string;
30
+ yAxisLabelFill?: string;
27
31
  tooltipLegendTemplate?: TCursorTooltipSvgTemplate | string;
28
32
  tooltipLegendOffsetX?: number;
29
33
  tooltipLegendOffsetY?: number;
@@ -70,13 +74,29 @@ export declare class CursorModifier extends ChartModifierBase2D implements IIncl
70
74
  */
71
75
  showAxisLabels: boolean;
72
76
  /**
73
- * Gets or sets the axis label text color as an HTML Color code
77
+ * Gets or sets both axiseslabel text color as an HTML Color code
74
78
  */
75
79
  axisLabelStroke: string;
76
80
  /**
77
- * Gets or sets the axis label fill as an HTML Color code.
81
+ * Gets or sets both axises label fill as an HTML Color code.
78
82
  */
79
83
  axisLabelFill: string;
84
+ /**
85
+ * Gets or sets the xAxis label text color as an HTML Color code
86
+ */
87
+ xAxisLabelStroke: string;
88
+ /**
89
+ * Gets or sets the xAxis label fill as an HTML Color code.
90
+ */
91
+ xAxisLabelFill: string;
92
+ /**
93
+ * Gets or sets the xAxis label text color as an HTML Color code
94
+ */
95
+ yAxisLabelStroke: string;
96
+ /**
97
+ * Gets or sets the xAxis label fill as an HTML Color code.
98
+ */
99
+ yAxisLabelFill: string;
80
100
  /**
81
101
  * Gets or sets the template for the legend
82
102
  */
@@ -48,7 +48,7 @@ var CursorModifier = /** @class */ (function (_super) {
48
48
  * @param options Optional parameters {@link ICursorModifierOptions} used to configure the modifier
49
49
  */
50
50
  function CursorModifier(options) {
51
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
51
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
52
52
  var _this = _super.call(this, options) || this;
53
53
  _this.type = ChartModifierType_1.EChart2DModifierType.Cursor;
54
54
  _this.tooltipSvgTemplate = defaultTooltipTemplate;
@@ -77,13 +77,29 @@ var CursorModifier = /** @class */ (function (_super) {
77
77
  */
78
78
  _this.showAxisLabels = true;
79
79
  /**
80
- * Gets or sets the axis label text color as an HTML Color code
80
+ * Gets or sets both axiseslabel text color as an HTML Color code
81
81
  */
82
82
  _this.axisLabelStroke = "#fff";
83
83
  /**
84
- * Gets or sets the axis label fill as an HTML Color code.
84
+ * Gets or sets both axises label fill as an HTML Color code.
85
85
  */
86
86
  _this.axisLabelFill = "#228B22";
87
+ /**
88
+ * Gets or sets the xAxis label text color as an HTML Color code
89
+ */
90
+ _this.xAxisLabelStroke = "#fff";
91
+ /**
92
+ * Gets or sets the xAxis label fill as an HTML Color code.
93
+ */
94
+ _this.xAxisLabelFill = "#228B22";
95
+ /**
96
+ * Gets or sets the xAxis label text color as an HTML Color code
97
+ */
98
+ _this.yAxisLabelStroke = "#fff";
99
+ /**
100
+ * Gets or sets the xAxis label fill as an HTML Color code.
101
+ */
102
+ _this.yAxisLabelFill = "#228B22";
87
103
  /**
88
104
  * Gets or sets the legend X offset
89
105
  */
@@ -110,8 +126,12 @@ var CursorModifier = /** @class */ (function (_super) {
110
126
  _this.tooltipTextStroke = (_f = options === null || options === void 0 ? void 0 : options.tooltipTextStroke) !== null && _f !== void 0 ? _f : _this.tooltipTextStroke;
111
127
  _this.showTooltip = (_g = options === null || options === void 0 ? void 0 : options.showTooltip) !== null && _g !== void 0 ? _g : _this.showTooltip;
112
128
  _this.showAxisLabels = (_h = options === null || options === void 0 ? void 0 : options.showAxisLabels) !== null && _h !== void 0 ? _h : _this.showAxisLabels;
113
- _this.axisLabelStroke = (_j = options === null || options === void 0 ? void 0 : options.axisLabelStroke) !== null && _j !== void 0 ? _j : _this.axisLabelStroke;
114
- _this.axisLabelFill = (_k = options === null || options === void 0 ? void 0 : options.axisLabelFill) !== null && _k !== void 0 ? _k : _this.axisLabelFill;
129
+ _this.axisLabelFill = (_j = options === null || options === void 0 ? void 0 : options.axisLabelFill) !== null && _j !== void 0 ? _j : _this.axisLabelFill;
130
+ _this.axisLabelStroke = (_k = options === null || options === void 0 ? void 0 : options.axisLabelStroke) !== null && _k !== void 0 ? _k : _this.axisLabelStroke;
131
+ _this.xAxisLabelStroke = (_l = options === null || options === void 0 ? void 0 : options.xAxisLabelStroke) !== null && _l !== void 0 ? _l : _this.xAxisLabelStroke;
132
+ _this.xAxisLabelFill = (_m = options === null || options === void 0 ? void 0 : options.xAxisLabelFill) !== null && _m !== void 0 ? _m : _this.xAxisLabelFill;
133
+ _this.yAxisLabelStroke = (_o = options === null || options === void 0 ? void 0 : options.yAxisLabelStroke) !== null && _o !== void 0 ? _o : _this.yAxisLabelStroke;
134
+ _this.yAxisLabelFill = (_p = options === null || options === void 0 ? void 0 : options.yAxisLabelFill) !== null && _p !== void 0 ? _p : _this.yAxisLabelFill;
115
135
  if (options === null || options === void 0 ? void 0 : options.tooltipLegendTemplate) {
116
136
  if (typeof options.tooltipLegendTemplate === "string") {
117
137
  _this.typeMap.set("tooltipLegendTemplate", options.tooltipLegendTemplate);
@@ -120,9 +140,9 @@ var CursorModifier = /** @class */ (function (_super) {
120
140
  }
121
141
  }
122
142
  _this.tooltipLegendTemplate =
123
- (_l = options === null || options === void 0 ? void 0 : options.tooltipLegendTemplate) !== null && _l !== void 0 ? _l : _this.tooltipLegendTemplate;
124
- _this.tooltipLegendOffsetX = (_m = options === null || options === void 0 ? void 0 : options.tooltipLegendOffsetX) !== null && _m !== void 0 ? _m : _this.tooltipLegendOffsetX;
125
- _this.tooltipLegendOffsetY = (_o = options === null || options === void 0 ? void 0 : options.tooltipLegendOffsetY) !== null && _o !== void 0 ? _o : _this.tooltipLegendOffsetY;
143
+ (_q = options === null || options === void 0 ? void 0 : options.tooltipLegendTemplate) !== null && _q !== void 0 ? _q : _this.tooltipLegendTemplate;
144
+ _this.tooltipLegendOffsetX = (_r = options === null || options === void 0 ? void 0 : options.tooltipLegendOffsetX) !== null && _r !== void 0 ? _r : _this.tooltipLegendOffsetX;
145
+ _this.tooltipLegendOffsetY = (_s = options === null || options === void 0 ? void 0 : options.tooltipLegendOffsetY) !== null && _s !== void 0 ? _s : _this.tooltipLegendOffsetY;
126
146
  if (options === null || options === void 0 ? void 0 : options.tooltipDataTemplate) {
127
147
  if (typeof options.tooltipDataTemplate === "string") {
128
148
  _this.typeMap.set("tooltipDataTemplate", options.tooltipDataTemplate);
@@ -131,7 +151,7 @@ var CursorModifier = /** @class */ (function (_super) {
131
151
  }
132
152
  }
133
153
  _this.tooltipDataTemplateProperty =
134
- (_p = options === null || options === void 0 ? void 0 : options.tooltipDataTemplate) !== null && _p !== void 0 ? _p : _this.tooltipDataTemplateProperty;
154
+ (_t = options === null || options === void 0 ? void 0 : options.tooltipDataTemplate) !== null && _t !== void 0 ? _t : _this.tooltipDataTemplateProperty;
135
155
  return _this;
136
156
  }
137
157
  /**
@@ -148,8 +168,12 @@ var CursorModifier = /** @class */ (function (_super) {
148
168
  CursorModifier.prototype.onAttach = function () {
149
169
  var _a;
150
170
  _super.prototype.onAttach.call(this);
151
- this.xLineAnnotation = this.newLineAnnotation();
152
- this.yLineAnnotation = this.newLineAnnotation();
171
+ var xAxisLabelFill = this.xAxisLabelFill ? this.xAxisLabelFill : this.axisLabelFill;
172
+ var yAxisLabelFill = this.yAxisLabelFill ? this.yAxisLabelFill : this.axisLabelFill;
173
+ var xAxisLabelStroke = this.xAxisLabelStroke ? this.xAxisLabelStroke : this.axisLabelStroke;
174
+ var yAxisLabelStroke = this.yAxisLabelStroke ? this.yAxisLabelStroke : this.axisLabelStroke;
175
+ this.xLineAnnotation = this.newLineAnnotation(xAxisLabelFill, yAxisLabelFill);
176
+ this.yLineAnnotation = this.newLineAnnotation(xAxisLabelStroke, yAxisLabelStroke);
153
177
  this.tooltipAnnotation = new CursorTooltipSvgAnnotation_1.CursorTooltipSvgAnnotation({
154
178
  cursorModifier: this,
155
179
  xCoordinateMode: AnnotationBase_1.ECoordinateMode.Pixel,
@@ -299,6 +323,10 @@ var CursorModifier = /** @class */ (function (_super) {
299
323
  var options = {
300
324
  axisLabelFill: this.axisLabelFill,
301
325
  axisLabelStroke: this.axisLabelStroke,
326
+ xAxisLabelFill: this.xAxisLabelFill,
327
+ xAxisLabelStroke: this.xAxisLabelStroke,
328
+ yAxisLabelFill: this.yAxisLabelFill,
329
+ yAxisLabelStroke: this.yAxisLabelStroke,
302
330
  crosshairStroke: this.crosshairStroke,
303
331
  crosshairStrokeDashArray: this.crosshairStrokeDashArray,
304
332
  crosshairStrokeThickness: this.crosshairStrokeThickness,
@@ -383,7 +411,7 @@ var CursorModifier = /** @class */ (function (_super) {
383
411
  }
384
412
  }
385
413
  };
386
- CursorModifier.prototype.newLineAnnotation = function () {
414
+ CursorModifier.prototype.newLineAnnotation = function (axisLabelFill, axisLabelStroke) {
387
415
  return new LineAnnotation_1.LineAnnotation({
388
416
  xCoordinateMode: AnnotationBase_1.ECoordinateMode.Pixel,
389
417
  yCoordinateMode: AnnotationBase_1.ECoordinateMode.Pixel,
@@ -392,8 +420,8 @@ var CursorModifier = /** @class */ (function (_super) {
392
420
  stroke: this.crosshairStroke,
393
421
  isHidden: true,
394
422
  showLabel: this.showAxisLabels,
395
- axisLabelFill: this.axisLabelFill,
396
- axisLabelStroke: this.axisLabelStroke,
423
+ axisLabelFill: axisLabelFill,
424
+ axisLabelStroke: axisLabelStroke,
397
425
  xAxisId: this.xAxisId,
398
426
  yAxisId: this.yAxisId
399
427
  });
@@ -42,7 +42,7 @@ export declare class CursorTooltipSvgAnnotation extends SvgAnnotationBase {
42
42
  /**
43
43
  * Gets or sets seriesInfos {@link SeriesInfo} value on the tooltip
44
44
  */
45
- set seriesInfos(value: SeriesInfo[]);
45
+ set seriesInfos(newSeriesInfos: SeriesInfo[]);
46
46
  get title(): string;
47
47
  set title(value: string);
48
48
  get tooltipSvgTemplate(): TCursorTooltipSvgTemplate;
@@ -56,13 +56,16 @@ var CursorTooltipSvgAnnotation = /** @class */ (function (_super) {
56
56
  /**
57
57
  * Gets or sets seriesInfos {@link SeriesInfo} value on the tooltip
58
58
  */
59
- set: function (value) {
60
- if (this.seriesInfosProperty && value) {
59
+ set: function (newSeriesInfos) {
60
+ if (this.seriesInfosProperty && newSeriesInfos) {
61
61
  // Compare infos against the ones for the matching series. See if any are different
62
- if (this.seriesInfos
63
- .map(function (si) { return si.equals(value.find(function (o) { return o.renderableSeries.id === si.renderableSeries.id; })); })
64
- .find(function (a) { return !a; })) {
65
- this.seriesInfosProperty = value;
62
+ if (newSeriesInfos.length !== this.seriesInfosProperty.length ||
63
+ this.seriesInfosProperty
64
+ .map(function (seriesInfo) {
65
+ return seriesInfo.equals(newSeriesInfos.find(function (newSeriesInfo) { return newSeriesInfo.renderableSeries.id === seriesInfo.renderableSeries.id; }));
66
+ })
67
+ .some(function (sameSeriesInfo) { return sameSeriesInfo === false; })) {
68
+ this.seriesInfosProperty = newSeriesInfos;
66
69
  this.notifyPropertyChanged(constants_1.PROPERTY.SERIES_INFOS);
67
70
  }
68
71
  }
@@ -981,6 +981,8 @@ var AxisBase2D = /** @class */ (function (_super) {
981
981
  };
982
982
  AxisBase2D.prototype.getMaxXRange = function () {
983
983
  var maximumRange = this.getXDataRange();
984
+ if (!maximumRange)
985
+ return undefined;
984
986
  // TODO: Coerce a zero range
985
987
  if (this.growBy) {
986
988
  maximumRange = maximumRange.growBy(this.growBy);
@@ -277,6 +277,8 @@ var LogarithmicAxis = /** @class */ (function (_super) {
277
277
  };
278
278
  LogarithmicAxis.prototype.getMaxXRange = function () {
279
279
  var maximumRange = this.getXDataRange();
280
+ if (!maximumRange)
281
+ return undefined;
280
282
  // TODO: Coerce a zero range
281
283
  if (this.growBy && maximumRange) {
282
284
  maximumRange = maximumRange.growByLog(this.growBy, this.logBase);