@datarailsshared/dr_renderer 1.2.191-dragons → 1.2.193-dragons

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.191-dragons",
3
+ "version": "1.2.193-dragons",
4
4
  "description": "DataRails charts and tables renderer",
5
5
  "keywords": [
6
6
  "datarails",
@@ -3261,6 +3261,10 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
3261
3261
  enabled: false
3262
3262
  };
3263
3263
 
3264
+ chartOptions.xAxis.labels = {
3265
+ formatter: highchartsRenderer.getBreakdownXAxisLabelFormatter(chartOptions.series),
3266
+ };
3267
+
3264
3268
  return highchartsRenderer.ptCreateElementAndDraw(chartOptions, opts);
3265
3269
  };
3266
3270
 
@@ -6781,8 +6785,8 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
6781
6785
  [highchartsRenderer.CHART_TYPES.WATERFALL_BREAKDOWN]: {
6782
6786
  name: 'Breakdown Chart ',
6783
6787
  label: 'Breakdown Chart ',
6784
- title: 'Explain financial outcomes differences.',
6785
- description: 'For example, describe the gaps between last and current year total revenue, breakdown by department.',
6788
+ title: 'Analyzes what’s contributing to the financial increase or decrease.',
6789
+ description: 'For example, analyzes what’s contributing most to the difference in total revenue between last year and this year.',
6786
6790
  titleInEditor: 'This chart displays the breakdown of variance between two or more total values.',
6787
6791
  axisName: 'Category',
6788
6792
  legendName: 'Breakdown',
@@ -8660,6 +8664,15 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
8660
8664
  return { rows, cols };
8661
8665
  }
8662
8666
 
8667
+ highchartsRenderer.getBreakdownXAxisLabelFormatter = function(chartSeries) {
8668
+ const styleForCategoryLabel = 'font-weight: 700; font-size: 12px;';
8669
+ const styleForBreakdownLabel = 'font-weight: 600; color: #6f6f6f; font-size: 11px;';
8670
+ return function() {
8671
+ const isTotal = lodash.some(chartSeries[0].data, point => point.name === this.value && point.isTotal);
8672
+ return `<span style="${ isTotal ? styleForCategoryLabel : styleForBreakdownLabel }">${ this.value }</span>`;
8673
+ }
8674
+ }
8675
+
8663
8676
  return highchartsRenderer;
8664
8677
  };
8665
8678