|
7 | 7 | <script src="AAFunnel.js"></script> |
8 | 8 | <script src="AAEasing.js"></script> |
9 | 9 | <script src="AARounded-Corners.js"></script> |
10 | | - |
| 10 | + |
11 | 11 | <!-- <script src="https://code.highcharts.com/highcharts.js"></script>--> |
12 | 12 | <!-- <script src="https://code.highcharts.com/highcharts-more.js"></script>--> |
13 | 13 | <!-- <script src="https://code.highcharts.com/modules/funnel.js"></script>--> |
14 | | - <style>*{ |
15 | | - -webkit-user-select: none; |
16 | | - user-select: none; |
17 | | - } |
18 | | - </style> |
19 | | - </head> |
| 14 | + |
| 15 | + <style> |
| 16 | + * {-webkit-user-select: none; |
| 17 | + user-select: none; } |
| 18 | + </style> |
| 19 | + </head> |
20 | 20 | <body style="margin:0 0 0 0;"> |
21 | | - <div id="container" style="width:100%; height: 100%;"></div> |
| 21 | + <div id="container" style="width:100%; height: 100%;"> |
| 22 | + </div> |
22 | 23 | <script> |
23 | | - let aaGlobalChart; |
24 | | - function loadTheHighChartView(sender, receivedWidth, receivedHeight) { |
25 | | - let container = document.getElementById('container'); |
26 | | - if (receivedWidth != 0) { |
27 | | - container.style.width = receivedWidth; |
28 | | - } |
29 | | - if(receivedHeight != 0) { |
30 | | - container.style.height = receivedHeight; |
| 24 | + |
| 25 | + let aaGlobalChart; |
| 26 | + function loadTheHighChartView(sender, receivedWidth, receivedHeight) { |
| 27 | + let container = document.getElementById('container'); |
| 28 | + if (receivedWidth != 0) { |
| 29 | + container.style.width = receivedWidth; |
| 30 | + } |
| 31 | + if(receivedHeight != 0) { |
| 32 | + container.style.height = receivedHeight; |
| 33 | + } |
| 34 | + |
| 35 | + let aaOptions = JSON.parse(sender, function (key, value) { |
| 36 | + if (typeof (value) == 'string' |
| 37 | + && value.indexOf('function') !== -1) { |
| 38 | + return eval(value) |
31 | 39 | } |
| 40 | + return value; |
| 41 | + }); |
32 | 42 |
|
33 | | - let aaOptions = JSON.parse(sender, function (key, value) { |
34 | | - if (typeof (value) == 'string' |
35 | | - && value.indexOf('function') !== -1) { |
36 | | - return eval(value) |
37 | | - } |
38 | | - return value; |
| 43 | + if (aaOptions.defaultOptions) { |
| 44 | + Highcharts.setOptions({ |
| 45 | + lang: aaOptions.defaultOptions |
39 | 46 | }); |
40 | | - |
41 | | - if (aaOptions.defaultOptions) { |
42 | | - Highcharts.setOptions({ |
43 | | - lang: aaOptions.defaultOptions |
44 | | - }); |
45 | | - } |
46 | | - |
47 | | - if (aaOptions.xAxisArray) { |
48 | | - aaOptions.xAxis = aaOptions.xAxisArray |
49 | | - } |
50 | | - if (aaOptions.yAxisArray) { |
51 | | - aaOptions.yAxis = aaOptions.yAxisArray |
52 | | - } |
53 | | - |
54 | | - if (aaOptions.plotOptions) { |
55 | | - configurePlotOptions(aaOptions); |
56 | | - } |
57 | | - |
58 | | - aaGlobalChart = Highcharts.chart('container', aaOptions); |
59 | 47 | } |
| 48 | + |
| 49 | + if (aaOptions.xAxisArray) { |
| 50 | + aaOptions.xAxis = aaOptions.xAxisArray |
| 51 | + } |
| 52 | + if (aaOptions.yAxisArray) { |
| 53 | + aaOptions.yAxis = aaOptions.yAxisArray |
| 54 | + } |
| 55 | + |
| 56 | + if (aaOptions.plotOptions) { |
| 57 | + configurePlotOptions(aaOptions); |
| 58 | + } |
| 59 | + |
| 60 | + aaGlobalChart = Highcharts.chart('container', aaOptions); |
| 61 | + } |
60 | 62 |
|
61 | 63 | function configurePlotOptions(aaOptions) { |
62 | 64 | let aaPlotOptions = aaOptions.plotOptions; |
|
202 | 204 |
|
203 | 205 | aaGlobalChart.setSize(receivedWidth, receivedHeight, aaAnimation); |
204 | 206 | } |
205 | | - |
206 | | - </script> |
| 207 | + |
| 208 | + </script> |
207 | 209 | </body> |
208 | 210 | </html> |
0 commit comments