@datarailsshared/dr_renderer 1.2.83 → 1.2.84
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 +72 -4
package/package.json
CHANGED
|
@@ -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";
|
|
@@ -1489,6 +1491,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
1489
1491
|
plotShadow: false,
|
|
1490
1492
|
type: 'pie'
|
|
1491
1493
|
};
|
|
1494
|
+
if (disableAnimation) {
|
|
1495
|
+
chartOptions.chart.animation = false;
|
|
1496
|
+
}
|
|
1492
1497
|
highchartsRenderer.setTitleAndSubTitle(chartOptions, opts, additionOptions);
|
|
1493
1498
|
|
|
1494
1499
|
if (additionOptions && additionOptions.chart) {
|
|
@@ -1507,6 +1512,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
1507
1512
|
|
|
1508
1513
|
},
|
|
1509
1514
|
showInLegend: true
|
|
1515
|
+
},
|
|
1516
|
+
series: {
|
|
1517
|
+
animation: !disableAnimation
|
|
1510
1518
|
}
|
|
1511
1519
|
};
|
|
1512
1520
|
|
|
@@ -1611,7 +1619,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
1611
1619
|
chartOptions.chart = {
|
|
1612
1620
|
type: 'solidgauge'
|
|
1613
1621
|
};
|
|
1614
|
-
|
|
1622
|
+
if (disableAnimation) {
|
|
1623
|
+
chartOptions.chart.animation = false;
|
|
1624
|
+
}
|
|
1615
1625
|
highchartsRenderer.setTitleAndSubTitle(chartOptions, opts, gaugeopts);
|
|
1616
1626
|
|
|
1617
1627
|
chartOptions.plotOptions = {
|
|
@@ -1628,6 +1638,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
1628
1638
|
useHTML: true,
|
|
1629
1639
|
style: highchartsRenderer.getDataLabelsStyle(gaugeopts)
|
|
1630
1640
|
}
|
|
1641
|
+
},
|
|
1642
|
+
series: {
|
|
1643
|
+
animation: !disableAnimation
|
|
1631
1644
|
}
|
|
1632
1645
|
};
|
|
1633
1646
|
//chartOptions.tooltip = { pointFormat: '{series.name}: <b>{point.y}</b>', valueDecimals: 0 };
|
|
@@ -1733,7 +1746,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
1733
1746
|
chartOptions.chart = {
|
|
1734
1747
|
type: 'gauge'
|
|
1735
1748
|
};
|
|
1736
|
-
|
|
1749
|
+
if (disableAnimation) {
|
|
1750
|
+
chartOptions.chart.animation = false;
|
|
1751
|
+
}
|
|
1737
1752
|
highchartsRenderer.setTitleAndSubTitle(chartOptions, opts, gaugeopts);
|
|
1738
1753
|
chartOptions.plotOptions = {
|
|
1739
1754
|
solidgauge: {
|
|
@@ -1749,6 +1764,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
1749
1764
|
useHTML: true,
|
|
1750
1765
|
style: highchartsRenderer.getDataLabelsStyle(gaugeopts)
|
|
1751
1766
|
}
|
|
1767
|
+
},
|
|
1768
|
+
series: {
|
|
1769
|
+
animation: !disableAnimation
|
|
1752
1770
|
}
|
|
1753
1771
|
};
|
|
1754
1772
|
|
|
@@ -1891,6 +1909,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
1891
1909
|
chartOptions.chart = {
|
|
1892
1910
|
type: ''
|
|
1893
1911
|
};
|
|
1912
|
+
if (disableAnimation) {
|
|
1913
|
+
chartOptions.chart.animation = false;
|
|
1914
|
+
}
|
|
1894
1915
|
var uniqueVals = kpioptions.value.value == "Unique";
|
|
1895
1916
|
|
|
1896
1917
|
let temp_series = highchartsRenderer.ptCreateBasicLineSeries(pivotData, null, true, uniqueVals, null, opts, chartOptions);
|
|
@@ -1952,7 +1973,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
1952
1973
|
chartOptions.chart = {
|
|
1953
1974
|
type: 'gauge'
|
|
1954
1975
|
};
|
|
1955
|
-
|
|
1976
|
+
if (disableAnimation) {
|
|
1977
|
+
chartOptions.chart.animation = false;
|
|
1978
|
+
}
|
|
1956
1979
|
chartOptions.title = kpioptions.hideChartHeader ? null : {
|
|
1957
1980
|
text: kpioptions.name.name,
|
|
1958
1981
|
margin: 0,
|
|
@@ -1987,6 +2010,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
1987
2010
|
}
|
|
1988
2011
|
}
|
|
1989
2012
|
};
|
|
2013
|
+
if (disableAnimation) {
|
|
2014
|
+
chartOptions.chart.animation = false;
|
|
2015
|
+
}
|
|
1990
2016
|
highchartsRenderer.setTitleAndSubTitle(chartOptions, opts, additionOptions);
|
|
1991
2017
|
|
|
1992
2018
|
if (additionOptions && additionOptions.chart) {
|
|
@@ -1995,6 +2021,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
1995
2021
|
|
|
1996
2022
|
chartOptions.plotOptions = {
|
|
1997
2023
|
series: {
|
|
2024
|
+
animation: !disableAnimation,
|
|
1998
2025
|
dataLabels: {
|
|
1999
2026
|
allowOverlap: additionOptions && additionOptions.label_pie ? additionOptions.label_pie.overlap : false,
|
|
2000
2027
|
enabled: additionOptions && additionOptions.label_pie ? additionOptions.label_pie.show : false,
|
|
@@ -2056,7 +2083,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
2056
2083
|
chartOptions.chart = {
|
|
2057
2084
|
type: 'line'
|
|
2058
2085
|
};
|
|
2059
|
-
|
|
2086
|
+
if (disableAnimation) {
|
|
2087
|
+
chartOptions.chart.animation = false;
|
|
2088
|
+
}
|
|
2060
2089
|
highchartsRenderer.setTitleAndSubTitle(chartOptions, opts, additionOptions);
|
|
2061
2090
|
|
|
2062
2091
|
chartOptions.yAxis = {
|
|
@@ -2080,6 +2109,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
2080
2109
|
|
|
2081
2110
|
chartOptions.plotOptions = {
|
|
2082
2111
|
series: {
|
|
2112
|
+
animation: !disableAnimation,
|
|
2083
2113
|
dataLabels: {
|
|
2084
2114
|
allowOverlap: additionOptions && additionOptions.label ? additionOptions.label.overlap : false,
|
|
2085
2115
|
enabled: additionOptions && additionOptions.label ? additionOptions.label.show : true,
|
|
@@ -2133,6 +2163,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
2133
2163
|
chartOptions.chart = {
|
|
2134
2164
|
type: 'scatter'
|
|
2135
2165
|
};
|
|
2166
|
+
if (disableAnimation) {
|
|
2167
|
+
chartOptions.chart.animation = false;
|
|
2168
|
+
}
|
|
2136
2169
|
highchartsRenderer.setTitleAndSubTitle(chartOptions, opts, additionOptions);
|
|
2137
2170
|
chartOptions.yAxis = {
|
|
2138
2171
|
min: additionOptions && additionOptions.axisY && !isNaN(parseInt(additionOptions.axisY.min)) ? additionOptions.axisY.min : null,
|
|
@@ -2159,6 +2192,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
2159
2192
|
}
|
|
2160
2193
|
},
|
|
2161
2194
|
series: {
|
|
2195
|
+
animation: !disableAnimation,
|
|
2162
2196
|
dataLabels: {
|
|
2163
2197
|
allowOverlap: additionOptions && additionOptions.label ? additionOptions.label.overlap : false,
|
|
2164
2198
|
enabled: additionOptions && additionOptions.label ? additionOptions.label.show : true,
|
|
@@ -2226,6 +2260,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
2226
2260
|
chartOptions.chart = {
|
|
2227
2261
|
type: 'spline'
|
|
2228
2262
|
};
|
|
2263
|
+
if (disableAnimation) {
|
|
2264
|
+
chartOptions.chart.animation = false;
|
|
2265
|
+
}
|
|
2229
2266
|
highchartsRenderer.setTitleAndSubTitle(chartOptions, opts, additionOptions);
|
|
2230
2267
|
chartOptions.yAxis = {
|
|
2231
2268
|
min: additionOptions && additionOptions.axisY && !isNaN(parseInt(additionOptions.axisY.min)) ? additionOptions.axisY.min : null,
|
|
@@ -2247,6 +2284,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
2247
2284
|
|
|
2248
2285
|
chartOptions.plotOptions = {
|
|
2249
2286
|
series: {
|
|
2287
|
+
animation: !disableAnimation,
|
|
2250
2288
|
dataLabels: {
|
|
2251
2289
|
allowOverlap: additionOptions && additionOptions.label ? additionOptions.label.overlap : false,
|
|
2252
2290
|
enabled: additionOptions && additionOptions.label ? additionOptions.label.show : true,
|
|
@@ -2298,6 +2336,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
2298
2336
|
chartOptions.chart = {
|
|
2299
2337
|
type: type === 'area-chart' ? 'area' : 'areaspline'
|
|
2300
2338
|
};
|
|
2339
|
+
if (disableAnimation) {
|
|
2340
|
+
chartOptions.chart.animation = false;
|
|
2341
|
+
}
|
|
2301
2342
|
highchartsRenderer.setTitleAndSubTitle(chartOptions, opts, additionOptions);
|
|
2302
2343
|
chartOptions.yAxis = {
|
|
2303
2344
|
min: additionOptions && additionOptions.axisY && !isNaN(parseInt(additionOptions.axisY.min)) ? additionOptions.axisY.min : null,
|
|
@@ -2347,6 +2388,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
2347
2388
|
}
|
|
2348
2389
|
},
|
|
2349
2390
|
series: {
|
|
2391
|
+
animation: !disableAnimation,
|
|
2350
2392
|
dataLabels: {
|
|
2351
2393
|
allowOverlap: additionOptions && additionOptions.label ? additionOptions.label.overlap : false,
|
|
2352
2394
|
enabled: additionOptions && additionOptions.label ? additionOptions.label.show : true,
|
|
@@ -2379,6 +2421,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
2379
2421
|
polar: true,
|
|
2380
2422
|
type: 'line'
|
|
2381
2423
|
};
|
|
2424
|
+
if (disableAnimation) {
|
|
2425
|
+
chartOptions.chart.animation = false;
|
|
2426
|
+
}
|
|
2382
2427
|
highchartsRenderer.setTitleAndSubTitle(chartOptions, opts, additionOptions);
|
|
2383
2428
|
chartOptions.yAxis = {
|
|
2384
2429
|
gridLineInterpolation: 'polygon',
|
|
@@ -2399,6 +2444,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
2399
2444
|
|
|
2400
2445
|
chartOptions.plotOptions = {
|
|
2401
2446
|
series: {
|
|
2447
|
+
animation: !disableAnimation,
|
|
2402
2448
|
dataLabels: {
|
|
2403
2449
|
allowOverlap: additionOptions && additionOptions.label ? additionOptions.label.overlap : false,
|
|
2404
2450
|
enabled: additionOptions && additionOptions.label ? additionOptions.label.show : true,
|
|
@@ -2459,6 +2505,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
2459
2505
|
|
|
2460
2506
|
}
|
|
2461
2507
|
};
|
|
2508
|
+
if (disableAnimation) {
|
|
2509
|
+
chartOptions.chart.animation = false;
|
|
2510
|
+
}
|
|
2462
2511
|
|
|
2463
2512
|
chartOptions.xAxis = {
|
|
2464
2513
|
type: 'category',
|
|
@@ -2518,6 +2567,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
2518
2567
|
borderWidth: 0
|
|
2519
2568
|
},
|
|
2520
2569
|
series: {
|
|
2570
|
+
animation: !disableAnimation,
|
|
2521
2571
|
cropThreshold: 1000,
|
|
2522
2572
|
dataLabels: {
|
|
2523
2573
|
allowOverlap: additionOptions && additionOptions.label ? additionOptions.label.overlap : false,
|
|
@@ -2570,6 +2620,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
2570
2620
|
|
|
2571
2621
|
}
|
|
2572
2622
|
};
|
|
2623
|
+
if (disableAnimation) {
|
|
2624
|
+
chartOptions.chart.animation = false;
|
|
2625
|
+
}
|
|
2573
2626
|
highchartsRenderer.setTitleAndSubTitle(chartOptions, opts, additionOptions);
|
|
2574
2627
|
chartOptions.yAxis = {
|
|
2575
2628
|
min: additionOptions && additionOptions.axisY && !isNaN(parseInt(additionOptions.axisY.min)) ? additionOptions.axisY.min : null,
|
|
@@ -2656,6 +2709,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
2656
2709
|
}),
|
|
2657
2710
|
color: 'contrast'
|
|
2658
2711
|
}
|
|
2712
|
+
},
|
|
2713
|
+
series: {
|
|
2714
|
+
animation: !disableAnimation
|
|
2659
2715
|
}
|
|
2660
2716
|
};
|
|
2661
2717
|
|
|
@@ -2713,6 +2769,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
2713
2769
|
|
|
2714
2770
|
}
|
|
2715
2771
|
};
|
|
2772
|
+
if (disableAnimation) {
|
|
2773
|
+
chartOptions.chart.animation = false;
|
|
2774
|
+
}
|
|
2716
2775
|
highchartsRenderer.setTitleAndSubTitle(chartOptions, opts, additionOptions);
|
|
2717
2776
|
|
|
2718
2777
|
chartOptions.yAxis = {
|
|
@@ -2730,6 +2789,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
2730
2789
|
|
|
2731
2790
|
chartOptions.plotOptions = {
|
|
2732
2791
|
series: {
|
|
2792
|
+
animation: !disableAnimation,
|
|
2733
2793
|
borderWidth: 0,
|
|
2734
2794
|
cropThreshold: 1000,
|
|
2735
2795
|
dataLabels: {
|
|
@@ -2804,6 +2864,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
2804
2864
|
chartOptions.chart = {
|
|
2805
2865
|
type: 'bar'
|
|
2806
2866
|
};
|
|
2867
|
+
if (disableAnimation) {
|
|
2868
|
+
chartOptions.chart.animation = false;
|
|
2869
|
+
}
|
|
2807
2870
|
highchartsRenderer.setTitleAndSubTitle(chartOptions, opts, additionOptions);
|
|
2808
2871
|
chartOptions.yAxis = {
|
|
2809
2872
|
min: additionOptions && additionOptions.axisY && !isNaN(parseInt(additionOptions.axisY.min)) ? additionOptions.axisY.min : null,
|
|
@@ -2846,6 +2909,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
2846
2909
|
borderWidth: 0
|
|
2847
2910
|
},
|
|
2848
2911
|
series: {
|
|
2912
|
+
animation: !disableAnimation,
|
|
2849
2913
|
cropThreshold: 1000,
|
|
2850
2914
|
dataLabels: {
|
|
2851
2915
|
allowOverlap: additionOptions && additionOptions.label ? additionOptions.label.overlap : false,
|
|
@@ -2881,6 +2945,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
2881
2945
|
type: 'bar',
|
|
2882
2946
|
zoomType: 'x'
|
|
2883
2947
|
};
|
|
2948
|
+
if (disableAnimation) {
|
|
2949
|
+
chartOptions.chart.animation = false;
|
|
2950
|
+
}
|
|
2884
2951
|
highchartsRenderer.setTitleAndSubTitle(chartOptions, opts, additionOptions);
|
|
2885
2952
|
chartOptions.yAxis = {
|
|
2886
2953
|
min: additionOptions && additionOptions.axisY && !isNaN(parseInt(additionOptions.axisY.min)) ? additionOptions.axisY.min : null,
|
|
@@ -2930,6 +2997,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
2930
2997
|
|
|
2931
2998
|
chartOptions.plotOptions = {
|
|
2932
2999
|
series: {
|
|
3000
|
+
animation: !disableAnimation,
|
|
2933
3001
|
stacking: 'normal'
|
|
2934
3002
|
}
|
|
2935
3003
|
};
|