@datarailsshared/dr_renderer 1.2.352 → 1.2.355

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datarailsshared/dr_renderer",
3
- "version": "1.2.352",
3
+ "version": "1.2.355",
4
4
  "description": "DataRails charts and tables renderer",
5
5
  "keywords": [
6
6
  "datarails",
@@ -167,6 +167,19 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
167
167
  }
168
168
  }
169
169
 
170
+ // remove highcharts tooltip from the dom instead of hiding if option is passed
171
+ Highcharts.wrap(Highcharts.Tooltip.prototype, 'hide', function(proceed, delay) {
172
+ if (!this.options.destroyWhenHiding) {
173
+ proceed.call(this, delay);
174
+ } else {
175
+ Highcharts.clearTimeout(this.hideTimer);
176
+ delay = Highcharts.pick(delay, this.options.hideDelay);
177
+ this.hideTimer = Highcharts.syncTimeout(() => {
178
+ this.destroy();
179
+ }, delay);
180
+ }
181
+ });
182
+
170
183
  if(!moment_lib){
171
184
  moment_lib = moment;
172
185
  }
@@ -701,6 +714,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
701
714
  padding: 0,
702
715
  stickOnContact: true,
703
716
  hideDelay: 1500,
717
+ destroyWhenHiding: true,
704
718
  formatter: function () {
705
719
  const rowKey = pivotData.rowAttrs.length ? lodash.get(this.point, 'series.name') || "" : "";
706
720
  const colKey = lodash.get(this.point, 'name') || this.x.name[0] || "";
@@ -36,7 +36,9 @@ describe('highcharts_renderer', () => {
36
36
  opt: {},
37
37
  setOptions: function(value) {Highcharts.opt = value;},
38
38
  numberFormat: function(value) { return value ;},
39
- getOptions: function() { return Highcharts.opt; }
39
+ getOptions: function() { return Highcharts.opt; },
40
+ Tooltip: {},
41
+ wrap: () => {},
40
42
  };
41
43
  _window.DataFormatter = DataFormatter;
42
44
  initPivotTable($, _window, _document);