@datarailsshared/dr_renderer 1.2.197 → 1.2.198

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.197",
3
+ "version": "1.2.198",
4
4
  "description": "DataRails charts and tables renderer",
5
5
  "keywords": [
6
6
  "datarails",
@@ -3276,6 +3276,10 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
3276
3276
  enabled: false
3277
3277
  };
3278
3278
 
3279
+ chartOptions.xAxis.labels = {
3280
+ formatter: highchartsRenderer.getBreakdownXAxisLabelFormatter(chartOptions.series),
3281
+ };
3282
+
3279
3283
  return highchartsRenderer.ptCreateElementAndDraw(chartOptions, opts);
3280
3284
  };
3281
3285
 
@@ -8674,6 +8678,14 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
8674
8678
  return { rows, cols };
8675
8679
  }
8676
8680
 
8681
+ highchartsRenderer.getBreakdownXAxisLabelFormatter = function(chartSeries) {
8682
+ const styleForBreakdownLabel = 'font-weight: normal; color: #51566f;';
8683
+ return function() {
8684
+ const isTotal = lodash.some(chartSeries[0].data, point => point.name === this.value && point.isTotal);
8685
+ return `<span style="${ isTotal ? '' : styleForBreakdownLabel }">${ this.value }</span>`;
8686
+ }
8687
+ }
8688
+
8677
8689
  return highchartsRenderer;
8678
8690
  };
8679
8691