@datarailsshared/dr_renderer 1.2.125 → 1.2.128
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/.circleci/config.yml +11 -1
- package/package.json +1 -1
- package/src/highcharts_renderer.js +29 -6
package/.circleci/config.yml
CHANGED
|
@@ -29,7 +29,17 @@ jobs:
|
|
|
29
29
|
- run:
|
|
30
30
|
name: Publish package
|
|
31
31
|
command: npm publish . --access=public
|
|
32
|
-
|
|
32
|
+
- run:
|
|
33
|
+
name: prepare git tag
|
|
34
|
+
command: |
|
|
35
|
+
VERSION="1.2.$CIRCLE_BUILD_NUM"
|
|
36
|
+
git config --global user.email noreplay@circleci.com
|
|
37
|
+
git config --global user.name circleci
|
|
38
|
+
git config --global -l
|
|
39
|
+
git tag -a "$CIRCLE_BRANCH/$VERSION" -m "circleci build"
|
|
40
|
+
ssh -o "StrictHostKeyChecking no" -T git@bitbucket.org
|
|
41
|
+
git push --tags origin
|
|
42
|
+
echo 555
|
|
33
43
|
workflows:
|
|
34
44
|
version: 2
|
|
35
45
|
npm-publish:
|
package/package.json
CHANGED
|
@@ -422,6 +422,10 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
422
422
|
}
|
|
423
423
|
|
|
424
424
|
const labelOptions = lodash.get(opts.chartOptions, 'label') || lodash.get(opts.chartOptions, 'label_pie');
|
|
425
|
+
const othersName = opts.total_value_options ?
|
|
426
|
+
lodash.get(opts, "total_value_options.filter_options.filteredOutFieldName") || 'Others' :
|
|
427
|
+
undefined;
|
|
428
|
+
var drOthersInColumn = lodash.find(pivotData.getColKeys(), keys => keys.length && (keys.includes('DR_Others') || keys.includes(othersName)));
|
|
425
429
|
|
|
426
430
|
var func = function () {
|
|
427
431
|
var value = parseFloat(this.y);
|
|
@@ -447,8 +451,19 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
447
451
|
cols = this.point.name;
|
|
448
452
|
}
|
|
449
453
|
|
|
450
|
-
|
|
451
|
-
|
|
454
|
+
if (drOthersInColumn) {
|
|
455
|
+
if (!lodash.isArray(cols) && othersName === cols) {
|
|
456
|
+
cols = ['DR_Others'];
|
|
457
|
+
} else if (lodash.isArray(cols)) {
|
|
458
|
+
var index = cols.indexOf(othersName);
|
|
459
|
+
|
|
460
|
+
if (index !== -1) {
|
|
461
|
+
cols[index] = 'DR_Others';
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
if (!lodash.isArray(cols)) {
|
|
452
467
|
cols = [cols];
|
|
453
468
|
}
|
|
454
469
|
|
|
@@ -1109,7 +1124,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
1109
1124
|
ob.dataLabels = {
|
|
1110
1125
|
allowOverlap: additionOptions && additionOptions.label ? additionOptions.label.overlap : false,
|
|
1111
1126
|
enabled: additionOptions && additionOptions.label ? additionOptions.label.show : true,
|
|
1112
|
-
formatter: highchartsRenderer.defaultDataLabelFormatter(pivotData, {'chartOptions': additionOptions}),
|
|
1127
|
+
formatter: highchartsRenderer.defaultDataLabelFormatter(pivotData, {'chartOptions': additionOptions, total_value_options: opts.total_value_options}),
|
|
1113
1128
|
style: highchartsRenderer.getDataLabelsStyle(additionOptions)
|
|
1114
1129
|
}
|
|
1115
1130
|
|
|
@@ -7895,13 +7910,21 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
7895
7910
|
}
|
|
7896
7911
|
|
|
7897
7912
|
// another code for charts and tables
|
|
7913
|
+
let default_show = lodash.get(widget_obj.options, 'chartOptions.default_show.value', 'chart');
|
|
7898
7914
|
|
|
7899
7915
|
let subopts = null;
|
|
7916
|
+
let is_table = false;
|
|
7900
7917
|
|
|
7901
|
-
|
|
7902
|
-
|
|
7918
|
+
if (default_show == "table"){
|
|
7919
|
+
subopts = highchartsRenderer.getOptionsForTable(widget_obj, pivot);
|
|
7920
|
+
is_table = true;
|
|
7921
|
+
}
|
|
7922
|
+
else{
|
|
7923
|
+
subopts = highchartsRenderer.getSupOptionsForPivot(widget_obj, pivot, true);
|
|
7924
|
+
subopts.onlyOptions = true;
|
|
7925
|
+
}
|
|
7903
7926
|
|
|
7904
|
-
let hc_options = highchartsRenderer.rhPivotView(res, subopts,
|
|
7927
|
+
let hc_options = highchartsRenderer.rhPivotView(res, subopts, is_table);
|
|
7905
7928
|
|
|
7906
7929
|
return hc_options;
|
|
7907
7930
|
}
|