HTMLcopy
1
<div id="container"></div>
CSScopy
8
1
html,
2
body,
3
#container {
4
width: 100%;
5
height: 100%;
6
margin: 0;
7
padding: 0;
8
}
JavaScriptcopy
x
1
anychart.onDocumentReady(function () {
2
// create quadrant chart
3
var chart = anychart.quadrant();
4
// set chart title
5
chart.title('SWOT Analysis');
6
// set chart padding
7
chart.padding([20, 20, 60, 60]);
8
9
// set quarters settings
10
chart.quarters({
11
rightTop: {
12
fill: '#ADD8E6'
13
},
14
rightBottom: {
15
fill: '#DEB887'
16
},
17
leftTop: {
18
fill: '#A9A9A9'
19
},
20
leftBottom: {
21
fill: '#A3BB59'
22
}
23
});
24
25
// create first label for left top quarter
26
chart
27
.quarters()
28
.leftTop()
29
.label(0)
30
.enabled(true)
31
.fontColor('#2F4F4F')
32
.fontSize(16)
33
.width('90%')
34
.text(
35
' STRENGTHS\n' +
36
'1) Developed by a reputable, award-winning developer - Paramount Property.\n' +
37
'2) Conveniently located with existing amenities and accessibility of Klang Town.\n' +
38
'3) Offers a variety of unit types to cater to various market segments.\n' +
39
'4) Seamless connectivity with excellent network of highways and roads.\n' +
40
'5) Equipped with three-tier security.\n' +
41
'6) Competitive pricing from reputable developer.\n' +
42
'7) Free maintenance fee for the first two years.\n' +
43
'8) Loan subsidy of 24 months.\n' +
44
'9) Partially furnished.\n' +
45
'10) Zero down payment.\n' +
46
'11) Conveniences of future commercial and amenities in Phase 3 and 4.\n' +
47
'12) Close proximity to Sri KDU International School.'
48
);
49
50
// create first label for right top quarter
51
chart
52
.quarters()
53
.rightTop()
54
.label(0)
55
.enabled(true)
56
.fontColor('#2F4F4F')
57
.fontSize(16)
58
.width('90%')
59
.text(
60
'WEAKNESSES\n' +
61
'1) Surrounded by old residential areas, shoplots, and factories— needs further rejuvenation from other developers.\n' +
62
'2) 48 months completion period from SPA date.\n' +
63
'3) No frill design in terms of facade, facilities, orientation, and unit layout.'
64
);
65
66
// create first label for left bottom quarter
67
chart
68
.quarters()
69
.leftBottom()
70
.label(0)
71
.enabled(true)
72
.fontColor('#2F4F4F')
73
.fontSize(16)
74
.width('90%')
75
.text(
76
'OPPORTUNITIES\n' +
77
'1) Eligible under the government initiative Home Ownership Campaign, which allows exemption of stamp duty— encourages sales as it brings a lot of savings.\n' +
78
'2) Easy to get loan.\n' +
79
'3) Not prone to flooding.'
80
);
81
82
// create first label for right bottom quarter
83
chart
84
.quarters()
85
.rightBottom()
86
.label(0)
87
.enabled(true)
88
.fontColor('#2F4F4F')
89
.fontSize(16)
90
.width('90%')
91
.text(
92
'THREATS\n' +
93
'1) Landed property in Klang is affordable at a range of RM300 - RM600 per square feet, thus residents will prefer to buy landed property rather than high rise.\n' +
94
'2) Concentration of Klang residents are more towards the existing matured and developed townships. For example, Bandar Bukit Tinggi, Bandar Botanik, Bandar Bukit Raja and Setia Alam. Thus, potential purchasers might prefer those areas.'
95
);
96
97
// create second label for left top quarter
98
chart
99
.quarters()
100
.leftTop()
101
.label(1)
102
.enabled(true)
103
.fontColor('#7c868e')
104
.fontSize(17)
105
.position('left-center')
106
.rotation(-90)
107
.offsetX(-20)
108
.text('Internal');
109
110
// create second label for left bottom quarter
111
chart
112
.quarters()
113
.leftBottom()
114
.label(1)
115
.enabled(true)
116
.fontColor('#7c868e')
117
.fontSize(17)
118
.position('left-center')
119
.rotation(-90)
120
.offsetX(-20)
121
.text('External');
122
123
// create third label for left bottom quarter
124
chart
125
.quarters()
126
.leftBottom()
127
.label(2)
128
.enabled(true)
129
.fontColor('#7c868e')
130
.fontSize(17)
131
.position('center-bottom')
132
.offsetY(20)
133
.text('Favourable');
134
135
// create second label for right bottom quarter
136
chart
137
.quarters()
138
.rightBottom()
139
.label(1)
140
.enabled(true)
141
.fontColor('#7c868e')
142
.fontSize(17)
143
.position('center-bottom')
144
.offsetY(20)
145
.text('Unfavourable');
146
147
// set chart container id
148
chart.container('container');
149
// initiate chart drawing
150
chart.draw();
151
});