@datarailsshared/dr_renderer 1.2.99 → 1.2.100

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.99",
3
+ "version": "1.2.100",
4
4
  "description": "DataRails charts and tables renderer",
5
5
  "keywords": [
6
6
  "datarails",
@@ -646,10 +646,10 @@ let initDRPivotTable = function($, window, document) {
646
646
  getColorsWithOffsetForTable = function (value) {
647
647
  var colors = [];
648
648
 
649
- if (opts.paletteOptions.widgetPalette) {
649
+ if (opts.paletteOptions && opts.paletteOptions.widgetPalette) {
650
650
  const mc_palette = _.find(_.get(opts.paletteOptions, 'monochromePalettes', []), { selected: true });
651
651
  colors = mc_palette ? mc_palette.colors : opts.paletteOptions.widgetPalette;
652
- } else if (opts.paletteOptions.dashboardPalette && opts.paletteOptions.dashboardPalette.colors) {
652
+ } else if (opts.paletteOptions && opts.paletteOptions.dashboardPalette && opts.paletteOptions.dashboardPalette.colors) {
653
653
  colors = opts.paletteOptions.dashboardPalette.colors;
654
654
  } else {
655
655
  colors = newTableColors;
@@ -304,7 +304,7 @@ let initNovixRenderer = function($, window, document, Handsontable){
304
304
  dataSource.fixedColumns = pvtData.rowAttrs.length + (hasColumnAttr ? 1 : 0);
305
305
  dataSource.fixedRows = pvtData.colAttrs.length + (hasRowAttr ? 1 : 0);
306
306
 
307
- for (i = 0; i < pvtData.rowAttrs.length; i++) {
307
+ for (let i = 0; i < pvtData.rowAttrs.length; i++) {
308
308
  rowKeys.sort((a,b) => {
309
309
  if (_.isEqual(a.slice(0, i), b.slice(0,i)) && a[i] && a[i] === subtotal) return -1;
310
310
  if (_.isEqual(a.slice(0, i), b.slice(0,i)) && b[i] && b[i] === subtotal) return 1;