@datarailsshared/dr_renderer 1.2.83 → 1.2.86
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 +1 -1
- package/src/highcharts_renderer.js +75 -4
package/package.json
CHANGED
package/src/dr_pivottable.js
CHANGED
|
@@ -779,7 +779,7 @@ let initDRPivotTable = function($, window, document) {
|
|
|
779
779
|
applyInlineStyles = function(element, className) {
|
|
780
780
|
const tableDesignOptions = opts.chartOptions.table_design_options;
|
|
781
781
|
let optionName;
|
|
782
|
-
if (!className) return element;
|
|
782
|
+
if (!className || !tableDesignOptions) return element;
|
|
783
783
|
|
|
784
784
|
if (element.className.includes('pvtAxisLabel') ||
|
|
785
785
|
element.className.includes('pvtColLabel')) {
|
|
@@ -7,9 +7,11 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
7
7
|
|
|
8
8
|
let useNewUx = false;
|
|
9
9
|
let useTotalsCalculation = false;
|
|
10
|
+
let disableAnimation = false;
|
|
10
11
|
if (document.ReportHippo && document.ReportHippo && document.ReportHippo.user) {
|
|
11
12
|
useTotalsCalculation = lodash.includes(document.ReportHippo.user.features, 'enable_server_totals_calculation');
|
|
12
13
|
useNewUx = document.ReportHippo.user.organization && document.ReportHippo.user.organization.settings && document.ReportHippo.user.organization.settings.use_new_ux;
|
|
14
|
+
disableAnimation = document.ReportHippo.user.organization && document.ReportHippo.user.organization.settings && document.ReportHippo.user.organization.settings.disable_animation
|
|
13
15
|
}
|
|
14
16
|
const textColor = "#151a41";
|
|
15
17
|
const chartLabelColor = "#cfd7dd";
|
|
@@ -765,6 +767,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
765
767
|
return chartOptions;
|
|
766
768
|
}
|
|
767
769
|
if (chartOptions.drilldown) {
|
|
770
|
+
if (disableAnimation) {
|
|
771
|
+
chartOptions.drilldown.animation = false;
|
|
772
|
+
}
|
|
768
773
|
chartOptions.drilldown.drillUpButton = useNewUx ? {
|
|
769
774
|
position: {
|
|
770
775
|
align: 'left',
|
|
@@ -1489,6 +1494,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
1489
1494
|
plotShadow: false,
|
|
1490
1495
|
type: 'pie'
|
|
1491
1496
|
};
|
|
1497
|
+
if (disableAnimation) {
|
|
1498
|
+
chartOptions.chart.animation = false;
|
|
1499
|
+
}
|
|
1492
1500
|
highchartsRenderer.setTitleAndSubTitle(chartOptions, opts, additionOptions);
|
|
1493
1501
|
|
|
1494
1502
|
if (additionOptions && additionOptions.chart) {
|
|
@@ -1507,6 +1515,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
1507
1515
|
|
|
1508
1516
|
},
|
|
1509
1517
|
showInLegend: true
|
|
1518
|
+
},
|
|
1519
|
+
series: {
|
|
1520
|
+
animation: !disableAnimation
|
|
1510
1521
|
}
|
|
1511
1522
|
};
|
|
1512
1523
|
|
|
@@ -1611,7 +1622,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
1611
1622
|
chartOptions.chart = {
|
|
1612
1623
|
type: 'solidgauge'
|
|
1613
1624
|
};
|
|
1614
|
-
|
|
1625
|
+
if (disableAnimation) {
|
|
1626
|
+
chartOptions.chart.animation = false;
|
|
1627
|
+
}
|
|
1615
1628
|
highchartsRenderer.setTitleAndSubTitle(chartOptions, opts, gaugeopts);
|
|
1616
1629
|
|
|
1617
1630
|
chartOptions.plotOptions = {
|
|
@@ -1628,6 +1641,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
1628
1641
|
useHTML: true,
|
|
1629
1642
|
style: highchartsRenderer.getDataLabelsStyle(gaugeopts)
|
|
1630
1643
|
}
|
|
1644
|
+
},
|
|
1645
|
+
series: {
|
|
1646
|
+
animation: !disableAnimation
|
|
1631
1647
|
}
|
|
1632
1648
|
};
|
|
1633
1649
|
//chartOptions.tooltip = { pointFormat: '{series.name}: <b>{point.y}</b>', valueDecimals: 0 };
|
|
@@ -1733,7 +1749,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
1733
1749
|
chartOptions.chart = {
|
|
1734
1750
|
type: 'gauge'
|
|
1735
1751
|
};
|
|
1736
|
-
|
|
1752
|
+
if (disableAnimation) {
|
|
1753
|
+
chartOptions.chart.animation = false;
|
|
1754
|
+
}
|
|
1737
1755
|
highchartsRenderer.setTitleAndSubTitle(chartOptions, opts, gaugeopts);
|
|
1738
1756
|
chartOptions.plotOptions = {
|
|
1739
1757
|
solidgauge: {
|
|
@@ -1749,6 +1767,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
1749
1767
|
useHTML: true,
|
|
1750
1768
|
style: highchartsRenderer.getDataLabelsStyle(gaugeopts)
|
|
1751
1769
|
}
|
|
1770
|
+
},
|
|
1771
|
+
series: {
|
|
1772
|
+
animation: !disableAnimation
|
|
1752
1773
|
}
|
|
1753
1774
|
};
|
|
1754
1775
|
|
|
@@ -1891,6 +1912,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
1891
1912
|
chartOptions.chart = {
|
|
1892
1913
|
type: ''
|
|
1893
1914
|
};
|
|
1915
|
+
if (disableAnimation) {
|
|
1916
|
+
chartOptions.chart.animation = false;
|
|
1917
|
+
}
|
|
1894
1918
|
var uniqueVals = kpioptions.value.value == "Unique";
|
|
1895
1919
|
|
|
1896
1920
|
let temp_series = highchartsRenderer.ptCreateBasicLineSeries(pivotData, null, true, uniqueVals, null, opts, chartOptions);
|
|
@@ -1952,7 +1976,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
1952
1976
|
chartOptions.chart = {
|
|
1953
1977
|
type: 'gauge'
|
|
1954
1978
|
};
|
|
1955
|
-
|
|
1979
|
+
if (disableAnimation) {
|
|
1980
|
+
chartOptions.chart.animation = false;
|
|
1981
|
+
}
|
|
1956
1982
|
chartOptions.title = kpioptions.hideChartHeader ? null : {
|
|
1957
1983
|
text: kpioptions.name.name,
|
|
1958
1984
|
margin: 0,
|
|
@@ -1987,6 +2013,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
1987
2013
|
}
|
|
1988
2014
|
}
|
|
1989
2015
|
};
|
|
2016
|
+
if (disableAnimation) {
|
|
2017
|
+
chartOptions.chart.animation = false;
|
|
2018
|
+
}
|
|
1990
2019
|
highchartsRenderer.setTitleAndSubTitle(chartOptions, opts, additionOptions);
|
|
1991
2020
|
|
|
1992
2021
|
if (additionOptions && additionOptions.chart) {
|
|
@@ -1995,6 +2024,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
1995
2024
|
|
|
1996
2025
|
chartOptions.plotOptions = {
|
|
1997
2026
|
series: {
|
|
2027
|
+
animation: !disableAnimation,
|
|
1998
2028
|
dataLabels: {
|
|
1999
2029
|
allowOverlap: additionOptions && additionOptions.label_pie ? additionOptions.label_pie.overlap : false,
|
|
2000
2030
|
enabled: additionOptions && additionOptions.label_pie ? additionOptions.label_pie.show : false,
|
|
@@ -2056,7 +2086,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
2056
2086
|
chartOptions.chart = {
|
|
2057
2087
|
type: 'line'
|
|
2058
2088
|
};
|
|
2059
|
-
|
|
2089
|
+
if (disableAnimation) {
|
|
2090
|
+
chartOptions.chart.animation = false;
|
|
2091
|
+
}
|
|
2060
2092
|
highchartsRenderer.setTitleAndSubTitle(chartOptions, opts, additionOptions);
|
|
2061
2093
|
|
|
2062
2094
|
chartOptions.yAxis = {
|
|
@@ -2080,6 +2112,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
2080
2112
|
|
|
2081
2113
|
chartOptions.plotOptions = {
|
|
2082
2114
|
series: {
|
|
2115
|
+
animation: !disableAnimation,
|
|
2083
2116
|
dataLabels: {
|
|
2084
2117
|
allowOverlap: additionOptions && additionOptions.label ? additionOptions.label.overlap : false,
|
|
2085
2118
|
enabled: additionOptions && additionOptions.label ? additionOptions.label.show : true,
|
|
@@ -2133,6 +2166,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
2133
2166
|
chartOptions.chart = {
|
|
2134
2167
|
type: 'scatter'
|
|
2135
2168
|
};
|
|
2169
|
+
if (disableAnimation) {
|
|
2170
|
+
chartOptions.chart.animation = false;
|
|
2171
|
+
}
|
|
2136
2172
|
highchartsRenderer.setTitleAndSubTitle(chartOptions, opts, additionOptions);
|
|
2137
2173
|
chartOptions.yAxis = {
|
|
2138
2174
|
min: additionOptions && additionOptions.axisY && !isNaN(parseInt(additionOptions.axisY.min)) ? additionOptions.axisY.min : null,
|
|
@@ -2159,6 +2195,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
2159
2195
|
}
|
|
2160
2196
|
},
|
|
2161
2197
|
series: {
|
|
2198
|
+
animation: !disableAnimation,
|
|
2162
2199
|
dataLabels: {
|
|
2163
2200
|
allowOverlap: additionOptions && additionOptions.label ? additionOptions.label.overlap : false,
|
|
2164
2201
|
enabled: additionOptions && additionOptions.label ? additionOptions.label.show : true,
|
|
@@ -2226,6 +2263,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
2226
2263
|
chartOptions.chart = {
|
|
2227
2264
|
type: 'spline'
|
|
2228
2265
|
};
|
|
2266
|
+
if (disableAnimation) {
|
|
2267
|
+
chartOptions.chart.animation = false;
|
|
2268
|
+
}
|
|
2229
2269
|
highchartsRenderer.setTitleAndSubTitle(chartOptions, opts, additionOptions);
|
|
2230
2270
|
chartOptions.yAxis = {
|
|
2231
2271
|
min: additionOptions && additionOptions.axisY && !isNaN(parseInt(additionOptions.axisY.min)) ? additionOptions.axisY.min : null,
|
|
@@ -2247,6 +2287,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
2247
2287
|
|
|
2248
2288
|
chartOptions.plotOptions = {
|
|
2249
2289
|
series: {
|
|
2290
|
+
animation: !disableAnimation,
|
|
2250
2291
|
dataLabels: {
|
|
2251
2292
|
allowOverlap: additionOptions && additionOptions.label ? additionOptions.label.overlap : false,
|
|
2252
2293
|
enabled: additionOptions && additionOptions.label ? additionOptions.label.show : true,
|
|
@@ -2298,6 +2339,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
2298
2339
|
chartOptions.chart = {
|
|
2299
2340
|
type: type === 'area-chart' ? 'area' : 'areaspline'
|
|
2300
2341
|
};
|
|
2342
|
+
if (disableAnimation) {
|
|
2343
|
+
chartOptions.chart.animation = false;
|
|
2344
|
+
}
|
|
2301
2345
|
highchartsRenderer.setTitleAndSubTitle(chartOptions, opts, additionOptions);
|
|
2302
2346
|
chartOptions.yAxis = {
|
|
2303
2347
|
min: additionOptions && additionOptions.axisY && !isNaN(parseInt(additionOptions.axisY.min)) ? additionOptions.axisY.min : null,
|
|
@@ -2347,6 +2391,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
2347
2391
|
}
|
|
2348
2392
|
},
|
|
2349
2393
|
series: {
|
|
2394
|
+
animation: !disableAnimation,
|
|
2350
2395
|
dataLabels: {
|
|
2351
2396
|
allowOverlap: additionOptions && additionOptions.label ? additionOptions.label.overlap : false,
|
|
2352
2397
|
enabled: additionOptions && additionOptions.label ? additionOptions.label.show : true,
|
|
@@ -2379,6 +2424,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
2379
2424
|
polar: true,
|
|
2380
2425
|
type: 'line'
|
|
2381
2426
|
};
|
|
2427
|
+
if (disableAnimation) {
|
|
2428
|
+
chartOptions.chart.animation = false;
|
|
2429
|
+
}
|
|
2382
2430
|
highchartsRenderer.setTitleAndSubTitle(chartOptions, opts, additionOptions);
|
|
2383
2431
|
chartOptions.yAxis = {
|
|
2384
2432
|
gridLineInterpolation: 'polygon',
|
|
@@ -2399,6 +2447,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
2399
2447
|
|
|
2400
2448
|
chartOptions.plotOptions = {
|
|
2401
2449
|
series: {
|
|
2450
|
+
animation: !disableAnimation,
|
|
2402
2451
|
dataLabels: {
|
|
2403
2452
|
allowOverlap: additionOptions && additionOptions.label ? additionOptions.label.overlap : false,
|
|
2404
2453
|
enabled: additionOptions && additionOptions.label ? additionOptions.label.show : true,
|
|
@@ -2459,6 +2508,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
2459
2508
|
|
|
2460
2509
|
}
|
|
2461
2510
|
};
|
|
2511
|
+
if (disableAnimation) {
|
|
2512
|
+
chartOptions.chart.animation = false;
|
|
2513
|
+
}
|
|
2462
2514
|
|
|
2463
2515
|
chartOptions.xAxis = {
|
|
2464
2516
|
type: 'category',
|
|
@@ -2518,6 +2570,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
2518
2570
|
borderWidth: 0
|
|
2519
2571
|
},
|
|
2520
2572
|
series: {
|
|
2573
|
+
animation: !disableAnimation,
|
|
2521
2574
|
cropThreshold: 1000,
|
|
2522
2575
|
dataLabels: {
|
|
2523
2576
|
allowOverlap: additionOptions && additionOptions.label ? additionOptions.label.overlap : false,
|
|
@@ -2570,6 +2623,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
2570
2623
|
|
|
2571
2624
|
}
|
|
2572
2625
|
};
|
|
2626
|
+
if (disableAnimation) {
|
|
2627
|
+
chartOptions.chart.animation = false;
|
|
2628
|
+
}
|
|
2573
2629
|
highchartsRenderer.setTitleAndSubTitle(chartOptions, opts, additionOptions);
|
|
2574
2630
|
chartOptions.yAxis = {
|
|
2575
2631
|
min: additionOptions && additionOptions.axisY && !isNaN(parseInt(additionOptions.axisY.min)) ? additionOptions.axisY.min : null,
|
|
@@ -2656,6 +2712,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
2656
2712
|
}),
|
|
2657
2713
|
color: 'contrast'
|
|
2658
2714
|
}
|
|
2715
|
+
},
|
|
2716
|
+
series: {
|
|
2717
|
+
animation: !disableAnimation
|
|
2659
2718
|
}
|
|
2660
2719
|
};
|
|
2661
2720
|
|
|
@@ -2713,6 +2772,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
2713
2772
|
|
|
2714
2773
|
}
|
|
2715
2774
|
};
|
|
2775
|
+
if (disableAnimation) {
|
|
2776
|
+
chartOptions.chart.animation = false;
|
|
2777
|
+
}
|
|
2716
2778
|
highchartsRenderer.setTitleAndSubTitle(chartOptions, opts, additionOptions);
|
|
2717
2779
|
|
|
2718
2780
|
chartOptions.yAxis = {
|
|
@@ -2730,6 +2792,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
2730
2792
|
|
|
2731
2793
|
chartOptions.plotOptions = {
|
|
2732
2794
|
series: {
|
|
2795
|
+
animation: !disableAnimation,
|
|
2733
2796
|
borderWidth: 0,
|
|
2734
2797
|
cropThreshold: 1000,
|
|
2735
2798
|
dataLabels: {
|
|
@@ -2804,6 +2867,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
2804
2867
|
chartOptions.chart = {
|
|
2805
2868
|
type: 'bar'
|
|
2806
2869
|
};
|
|
2870
|
+
if (disableAnimation) {
|
|
2871
|
+
chartOptions.chart.animation = false;
|
|
2872
|
+
}
|
|
2807
2873
|
highchartsRenderer.setTitleAndSubTitle(chartOptions, opts, additionOptions);
|
|
2808
2874
|
chartOptions.yAxis = {
|
|
2809
2875
|
min: additionOptions && additionOptions.axisY && !isNaN(parseInt(additionOptions.axisY.min)) ? additionOptions.axisY.min : null,
|
|
@@ -2846,6 +2912,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
2846
2912
|
borderWidth: 0
|
|
2847
2913
|
},
|
|
2848
2914
|
series: {
|
|
2915
|
+
animation: !disableAnimation,
|
|
2849
2916
|
cropThreshold: 1000,
|
|
2850
2917
|
dataLabels: {
|
|
2851
2918
|
allowOverlap: additionOptions && additionOptions.label ? additionOptions.label.overlap : false,
|
|
@@ -2881,6 +2948,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
2881
2948
|
type: 'bar',
|
|
2882
2949
|
zoomType: 'x'
|
|
2883
2950
|
};
|
|
2951
|
+
if (disableAnimation) {
|
|
2952
|
+
chartOptions.chart.animation = false;
|
|
2953
|
+
}
|
|
2884
2954
|
highchartsRenderer.setTitleAndSubTitle(chartOptions, opts, additionOptions);
|
|
2885
2955
|
chartOptions.yAxis = {
|
|
2886
2956
|
min: additionOptions && additionOptions.axisY && !isNaN(parseInt(additionOptions.axisY.min)) ? additionOptions.axisY.min : null,
|
|
@@ -2930,6 +3000,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
2930
3000
|
|
|
2931
3001
|
chartOptions.plotOptions = {
|
|
2932
3002
|
series: {
|
|
3003
|
+
animation: !disableAnimation,
|
|
2933
3004
|
stacking: 'normal'
|
|
2934
3005
|
}
|
|
2935
3006
|
};
|