@datarailsshared/dr_renderer 1.2.103 → 1.2.106

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.103",
3
+ "version": "1.2.106",
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
  }
@@ -56,7 +56,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
56
56
  "backgroundColor": "#FFFFFF",
57
57
  "plotBorderColor": "#606063",
58
58
  "style": {
59
- "fontFamily": "Nunito Sans",
59
+ "fontFamily": "Poppins",
60
60
  "color": "#3C3C3C"
61
61
  }
62
62
  },
@@ -156,13 +156,13 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
156
156
  highchartsRenderer.highcharts_theme.xAxis.lineColor = chartLabelColor;
157
157
  highchartsRenderer.highcharts_theme.xAxis.tickColor = chartLabelColor;
158
158
  highchartsRenderer.highcharts_theme.xAxis.labels.style = {
159
- "fontFamily": "Nunito Sans, sans-serif",
159
+ "fontFamily": "Poppins, sans-serif",
160
160
  "color": textColor,
161
161
  "font-size": "10px",
162
162
  "font-weight": "bold"
163
163
  };
164
164
  highchartsRenderer.highcharts_theme.xAxis.title.style = {
165
- "fontFamily": "Nunito Sans, sans-serif",
165
+ "fontFamily": "Poppins, sans-serif",
166
166
  "color": "#85889c",
167
167
  "font-size": "12px",
168
168
  "font-weight": "bold"
@@ -172,12 +172,12 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
172
172
  highchartsRenderer.highcharts_theme.yAxis.lineColor = chartLabelColor;
173
173
  highchartsRenderer.highcharts_theme.yAxis.tickColor = chartLabelColor;
174
174
  highchartsRenderer.highcharts_theme.yAxis.labels.style = {
175
- "fontFamily": "Nunito Sans, sans-serif",
175
+ "fontFamily": "Poppins, sans-serif",
176
176
  "font-size": "10px",
177
177
  "color": "#85889c"
178
178
  };
179
179
  highchartsRenderer.highcharts_theme.yAxis.title.style = {
180
- "fontFamily": "Nunito Sans, sans-serif",
180
+ "fontFamily": "Poppins, sans-serif",
181
181
  "color": "#85889c",
182
182
  "font-size": "12px",
183
183
  "font-weight": "bold"
@@ -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
  }
@@ -782,7 +790,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
782
790
  if (disableAnimation) {
783
791
  chartOptions.drilldown.animation = false;
784
792
  }
785
- chartOptions.drilldown.drillUpButton = useNewUx ? {
793
+ chartOptions.drilldown.drillUpButton = {
786
794
  position: {
787
795
  align: 'left',
788
796
  verticalAlign: 'bottom',
@@ -809,33 +817,40 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
809
817
  }
810
818
  },
811
819
  relativeTo: 'spacingBox',
812
- } : {
813
- position: {
814
- align: 'right',
815
- verticalAlign: 'top',
816
- x: -5,
817
- y: 12,
818
- },
819
- theme: {
820
- fill: '#3d8eff',
821
- color: '#fff',
822
- 'stroke-width': 2,
823
- stroke: '#3d8eff',
824
- r: 3,
825
- states: {
826
- hover: {
827
- fill: '#2d7ae6',
828
- stroke: '#2d7ae6',
829
- color: 'white'
830
- },
831
- select: {
832
- stroke: '#039',
833
- fill: '#2d7ae6',
834
- color: 'white'
820
+ };
821
+ if (isNewAngular) {
822
+ const isPieChart = chartOptions.chart && chartOptions.chart.type === 'pie';
823
+ chartOptions.drilldown.breadcrumbs = {
824
+ formatter: () => '< Back',
825
+ showFullPath: false,
826
+ position: {
827
+ align: 'left',
828
+ verticalAlign: 'bottom',
829
+ x: isPieChart ? 0 : -80,
830
+ y: isPieChart ? 27 : 60,
831
+ },
832
+ floating: true,
833
+ buttonTheme: {
834
+ fill: 'white',
835
+ color: '#85889c',
836
+ 'stroke-width': 1,
837
+ stroke: '#85889c',
838
+ r: 3,
839
+ padding: 7,
840
+ states: {
841
+ hover: {
842
+ fill: '#eef3f6',
843
+ stroke: '#85889c',
844
+ color: '#85889c'
845
+ },
846
+ select: {
847
+ stroke: '#85889c',
848
+ fill: '#eef3f6',
849
+ color: '#85889c'
850
+ }
835
851
  }
836
- }
837
- },
838
- relativeTo: 'spacingBox',
852
+ },
853
+ }
839
854
  }
840
855
  }
841
856
 
@@ -1433,8 +1448,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
1433
1448
  col_ob.data.push([row_n_value[0], val]);
1434
1449
  }
1435
1450
  });
