@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 +1 -1
- package/src/highcharts_renderer.js +15 -2
package/package.json
CHANGED
|
@@ -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: '
|
|
6785
|
-
description: 'For example,
|
|
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
|
|