01 | { |
02 | data: { |
03 | dataSets: [ |
04 | { |
05 | id: "dataSet1", |
06 | sourceUrl: "./../../csv-data/ibm_daily_short.csv", |
07 | csvSettings: { |
08 | ignoreFirstRow: true, |
09 | rowsSeparator: "\n", |
10 | columnsSeparator: "," |
11 | }, |
12 | locale: { |
13 | dateTime: { |
14 | format: "%yyyy%MM%dd" |
15 | } |
16 | } |
17 | }, |
18 | { |
19 | id: "dataSet2", |
20 | sourceUrl: "./../../csv-data/msft_daily_short.csv", |
21 | csvSettings: { |
22 | ignoreFirstRow: true, |
23 | rowsSeparator: "\n", |
24 | columnsSeparator: "," |
25 | }, |
26 | locale: { |
27 | dateTime: { |
28 | format: "%yyyy%MM%dd" |
29 | } |
30 | } |
31 | }, |
32 | { |
33 | id: "dataSet3", |
34 | sourceUrl: "./../../csv-data/orcl_daily_short.csv", |
35 | csvSettings: { |
36 | ignoreFirstRow: true, |
37 | rowsSeparator: "\n", |
38 | columnsSeparator: "," |
39 | }, |
40 | locale: { |
41 | dateTime: { |
42 | format: "%yyyy%MM%dd" |
43 | } |
44 | } |
45 | } |
46 | ], |
47 | dataProviders: { |
48 | generalDataProviders: [ |
49 | { |
50 | dataSet: "dataSet1", |
51 | id: "dp1", |
52 | fields: [ |
53 | { |
54 | type: "Open", |
55 | column: 1, |
56 | approximationType: "Open" |
57 | }, |
58 | { |
59 | type: "High", |
60 | column: 2, |
61 | approximationType: "High" |
62 | }, |
63 | { |
64 | type: "Low", |
65 | column: 3, |
66 | approximationType: "Low" |
67 | }, |
68 | { |
69 | type: "Close", |
70 | column: 4, |
71 | approximationType: "Close" |
72 | }, |
73 | { |
74 | type: "Volume", |
75 | column: 5, |
76 | approximationType: "Average" |
77 | } |
78 | ] |
79 | }, |
80 | { |
81 | dataSet: "dataSet2", |
82 | id: "dp2", |
83 | fields: [ |
84 | { |
85 | type: "Close", |
86 | column: 4, |
87 | approximationType: "Close" |
88 | } |
89 | ] |
90 | }, |
91 | { |
92 | dataSet: "dataSet3", |
93 | id: "dp3", |
94 | fields: [ |
95 | { |
96 | type: "Close", |
97 | column: 4, |
98 | approximationType: "Close" |
99 | } |
100 | ] |
101 | } |
102 | ], |
103 | scrollerDataProviders: [ |
104 | { |
105 | dataSet: "dataSet1", |
106 | column: 4 |
107 | } |
108 | ] |
109 | } |
110 | }, |
111 | settings: { |
112 | dataGrouping: { |
113 | enabled: true, |
114 | maxVisiblePoints: 250 |
115 | }, |
116 | insideMargin: { |
117 | right: 40 |
118 | }, |
119 | rangeSelector: { |
120 | enabled: true |
121 | }, |
122 | charts: [ |
123 | { |
124 | height: 100, |
125 | legend: { |
126 | dateTime: { |
127 | enabled: true, |
128 | font: { |
129 | color: "#333333", |
130 | bold: true |
131 | }, |
132 | focusSettings: { |
133 | mouseOver: { |
134 | format: "{%Date.Current}{\"%MMMM %dd, %yyyy\"}" |
135 | }, |
136 | mouseOut: { |
137 | format: "{%Date.LastVisible}{\"%MMMM %dd, %yyyy\"}" |
138 | } |
139 | } |
140 | }, |
141 | title: { |
142 | lineBreak: true, |
143 | focusSettings: { |
144 | mouseOver: { |
145 | format: "Compare: IMB vs ORCL vs MSFT" |
146 | }, |
147 | mouseOut: { |
148 | format: "Compare: IMB vs ORCL vs MSFT" |
149 | } |
150 | } |
151 | } |
152 | }, |
153 | seriesList: [ |
154 | { |
155 | type: "Candlestick", |
156 | dataProvider: "dp1", |
157 | color: "#0068B6", |
158 | compareFieldType: "Close", |
159 | name: "IBM", |
160 | candlestickSeries: { |
161 | width: 0.5, |
162 | rising: { |
163 | line: { |
164 | enabled: true, |
165 | color: "#0068B6", |
166 | thickness: 1, |
167 | opacity: 1 |
168 | }, |
169 | border: { |
170 | enabled: true, |
171 | color: "#0068B6", |
172 | thickness: 1, |
173 | opacity: 1 |
174 | }, |
175 | fill: { |
176 | enabled: true, |
177 | color: "#0068B6", |
178 | opacity: 1 |
179 | } |
180 | }, |
181 | falling: { |
182 | line: { |
183 | enabled: true, |
184 | color: "#CA0E2F", |
185 | thickness: 1, |
186 | opacity: 1 |
187 | }, |
188 | border: { |
189 | enabled: true, |
190 | color: "#CA0E2F", |
191 | thickness: 1, |
192 | opacity: 1 |
193 | }, |
194 | fill: { |
195 | enabled: true, |
196 | color: "#CA0E2F", |
197 | opacity: 1 |
198 | } |
199 | } |
200 | }, |
201 | legendItem: { |
202 | lineBreak: true, |
203 | labels: { |
204 | font: { |
205 | color: "#333333" |
206 | }, |
207 | focusSettings: { |
208 | mouseOver: { |
209 | format: "{%SeriesIcon} <b><font color=\"%Color\">{%SeriesName} </font><font color=\"#707070\">O: </font>{%Open.Current} <font color=\"#707070\">H: </font>{%High.Current} <font color=\"#707070\">L: </font>{%Low.Current} <font color=\"#707070\">C: </font>{%Close.Current}</b> " |
210 | }, |
211 | mouseOut: { |
212 | format: "{%SeriesIcon} <b><font color=\"%Color\">{%SeriesName} </font><font color=\"#707070\">O: </font>{%Open.LastVisible} <font color=\"#707070\">H: </font>{%High.LastVisible} <font color=\"#707070\">L: </font>{%Low.LastVisible} <font color=\"#707070\">C: </font>{%Close.LastVisible}</b> " |
213 | } |
214 | } |
215 | } |
216 | } |
217 | }, |
218 | { |
219 | type: "Spline", |
220 | dataProvider: "dp2", |
221 | color: "#FF9900", |
222 | name: "MSFT", |
223 | lineSeries: { |
224 | thickness: 2 |
225 | } |
226 | }, |
227 | { |
228 | type: "Line", |
229 | dataProvider: "dp3", |
230 | color: "#43A052", |
231 | name: "ORCL", |
232 | lineSeries: { |
233 | thickness: 2 |
234 | } |
235 | } |
236 | ], |
237 | seriesSettingsDefaults: { |
238 | lineSeries: { |
239 | thickness: 1, |
240 | legendItem: { |
241 | labels: { |
242 | focusSettings: { |
243 | mouseOver: { |
244 | format: "{%SeriesIcon} <b><font color=\"%Color\">{%SeriesName}</font> <font color=\"#333333\">{%Value.Current}</font> <font color=\"#808080\">Chg:</font> <font color=\"%ChangeColor\">{%ValueChange.Current}{plusSign:true} ({%PercentValueChange.Current}{plusSign:true}%)</font></b> " |
245 | }, |
246 | mouseOut: { |
247 | format: "{%SeriesIcon} <b><font color=\"%Color\">{%SeriesName}</font> <font color=\"#333333\">{%Value.LastVisible}</font> <font color=\"#808080\">Chg:</font> <font color=\"%ChangeColor\">{%ValueChange.LastVisible}{plusSign:true} ({%PercentValueChange.LastVisible}{plusSign:true}%)</font></b> " |
248 | } |
249 | } |
250 | } |
251 | } |
252 | } |
253 | }, |
254 | valueAxes: { |
255 | primary: { |
256 | position: "Right", |
257 | labels: { |
258 | position: "Outside", |
259 | padding: 3, |
260 | valign: "Center", |
261 | showFirst: true, |
262 | showLast: true, |
263 | font: { |
264 | family: "Verdana", |
265 | color: "%Color", |
266 | bold: true, |
267 | size: 9 |
268 | }, |
269 | format: "{%Value}{numDecimals:2,trailingZeros:false,plusSign:true}%" |
270 | }, |
271 | scale: { |
272 | mode: "Changes" |
273 | }, |
274 | tickmarks: { |
275 | enabled: true, |
276 | showFirst: true, |
277 | showLast: true, |
278 | thickness: 1, |
279 | size: 3, |
280 | pixelHinting: true, |
281 | color: "#333333" |
282 | } |
283 | } |
284 | } |
285 | } |
286 | ], |
287 | timeScale: { |
288 | selectedRange: { |
289 | type: "Custom", |
290 | startDate: "2009-01-01", |
291 | endDate: "2009-07-02" |
292 | } |
293 | } |
294 | } |
295 | } |