@datarailsshared/dr_renderer 1.2.104 → 1.2.105

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.104",
3
+ "version": "1.2.105",
4
4
  "description": "DataRails charts and tables renderer",
5
5
  "keywords": [
6
6
  "datarails",
@@ -562,7 +562,7 @@ let initDRPivotTable = function($, window, document) {
562
562
  return [rowKeys[index][0]];
563
563
  });
564
564
  }
565
- } else {
565
+ } else if (colAttrs.length) {
566
566
  colAttrs = [colAttrs[0]];
567
567
  }
568
568
  }
@@ -464,10 +464,18 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
464
464
  cols = cols.name;
465
465
  }
466
466
 
467
+ if (!cols && is_drill_down_pie) {
468
+ cols = this.point.name;
469
+ }
470
+
467
471
  if (!lodash.isArray(cols)) {
468
472
  cols = [cols];
469
473
  }
470
474
 
475
+ if (!cols) {
476
+ cols = [];
477
+ }
478
+
471
479
  if (variant_name && rows && rows[0] && variant_name == rows[0]) {
472
480
  rows[0] = variant_name_default_name;
473
481
  }
@@ -591,7 +599,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
591
599
  series_text = ': ';
592
600
  }
593
601
  let formatted_value_to_return = $.pivotUtilities.getFormattedNumber(y, null, opts);
594
- if (aggr.value()) {
602
+ if (aggr.value() && !is_drill_down_pie) {
595
603
  formatted_value_to_return = $.pivotUtilities.getFormattedNumber(aggr.value(), aggr, opts);
596
604
  }
597
605
 
@@ -1440,8 +1448,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
1440
1448
  col_ob.data.push([row_n_value[0], val]);
1441
1449
  }
1442
1450
  });
1443
-
1444
- pie_drill_down_series.push(col_ob);
1451
+ if (col_ob.data.length) {
1452
+ pie_drill_down_series.push(col_ob);
1453
+ }
1445
1454
  }
1446
1455
  });
1447
1456