Skip to content

Commit c87f351

Browse files
committed
Format code for AAChartView.html
1 parent 8018508 commit c87f351

File tree

1 file changed

+45
-43
lines changed

1 file changed

+45
-43
lines changed

AAInfographics/AAJSFiles.bundle/AAChartView.html

Lines changed: 45 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -7,56 +7,58 @@
77
<script src="AAFunnel.js"></script>
88
<script src="AAEasing.js"></script>
99
<script src="AARounded-Corners.js"></script>
10-
10+
1111
<!-- <script src="https://code.highcharts.com/highcharts.js"></script>-->
1212
<!-- <script src="https://code.highcharts.com/highcharts-more.js"></script>-->
1313
<!-- <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>
2020
<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>
2223
<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)
3139
}
40+
return value;
41+
});
3242

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
3946
});
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);
5947
}
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+
}
6062

6163
function configurePlotOptions(aaOptions) {
6264
let aaPlotOptions = aaOptions.plotOptions;
@@ -202,7 +204,7 @@
202204

203205
aaGlobalChart.setSize(receivedWidth, receivedHeight, aaAnimation);
204206
}
205-
206-
</script>
207+
208+
</script>
207209
</body>
208210
</html>

0 commit comments

Comments
 (0)