01 | { |
02 | data: { |
03 | dataSets: [ |
04 | { |
05 | id: "dataSet1", |
06 | sourceUrl: "./../../csv-data/msft_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/orcl_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 | dataProviders: { |
34 | generalDataProviders: [ |
35 | { |
36 | dataSet: "dataSet1", |
37 | id: "dpMsft", |
38 | fields: [ |
39 | { |
40 | type: "Value", |
41 | column: 4, |
42 | approximationType: "Close" |
43 | } |
44 | ] |
45 | }, |
46 | { |
47 | dataSet: "dataSet2", |
48 | id: "dpOrcl", |
49 | fields: [ |
50 | { |
51 | type: "Value", |
52 | column: 4, |
53 | approximationType: "Close" |
54 | } |
55 | ] |
56 | } |
57 | ], |
58 | scrollerDataProviders: [ |
59 | { |
60 | dataSet: "dataSet1", |
61 | column: 4 |
62 | } |
63 | ] |
64 | } |
65 | }, |
66 | settings: { |
67 | insideMargin: { |
68 | right: 50 |
69 | }, |
70 | charts: [ |
71 | { |
72 | id: "idMainChart", |
73 | legend: { |
74 | title: { |
75 | enabled: true, |
76 | width: 70 |
77 | }, |
78 | dateTime: { |
79 | enabled: false |
80 | } |
81 | }, |
82 | seriesList: [ |
83 | { |
84 | id: "idMsft", |
85 | type: "Line", |
86 | color: "#DC3912", |
87 | dataProvider: "dpMsft", |
88 | name: "MSFT" |
89 | }, |
90 | { |
91 | id: "idOrcl", |
92 | type: "Line", |
93 | color: "#0066DD", |
94 | dataProvider: "dpOrcl", |
95 | name: "ORCL" |
96 | } |
97 | ], |
98 | valueAxes: { |
99 | primary: { |
100 | position: "Right", |
101 | scale: { |
102 | mode: "PercentChanges" |
103 | }, |
104 | grid: { |
105 | line: { |
106 | dashed: true, |
107 | dashLength: 3, |
108 | dashSpace: 3, |
109 | pixelHinting: true |
110 | } |
111 | }, |
112 | labels: { |
113 | valign: "Center", |
114 | position: "Outside", |
115 | padding: 3, |
116 | showFirst: true, |
117 | showLast: true, |
118 | font: { |
119 | color: "%Color", |
120 | family: "Tahoma", |
121 | size: 10, |
122 | bold: true |
123 | }, |
124 | format: "{%ChangeIcon} {%Value}{numDecimals:0,plusSign:true}%" |
125 | }, |
126 | zeroLine: { |
127 | enabled: true, |
128 | color: "#999999", |
129 | opacity: 1 |
130 | } |
131 | } |
132 | }, |
133 | xAxis: { |
134 | majorGrid: { |
135 | line: { |
136 | opacity: 1, |
137 | color: "#CCCCCC" |
138 | } |
139 | }, |
140 | minorGrid: { |
141 | line: { |
142 | dashed: true, |
143 | dashLength: 3, |
144 | dashSpace: 3, |
145 | pixelHinting: true |
146 | } |
147 | } |
148 | } |
149 | } |
150 | ], |
151 | timeScale: { |
152 | selectedRange: { |
153 | type: "Unit", |
154 | unit: "Year", |
155 | count: 2 |
156 | } |
157 | } |
158 | } |
159 | } |