1436
-
1437
- pie_drill_down_series.push(col_ob);
1451
+ if (col_ob.data.length) {
1452
+ pie_drill_down_series.push(col_ob);
1453
+ }
1438
1454
  }
1439
1455
  });
1440
1456
 
@@ -2071,7 +2087,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
2071
2087
  align: 'center',
2072
2088
  text: opts && opts.chart_title ? opts.chart_title : "",
2073
2089
  style: {
2074
- 'font-family': "'Nunito Sans', sans-serif",
2090
+ 'font-family': "'Poppins', sans-serif",
2075
2091
  'font-weight': '300',
2076
2092
  'font-size': '18px',
2077
2093
  'color': '#2969b0'
@@ -2081,7 +2097,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
2081
2097
  align: 'center',
2082
2098
  text: additionOptions && additionOptions.subtitle ? additionOptions.subtitle.subtitle : '',
2083
2099
  style: {
2084
- 'font-family': "'Nunito Sans', sans-serif",
2100
+ 'font-family': "'Poppins', sans-serif",
2085
2101
  'font-weight': '100',
2086
2102
  'font-size': '14px',
2087
2103
  'color': '#2969b0'
@@ -5122,7 +5138,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
5122
5138
  'Tahoma',
5123
5139
  'Times New Roman',
5124
5140
  'Verdana',
5125
- 'Nunito Sans'
5141
+ 'Poppins'
5126
5142
  ];
5127
5143
 
5128
5144
  highchartsRenderer.getDefaultValueForSubOptions = function (type, existing_options) {
@@ -5282,7 +5298,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
5282
5298
  value_name: 'columns_font_style',
5283
5299
  element_label: 'Font style',
5284
5300
  element_options: fonts,
5285
- default_value: 'Nunito Sans'
5301
+ default_value: 'Poppins'
5286
5302
  },
5287
5303
  {
5288
5304
  element_type: 'select',
@@ -5311,7 +5327,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
5311
5327
  value_name: 'rows_font_style',
5312
5328
  element_label: 'Font style',
5313
5329
  element_options: fonts,
5314
- default_value: 'Nunito Sans'
5330
+ default_value: 'Poppins'
5315
5331
  },
5316
5332
  {
5317
5333
  element_type: 'select',
@@ -5340,7 +5356,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
5340
5356
  value_name: 'values_font_style',
5341
5357
  element_label: 'Font style',
5342
5358
  element_options: fonts,
5343
- default_value: 'Nunito Sans'
5359
+ default_value: 'Poppins'
5344
5360
  },
5345
5361
  {
5346
5362
  element_type: 'select',
@@ -5369,7 +5385,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
5369
5385
  value_name: 'totals_font_style',
5370
5386
  element_label: 'Font style',
5371
5387
  element_options: fonts,
5372
- default_value: 'Nunito Sans'
5388
+ default_value: 'Poppins'
5373
5389
  },
5374
5390
  {
5375
5391
  element_type: 'select',
package/src/pivot.css CHANGED
@@ -11,7 +11,7 @@ table.pvtTable {
11
11
  border-collapse: collapse;
12
12
  width: calc(100% - 30px);
13
13
  margin-bottom: 15px;
14
- font-family: 'Nunito Sans', sans-serif;
14
+ font-family: 'Poppins', sans-serif;
15
15
  font-weight: 400;
16
16
  user-select: text;
17
17
  }
@@ -20,7 +20,7 @@ table.pvtTable thead tr th, table.pvtTable tbody tr th {
20
20
  border: 1px solid #CDCDCD;
21
21
  font-size: 8pt;
22
22
  padding: 5px;
23
- font-family: 'Nunito Sans', sans-serif;
23
+ font-family: 'Poppins', sans-serif;
24
24
  font-weight: 700;
25
25
  }
26
26
 
@@ -43,7 +43,7 @@ table.pvtTable tbody tr td {
43
43
 
44
44
  .pvtTotal, .pvtGrandTotal {
45
45
  font-weight: bold;
46
- font-family: 'Nunito Sans', sans-serif;
46
+ font-family: 'Poppins', sans-serif;
47
47
  }
48
48
 
49
49
  .pvtVals { text-align: center; white-space: nowrap;}
@@ -216,13 +216,13 @@ table.pvtTable.newPvtTable {
216
216
  width: calc(100% - 40px);
217
217
  margin-left: 20px;
218
218
  margin-right: 20px;
219
- font-family: 'Nunito Sans', sans-serif;
219
+ font-family: 'Poppins', sans-serif;
220
220
  }
221
221
 
222
222
  table.pvtTable.newPvtTable thead tr th,
223
223
  table.pvtTable.newPvtTable tbody tr th {
224
224
  font-size: 10px;
225
- font-family: 'Nunito Sans', sans-serif;
225
+ font-family: 'Poppins', sans-serif;
226
226
  }
227
227
 
228
228
  table.pvtTable.newPvtTable thead tr th {