@datarailsshared/dr_renderer 1.2.72 → 1.2.73
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
|
@@ -465,7 +465,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
465
465
|
rows = temp;
|
|
466
466
|
}
|
|
467
467
|
|
|
468
|
-
if (opts && opts.chartOptions && opts.chartOptions.label && opts.chartOptions.label.
|
|
468
|
+
if (opts && opts.chartOptions && opts.chartOptions.label && opts.chartOptions.label.percentage) {
|
|
469
|
+
return (Math.round((this.y / this.total) * 10000) / 100) + '%';
|
|
470
|
+
} else if (opts && opts.chartOptions && opts.chartOptions.label && opts.chartOptions.label.show_percentage) {
|
|
469
471
|
let aggrPercentages = pivotData.getAggregator(rows, [])
|
|
470
472
|
let total = aggrPercentages.value()
|
|
471
473
|
percentages = total ? ' (' + Math.round(value/total * 100) + '%)' : '';
|