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: "dpHighLowTemp", |
24 | fields: [ |
25 | { |
26 | type: "High", |
27 | column: 2 |
28 | }, |
29 | { |
30 | type: "Low", |
31 | column: 3 |
32 | } |
33 | ] |
34 | } |
35 | ], |
36 | scrollerDataProviders: [ |
37 | { |
38 | dataSet: "vancouverWeatherStat", |
39 | column: 4 |
40 | } |
41 | ] |
42 | } |
43 | }, |
44 | eventMarkers: { |
45 | locale: { |
46 | dateTime: { |
47 | format: "%yyyy-%MM-%dd" |
48 | } |
49 | }, |
50 | settings: { |
51 | font: { |
52 | family: "Tahoma", |
53 | size: 10, |
54 | color: "White", |
55 | bold: true |
56 | }, |
57 | shape: { |
58 | type: "Circle", |
59 | size: 15, |
60 | fill: { |
61 | type: "Gradient", |
62 | opacity: 0.8, |
63 | gradient: { |
64 | angle: 45, |
65 | keys: [ |
66 | { |
67 | color: "#FF0000" |
68 | }, |
69 | { |
70 | color: "#620000" |
71 | } |
72 | ] |
73 | } |
74 | }, |
75 | border: { |
76 | color: "DarkRed", |
77 | thickness: 1 |
78 | } |
79 | }, |
80 | states: { |
81 | hover: { |
82 | shape: { |
83 | border: { |
84 | color: "Gold", |
85 | thickness: 2, |
86 | opacity: 0.7 |
87 | } |
88 | } |
89 | } |
90 | } |
91 | }, |
92 | groups: [ |
93 | { |
94 | chart: "idMainChart", |
95 | series: "idSeriesMaxTemp", |
96 | events: [ |
97 | { |
98 | localeBasedDate: "2008-05-17", |
99 | format: "H", |
100 | position: "Axis", |
101 | settings: { |
102 | tooltip: { |
103 | enabled: true, |
104 | format: "<textformat leading=\"3\"><b>{%SourceDate}{\"%MMMM %d, %yyyy\"}</b><br/><font color=\"#666666\"><b>It was the hottest day in Vancouver <br/>during 2006-2008 years!</font><br/><font color=\"#CC0000\">Temperature: +29 (C)</font></b></textformat>" |
105 | } |
106 | } |
107 | } |
108 | ] |
109 | } |
110 | ] |
111 | }, |
112 | settings: { |
113 | dataGrouping: { |
114 | enabled: false |
115 | }, |
116 | insideMargin: { |
117 | right: 40 |
118 | }, |
119 | charts: [ |
120 | { |
121 | id: "idMainChart", |
122 | legend: { |
123 | dateTime: { |
124 | enabled: false |
125 | } |
126 | }, |
127 | valueAxes: { |
128 | primary: { |
129 | position: "Right", |
130 | labels: { |
131 | position: "Outside", |
132 | showFirst: true, |
133 | showLast: true, |
134 | positiveColor: "#D01414", |
135 | negativeColor: "#0e55a7", |
136 | valign: "Center", |
137 | font: { |
138 | color: "%Color", |
139 | bold: true, |
140 | family: "Verdana", |
141 | size: 9 |
142 | }, |
143 | format: "{%Value}{numDecimals:2,trailingZeros:false,plusSign:true}" |
144 | }, |
145 | tickmarks: { |
146 | enabled: true |
147 | } |
148 | } |
149 | }, |
150 | seriesList: [ |
151 | { |
152 | id: "idSeriesMaxTemp", |
153 | type: "RangeSplineArea", |
154 | dataProvider: "dpHighLowTemp", |
155 | color: "#56567E", |
156 | name: "High/Low Temp (C)", |
157 | rangeAreaSeries: { |
158 | fill: { |
159 | enabled: true, |
160 | color: "%Color", |
161 | opacity: 0.5 |
162 | }, |
163 | high: { |
164 | line: { |
165 | enabled: false, |
166 | color: "%Color", |
167 | opacity: 0.3 |
168 | } |
169 | }, |
170 | low: { |
171 | line: { |
172 | enabled: false, |
173 | color: "%Color", |
174 | opacity: 0.3 |
175 | } |
176 | } |
177 | } |
178 | } |
179 | ] |
180 | } |
181 | ], |
182 | timeScale: { |
183 | selectedRange: { |
184 | type: "Max" |
185 | } |
186 | }, |
187 | scroller: { |
188 | timeScale: { |
189 | maxTicksCount: 5 |
190 | } |
191 | }, |
192 | rangeSelector: { |
193 | enabled: true, |
194 | presets: { |
195 | ranges: [ |
196 | { |
197 | type: "Custom", |
198 | startDate: "2006-01-01", |
199 | endDate: "2006-12-31", |
200 | format: "2006" |
201 | }, |
202 | { |
203 | type: "Custom", |
204 | startDate: "2007-01-01", |
205 | endDate: "2007-12-31", |
206 | format: "2007" |
207 | }, |
208 | { |
209 | type: "Custom", |
210 | startDate: "2008-01-01", |
211 | endDate: "2008-12-31", |
212 | format: "2008" |
213 | }, |
214 | { |
215 | type: "Max", |
216 | format: "Max" |
217 | } |
218 | ] |
219 | } |
220 | } |
221 | } |
222 | } |