01 | { |
02 | data: { |
03 | dataSets: [ |
04 | { |
05 | id: "vancouverWeatherStat" , |
06 | sourceUrl: "./../../csv-data/weather_data.csv" , |
07 | csvSettings: { |
08 | ignoreFirstRow: true , |
09 | rowsSeparator: "\n" , |
10 | columnsSeparator: "," |
11 | } , |
12 | locale: { |
13 | dateTime: { |
14 | format: "%M/%d/%yyyy" |
15 | } |
16 | } |
17 | } |
18 | ] , |
19 | dataProviders: { |
20 | generalDataProviders: [ |
21 | { |
22 | dataSet: "vancouverWeatherStat" , |
23 | id: "dpMaxTemp" , |
24 | fields: [ |
25 | { |
26 | type: "Value" , |
27 | column: 2 , |
28 | approximationType: "Average" |
29 | } |
30 | ] |
31 | } , |
32 | { |
33 | dataSet: "vancouverWeatherStat" , |
34 | id: "dpMinTemp" , |
35 | fields: [ |
36 | { |
37 | type: "Value" , |
38 | column: 3 , |
39 | approximationType: "Average" |
40 | } |
41 | ] |
42 | } , |
43 | { |
44 | dataSet: "vancouverWeatherStat" , |
45 | id: "dpTotalRain" , |
46 | fields: [ |
47 | { |
48 | type: "Value" , |
49 | column: 6 , |
50 | approximationType: "Average" |
51 | } |
52 | ] |
53 | } , |
54 | { |
55 | dataSet: "vancouverWeatherStat" , |
56 | id: "dpSpdOfMaxGust" , |
57 | fields: [ |
58 | { |
59 | type: "Value" , |
60 | column: 10 , |
61 | approximationType: "Average" |
62 | } |
63 | ] |
64 | } |
65 | ] , |
66 | scrollerDataProviders: [ |
67 | { |
68 | dataSet: "vancouverWeatherStat" , |
69 | column: 4 |
70 | } |
71 | ] |
72 | } |
73 | } , |
74 | settings: { |
75 | dataGrouping: { |
76 | enabled: true , |
77 | maxVisiblePoints: 250 |
78 | } , |
79 | insideMargin: { |
80 | top: 30 , |
81 | right: 40 |
82 | } , |
83 | labels: [ |
84 | { |
85 | xPadding: 5 , |
86 | yPadding: 3 , |
87 | format: "Vancouver (YVR) weather Highs and Lows" , |
88 | font: { |
89 | family: "Tahoma" , |
90 | size: 13 , |
91 | color: "#494949" , |
92 | bold: true |
93 | } |
94 | } |
95 | ] , |
96 | rangeSelector: { |
97 | enabled: true , |
98 | presets: { |
99 | title: { |
100 | format: "Years:" |
101 | } , |
102 | ranges: [ |
103 | { |
104 | type: "Custom" , |
105 | startDate: "2006-01-01" , |
106 | endDate: "2006-12-31" , |
107 | format: "2006" |
108 | } , |
109 | { |
110 | type: "Custom" , |
111 | startDate: "2007-01-01" , |
112 | endDate: "2007-12-31" , |
113 | format: "2007" |
114 | } , |
115 | { |
116 | type: "Custom" , |
117 | startDate: "2008-01-01" , |
118 | endDate: "2008-12-31" , |
119 | format: "2008" |
120 | } |
121 | ] |
122 | } |
123 | } , |
124 | charts: [ |
125 | { |
126 | height: 100 , |
127 | xAxis: { |
128 | labels: { |
129 | enabled: true |
130 | } |
131 | } , |
132 | seriesList: [ |
133 | { |
134 | type: "Line" , |
135 | dataProvider: "dpMinTemp" , |
136 | color: "#0066DD" , |
137 | name: "Min Temp (C)" |
138 | } , |
139 | { |
140 | type: "Line" , |
141 | dataProvider: "dpMaxTemp" , |
142 | color: "#DC3912" , |
143 | name: "Max Temp (C)" |
144 | } |
145 | ] |
146 | } , |
147 | { |
148 | height: 40 , |
149 | legend: { |
150 | title: { |
151 | enabled: false |
152 | } , |
153 | dateTime: { |
154 | enabled: false |
155 | } |
156 | } , |
157 | seriesList: [ |
158 | { |
159 | type: "Bar" , |
160 | dataProvider: "dpTotalRain" , |
161 | color: "#20B2AA" , |
162 | name: "Total Rain (mm)" |
163 | } |
164 | ] , |
165 | valueAxes: { |
166 | primary: { |
167 | scale: { |
168 | minimumMode: "CustomValue" , |
169 | minimum: 0 |
170 | } |
171 | } |
172 | } |
173 | } , |
174 | { |
175 | height: 40 , |
176 | legend: { |
177 | title: { |
178 | enabled: false |
179 | } , |
180 | dateTime: { |
181 | enabled: false |
182 | } |
183 | } , |
184 | seriesList: [ |
185 | { |
186 | type: "Bar" , |
187 | dataProvider: "dpSpdOfMaxGust" , |
188 | color: "#0065CE" , |
189 | name: "Speed of Max Gust (km/h)" |
190 | } |
191 | ] , |
192 | valueAxes: { |
193 | primary: { |
194 | scale: { |
195 | minimumMode: "CustomValue" , |
196 | minimum: 0 |
197 | } |
198 | } |
199 | } |
200 | } |
201 | ] , |
202 | defaults: { |
203 | chart: { |
204 | valueAxes: { |
205 | primary: { |
206 | enabled: true , |
207 | position: "Right" , |
208 | labels: { |
209 | position: "Outside" , |
210 | showFirst: true , |
211 | showLast: true , |
212 | valign: "Center" , |
213 | format: "{%Value}{numDecimals:0}" |
214 | } , |
215 | scale: { |
216 | optimalStepCount: 3 |
217 | } |
218 | } |
219 | } , |
220 | xAxis: { |
221 | labels: { |
222 | enabled: false |
223 | } |
224 | } , |
225 | legend: { |
226 | title: { |
227 | focusSettings: { |
228 | mouseOver: { |
229 | format: " {%Date.Current}{\"%yyyy-%MM-%dd\"}: " |
230 | } , |
231 | mouseOut: { |
232 | format: " {%Date.LastVisible}{\"%yyyy-%MM-%dd\"}: " |
233 | } |
234 | } |
235 | } , |
236 | dateTime: { |
237 | enabled: false |
238 | } |
239 | } , |
240 | seriesSettingsDefaults: { |
241 | lineSeries: { |
242 | thickness: 1 , |
243 | marker: { |
244 | states: { |
245 | normal: { |
246 | enabled: true |
247 | } |
248 | } |
249 | } |
250 | } |
251 | } |
252 | } |
253 | } , |
254 | timeScale: { |
255 | isOrdinal: true , |
256 | maxTicksCount: 10 , |
257 | selectedRange: { |
258 | type: "Custom" , |
259 | startDate: "2006-05-01" , |
260 | endDate: "2007-04-13" |
261 | } |
262 | } , |
263 | scroller: { |
264 | timeScale: { |
265 | maxTicksCount: 6 |
266 | } |
267 | } |
268 | } |
269 | } |