@datarailsshared/dr_renderer 1.2.395 → 1.2.396

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.395",
3
+ "version": "1.2.396",
4
4
  "description": "DataRails charts and tables renderer",
5
5
  "keywords": [
6
6
  "datarails",
@@ -728,7 +728,8 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
728
728
  destroyWhenHiding: true,
729
729
  formatter: function () {
730
730
  const rowKey = pivotData.rowAttrs.length ? lodash.get(this.point, 'series.name') || "" : "";
731
- const colKey = lodash.get(this.point, 'name') || this.x.name[0] || "";
731
+ const colKey = lodash.get(this.point, 'initialName') || lodash.get(this.point, 'name') || this.x.name[0] || "";
732
+
732
733
  const insight = pivotData.getInsight(colKey, rowKey) || {};
733
734
  setTimeout(() => {
734
735
  var aggr = highchartsRenderer.defaultFormatterToTooltip(pivotData, opts);
@@ -1520,10 +1521,14 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
1520
1521
  let totalKey = columnKey;
1521
1522
  if (lodash.isArray(columnKey)) {
1522
1523
  key = columnKey[0];
1523
- totalKey = totalKey.join(' , ');
1524
+ totalKey = totalKey.join(highchartsRenderer.delimer);
1524
1525
  }
1526
+
1527
+ const initialKey = lodash.unescape(key);
1528
+ const formattedKey = highchartsRenderer.getFormattedColKey(initialKey, pivotData);
1525
1529
  const value = pivotData.colTotals[totalKey] ? pivotData.colTotals[totalKey].value() : 0;
1526
- totalSeries.data.push({name: lodash.unescape(key), y: value});
1530
+
1531
+ totalSeries.data.push({name: lodash.unescape(formattedKey), initialName: initialKey, y: value});
1527
1532
  });
1528
1533
 
1529
1534
  chart_series.push(totalSeries);
@@ -8927,6 +8932,8 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
8927
8932
  value,
8928
8933
  highchartsRenderer.getDateFieldFormat(widget, widget.cols[0])
8929
8934
  );
8935
+ } else if (!isNaN(value)) {
8936
+ value = +value;
8930
8937
  }
8931
8938
  break;
8932
8939
  case 'Integer':
@@ -9765,11 +9772,11 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
9765
9772
  const isDate = formatInfo.type === 'Date';
9766
9773
  const isDateFormatting = isDate && highchartsRenderer.isFormattingDatesAsOtherAxisTypes();
9767
9774
  const isNumberFormatting = !isDate && formatInfo.format && highchartsRenderer.isFormattingNumberAxis(pivotData);
9768
- const isApplyingFormat = !isNaN(valueToFloat) && (isNumberFormatting || isDateFormatting);
9769
- if (isApplyingFormat) {
9775
+
9776
+ if (isNumberFormatting || isDateFormatting) {
9770
9777
  values[key] = highchartsRenderer.returnRawDataValue(
9771
9778
  formatInfo.type,
9772
- valueToFloat,
9779
+ !isNaN(valueToFloat) ? valueToFloat : value,
9773
9780
  formatInfo.format,
9774
9781
  formatInfo.name,
9775
9782
  formatInfo.val_not_convert,