@datarailsshared/dr_renderer 1.2.43 → 1.2.47
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/dr_pivottable.js +3 -0
- package/src/highcharts_renderer.js +25 -0
package/package.json
CHANGED
package/src/dr_pivottable.js
CHANGED
|
@@ -384,6 +384,7 @@ let initDRPivotTable = function($, window, document) {
|
|
|
384
384
|
pvtData.rowKeys = [];
|
|
385
385
|
pvtData.colKeys = [];
|
|
386
386
|
tooMuch = true;
|
|
387
|
+
opts.error_has_occurred = true;
|
|
387
388
|
}
|
|
388
389
|
return SubtotalRenderer(pvtData, opts, charttype, tooMuch);
|
|
389
390
|
}
|
|
@@ -2001,6 +2002,8 @@ let initDRPivotTable = function($, window, document) {
|
|
|
2001
2002
|
|
|
2002
2003
|
handleFreezePanesScroll = function(freezableElements) {
|
|
2003
2004
|
return function(event) {
|
|
2005
|
+
if (event.target.dataset.canFreezePanes) return;
|
|
2006
|
+
|
|
2004
2007
|
const wrapper = event.target;
|
|
2005
2008
|
|
|
2006
2009
|
const translateY = `translate(0px, ${wrapper.scrollTop}px)`;
|
|
@@ -822,6 +822,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
822
822
|
result = highchartsRenderer.getNoDataResult(chartOptions);
|
|
823
823
|
} else if (!chartOptions.onlyText && chartOptions.series && toMatch) {
|
|
824
824
|
result = highchartsRenderer.getNoDataResult(chartOptions, toMatch);
|
|
825
|
+
opts.error_has_occurred = true;
|
|
825
826
|
} else {
|
|
826
827
|
chartOptions = highchartsRenderer.updateChartOptions(chartOptions, opts);
|
|
827
828
|
chartOptions = highchartsRenderer.updateChartOptions(chartOptions, {credits: {enabled: false}});
|
|
@@ -3715,6 +3716,30 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
3715
3716
|
return to_return;
|
|
3716
3717
|
};
|
|
3717
3718
|
|
|
3719
|
+
highchartsRenderer.checkFreezePanesAvaliable = function (pivotView) {
|
|
3720
|
+
if (!pivotView || !pivotView.querySelector) {
|
|
3721
|
+
return;
|
|
3722
|
+
}
|
|
3723
|
+
|
|
3724
|
+
const tableContainer = pivotView.querySelector('.pivot-div');
|
|
3725
|
+
const tableHead = pivotView.querySelector('table.pvtTable thead');
|
|
3726
|
+
const tableHeadChildren = tableHead ? tableHead.children[0] : null;
|
|
3727
|
+
const trChildren = tableHeadChildren ? tableHeadChildren.children : [];
|
|
3728
|
+
let thWidth = 0;
|
|
3729
|
+
|
|
3730
|
+
for (let th of trChildren) {
|
|
3731
|
+
if (th.classList.contains('axis-freeze-pane') || th.classList.contains('horizontal-freeze-pane')) {
|
|
3732
|
+
thWidth += th.offsetWidth;
|
|
3733
|
+
}
|
|
3734
|
+
}
|
|
3735
|
+
|
|
3736
|
+
if (thWidth >= tableContainer.offsetWidth) {
|
|
3737
|
+
tableContainer.dataset.canFreezePanes = 'false';
|
|
3738
|
+
} else if (thWidth < tableContainer.offsetWidth && tableContainer.dataset.canFreezePanes) {
|
|
3739
|
+
delete tableContainer.dataset.canFreezePanes;
|
|
3740
|
+
}
|
|
3741
|
+
};
|
|
3742
|
+
|
|
3718
3743
|
highchartsRenderer.rhPivotView = function (rowData, options, isTable = false) {
|
|
3719
3744
|
if (!rowData || !rowData) {
|
|
3720
3745
|
if (options.onlyOptions) {
|