@datarailsshared/dr_renderer 1.2.92 → 1.2.95

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.92",
3
+ "version": "1.2.95",
4
4
  "description": "DataRails charts and tables renderer",
5
5
  "keywords": [
6
6
  "datarails",
@@ -323,8 +323,20 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
323
323
  }
324
324
 
325
325
  highchartsRenderer.downloadFile = function (title, graph_id, type) {
326
- var chart = $('#' + graph_id).find('div.chart').highcharts();
327
- var png_name = title;
326
+ let chart = null;
327
+
328
+ const chartElement = $('#' + graph_id).find('div.chart');
329
+ if (chartElement.highcharts) {
330
+ chart = chartElement.highcharts();
331
+ } else {
332
+ const graphId = Number(graph_id.split('_')[1]);
333
+ chart = lodash.find(window.Highcharts.charts, function(value) {
334
+ return value.options.widgetId === graphId;
335
+ });
336
+ }
337
+
338
+ if (!chart) return;
339
+
328
340
  /*if(chart.title && chart.title.textStr){
329
341
  png_name = chart.title.textStr
330
342
  }else{
@@ -334,7 +346,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
334
346
  if (type === 'png') {
335
347
  chart.exportChartLocal({
336
348
  //type: 'application/png',
337
- filename: png_name
349
+ filename: title
338
350
  });
339
351
  }
340
352
  if (type === 'XLS') {
package/src/index.js CHANGED
@@ -20,8 +20,8 @@ dr_render_factory.getInitHighchartsRenderer = function($, document, Highcharts,
20
20
  return getHighchartsRenderer($, document, Highcharts, default_colors, highchartsRenderer, DataFormatter, lodash, moment_lib);
21
21
  }
22
22
 
23
- dr_render_factory.getInitPublishedItemsRenderer = function (publishedItemsRenderer) {
24
- return getPublishedItemsRenderer(publishedItemsRenderer);
23
+ dr_render_factory.getInitPublishedItemsRenderer = function (publishedItemsRenderer, bind = {}) {
24
+ return getPublishedItemsRenderer.bind(bind)(publishedItemsRenderer);
25
25
  }
26
26
 
27
27
  //const $ = require( "jquery" )( window );
package/src/pivot.css CHANGED
@@ -394,7 +394,7 @@ table.pvtTable.newPvtTable tbody tr td:hover {
394
394
 
395
395
  table.pvtTable.newPvtTable tbody tr td.hover:after,
396
396
  table.pvtTable.newPvtTable tbody tr td:hover:after {
397
- content: "\e90c";
397
+ content: "\e923";
398
398
  width: 2px;
399
399
  color: #85889c;
400
400
  font: normal normal normal 14px/1 DataRails;
package/src/pivottable.js CHANGED
@@ -926,6 +926,7 @@ let initPivotTable = function($, window, document) {
926
926
  return PivotData;
927
927
 
928
928
  })();
929
+
929
930
  $.pivotUtilities = {
930
931
  aggregatorTemplates: aggregatorTemplates,
931
932
  aggregators: aggregators,
@@ -938,6 +939,9 @@ let initPivotTable = function($, window, document) {
938
939
  PivotData: PivotData,
939
940
  errorHandling: errorHandling,
940
941
  };
942
+ if (window.$) {
943
+ window.$.pivotUtilities = $.pivotUtilities
944
+ }
941
945
 
942
946
  /*
943
947
  Default Renderer for hierarchical table layout