• Edit
  • Download
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingSoft Demo</title>
    7.  
    8. <script nonce="undefined" src="https://cdn.zingchart.com/zingchart.min.js"></script>
    9. <style></style>
    10. </head>
    11.  
    12. <body>
    13. <div id='myChart'></div>
    14. <script>
    15. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    16. var myConfig = {
    17. "type": "mixed",
    18. "title": {
    19. "text": "Stock & Volume Chart with Scrollbar"
    20. },
    21. "plot": {
    22. "tooltip": {
    23. "visible": false
    24. }
    25. },
    26. "scale-x": {
    27. "min-value": 1420232400000,
    28. "step": "day",
    29. "transform": {
    30. "type": "date",
    31. "all": "%D,<br>%m/%d"
    32. },
    33. "max-items": 6,
    34. "item": {
    35. "font-size": 10
    36. },
    37. "zooming": true,
    38. "zoom-to-values": [1420232400000, 1422651600000]
    39. },
    40. "scroll-x": {
    41.  
    42. },
    43. "scale-y": {
    44. "offset-start": "35%",
    45. "values": "29:33:2",
    46. "format": "$%v",
    47. "label": {
    48. "text": "Prices"
    49. },
    50. "guide": {
    51. "line-style": "solid"
    52. },
    53. "item": {
    54. "font-size": 10
    55. }
    56. },
    57. "scale-y-2": {
    58. "blended": true,
    59. "offset-end": "75%",
    60. "placement": "default",
    61. "values": "0:3:3",
    62. "format": "%vM",
    63. "label": {
    64. "text": "Volume"
    65. },
    66. "guide": {
    67. "line-style": "solid"
    68. },
    69. "item": {
    70. "font-size": 10
    71. }
    72. },
    73. "crosshair-x": {
    74. "plot-label": {
    75. "multiple": true
    76. }
    77. },
    78. "series": [{
    79. "type": "stock",
    80. "scales": "scale-x,scale-y",
    81. "aspect": "candlestick",
    82. "guide-label": {
    83. "text": "Open: $%open<br>High: $%high<br>Low: $%low<br>Close: $%close"
    84. },
    85. "trend-up": {
    86. "background-color": "#099EFF",
    87. "line-color": "#099EFF",
    88. "border-color": "#099EFF"
    89. },
    90. "trend-down": {
    91. "background-color": "none",
    92. "line-color": "#35203B",
    93. "border-color": "#35203B"
    94. },
    95. "values": [
    96. [1420232400000, [31.34, 31.46, 30.87, 31.06]], //01/02/15
    97.  
    98. [1420491600000, [31.80, 32.25, 31.52, 32.05]], //01/05/15
    99. [1420578000000, [32.05, 32.57, 31.93, 32.30]], //01/06/15
    100. [1420664400000, [32.21, 32.39, 31.98, 32.08]], //01/07/15
    101. [1420750800000, [32.32, 32.38, 32.13, 32.37]], //01/08/15
    102. [1420837200000, [32.52, 32.53, 31.95, 32.03]], //01/09/15
    103.  
    104. [1421096400000, [32.07, 32.14, 31.77, 31.98]], //01/12/15
    105. [1421182800000, [32.26, 32.33, 31.61, 31.86]], //01/13/15
    106. [1421269200000, [31.65, 31.85, 31.41, 31.78]], //01/14/15
    107. [1421355600000, [31.86, 31.97, 31.56, 31.58]], //01/15/15
    108. [1421442000000, [31.51, 31.65, 31.45, 31.59]], //01/16/15
    109.  
    110. [1421787600000, [31.84, 31.87, 31.55, 31.85]], //01/20/15
    111. [1421874000000, [31.83, 32.08, 31.71, 32.04]], //01/21/15
    112. [1421960400000, [32.30, 32.36, 31.96, 32.28]], //01/22/15
    113. [1422046800000, [32.43, 32.88, 32.29, 32.48]], //01/23/15
    114.  
    115. [1422306000000, [32.72, 32.74, 32.40, 32.60]], //01/26/15
    116. [1422392400000, [32.39, 32.46, 32.20, 32.38]], //01/27/15
    117. [1422478800000, [32.47, 32.49, 31.81, 31.84]], //01/28/15
    118. [1422565200000, [31.84, 32.20, 31.78, 32.08]], //01/29/15
    119. [1422651600000, [31.88, 32.11, 31.82, 31.89]], //01/30/15
    120.  
    121. [1422910800000, [32.00, 32.22, 31.90, 32.21]], //02/02/15
    122. [1422997200000, [32.29, 32.52, 32.26, 32.47]], //02/03/15
    123. [1423083600000, [32.41, 32.43, 32.08, 32.16]], //02/04/15
    124. [1423170000000, [32.25, 32.50, 32.23, 32.50]], //02/05/15
    125. [1423256400000, [32.54, 32.75, 32.47, 32.52]], //02/06/15
    126.  
    127. [1423515600000, [32.47, 32.75, 31.50, 31.64]], //02/09/15
    128. [1423602000000, [31.77, 32.05, 31.55, 31.96]], //02/10/15
    129. [1423688400000, [31.49, 31.82, 31.35, 31.77]], //02/11/15
    130. [1423774800000, [31.70, 31.99, 30.71, 30.89]], //02/12/15
    131. [1423861200000, [30.99, 31.57, 30.50, 31.55]], //02/13/15
    132.  
    133. [1424206800000, [30.02, 30.30, 29.98, 30.27]], //02/17/15
    134. [1424293200000, [30.34, 30.90, 30.15, 30.80]], //02/18/15
    135. [1424379600000, [30.85, 30.91, 30.05, 30.15]], //02/19/15
    136. [1424466000000, [29.88, 30.21, 29.80, 30.21]], //02/20/15
    137.  
    138. [1424725200000, [30.22, 30.30, 30.10, 30.17]], //02/23/15
    139. [1424811600000, [30.15, 30.45, 30.01, 30.39]], //02/24/15
    140. [1424898000000, [30.45, 31.06, 30.40, 30.91]], //02/25/15
    141. [1424984400000, [30.94, 31.01, 30.81, 30.89]], //02/26/15
    142. [1425070800000, [30.83, 31.27, 30.75, 30.99]], //02/27/15
    143.  
    144. [1425330000000, [30.90, 31.12, 30.85, 31.11]], //03/02/15
    145. [1425416400000, [31.05, 31.08, 30.78, 30.86]], //03/03/15
    146. [1425502800000, [30.76, 30.77, 30.47, 30.66]], //03/04/15
    147. [1425589200000, [30.62, 30.82, 30.57, 30.82]], //03/05/15
    148. [1425675600000, [30.71, 30.78, 30.33, 30.42]], //03/06/15
    149.  
    150. [1425934800000, [30.52, 30.70, 30.49, 30.64]], //03/09/15
    151. [1426021200000, [30.50, 30.64, 30.17, 30.17]], //03/10/15
    152. [1426107600000, [30.28, 30.49, 30.15, 30.19]], //03/11/15
    153. [1426194000000, [30.27, 30.41, 30.17, 30.40]], //03/12/15
    154. [1426280400000, [30.28, 30.36, 29.81, 30.04]], //03/13/15
    155.  
    156. [1426539600000, [30.06, 30.48, 29.96, 30.45]], //03/16/15
    157. [1426626000000, [30.30, 30.39, 30.09, 30.31]], //03/17/15
    158. [1426712400000, [30.18, 30.85, 30.11, 30.64]], //03/18/15
    159. [1426798800000, [30.44, 30.61, 30.26, 30.33]], //03/19/15
    160. [1426885200000, [30.34, 30.53, 30.30, 30.40]], //03/20/15
    161.  
    162. [1427144400000, [30.48, 30.74, 30.45, 30.47]], //03/23/15
    163. [1427230800000, [30.38, 30.48, 30.27, 30.28]], //03/24/15
    164. [1427317200000, [30.23, 30.33, 29.91, 29.91]], //03/25/15
    165. [1427403600000, [30.80, 30.92, 30.17, 30.30]], //03/26/15
    166. [1427490000000, [30.34, 30.90, 29.60, 29.64]], //03/27/15
    167.  
    168. [1427749200000, [29.98, 30.20, 29.97, 30.12]], //03/30/15
    169. [1427835600000, [30.15, 30.90, 29.81, 30.81]] //03/31/15
    170. ]
    171. },
    172. {
    173. "type": "bar",
    174. "scales": "scale-x,scale-y-2",
    175. "guide-label": {
    176. "text": "Shares Sold: %vM"
    177. },
    178. "aspect": "histogram",
    179. "background-color": "#991249",
    180. "border-color": "white",
    181. "border-width": 1,
    182. "line-style": "dashdot",
    183. "values": [
    184. [1420232400000, 1.3], //01/02/15
    185.  
    186. [1420491600000, 1.5], //01/05/15
    187. [1420578000000, 2.1], //01/06/15
    188. [1420664400000, 2.2], //01/07/15
    189. [1420750800000, 1.9], //01/08/15
    190. [1420837200000, 1.7], //01/09/15
    191.  
    192. [1421096400000, 1.8], //01/12/15
    193. [1421182800000, 1.9], //01/13/15
    194. [1421269200000, 1.9], //01/14/15
    195. [1421355600000, 2.0], //01/15/15
    196. [1421442000000, 1.4], //01/16/15
    197.  
    198. [1421787600000, 2.1], //01/20/15
    199. [1421874000000, 2.3], //01/21/15
    200. [1421960400000, 2.6], //01/22/15
    201. [1422046800000, 2.5], //01/23/15
    202.  
    203. [1422306000000, 2.3], //01/26/15
    204. [1422392400000, 1.5], //01/27/15
    205. [1422478800000, 2.4], //01/28/15
    206. [1422565200000, 1.6], //01/29/15
    207. [1422651600000, 1.4], //01/30/15
    208.  
    209. [1422910800000, 1.6], //02/02/15
    210. [1422997200000, 1.1], //02/03/15
    211. [1423083600000, 1.3], //02/04/15
    212. [1423170000000, 1.5], //02/05/15
    213. [1423256400000, 1.9], //02/06/15
    214.  
    215. [1423515600000, 2.0], //02/09/15
    216. [1423602000000, 2.4], //02/10/15
    217. [1423688400000, 1.4], //02/11/15
    218. [1423774800000, 1.3], //02/12/15
    219. [1423861200000, 1.0], //02/13/15
    220.  
    221. [1424206800000, 0.9], //02/17/15
    222. [1424293200000, 1.1], //02/18/15
    223. [1424379600000, 0.5], //02/19/15
    224. [1424466000000, 0.8], //02/20/15
    225.  
    226. [1424725200000, 1.0], //02/23/15
    227. [1424811600000, 1.5], //02/24/15
    228. [1424898000000, 1.3], //02/25/15
    229. [1424984400000, 1.4], //02/26/15
    230. [1425070800000, 0.9], //02/27/15
    231.  
    232. [1425330000000, 1.8], //03/02/15
    233. [1425416400000, 0.8], //03/03/15
    234. [1425502800000, 1.2], //03/04/15
    235. [1425589200000, 1.4], //03/05/15
    236. [1425675600000, 0.9], //03/06/15
    237.  
    238. [1425934800000, 0.9], //03/09/15
    239. [1426021200000, 1.1], //03/10/15
    240. [1426107600000, 1.5], //03/11/15
    241. [1426194000000, 1.3], //03/12/15
    242. [1426280400000, 1.2], //03/13/15
    243.  
    244. [1426539600000, 1.4], //03/16/15
    245. [1426626000000, 1.7], //03/17/15
    246. [1426712400000, 1.6], //03/18/15
    247. [1426798800000, 1.1], //03/19/15
    248. [1426885200000, 1.0], //03/20/15
    249.  
    250. [1427144400000, 0.9], //03/23/15
    251. [1427230800000, 1.9], //03/24/15
    252. [1427317200000, 1.1], //03/25/15
    253. [1427403600000, 1.5], //03/26/15
    254. [1427490000000, 1.3], //03/27/15
    255.  
    256. [1427749200000, 1.2], //03/30/15
    257. [1427835600000, 2.3], //03/31/15
    258. ]
    259. }
    260. ]
    261. };
    262.  
    263. zingchart.render({
    264. id: 'myChart',
    265. data: myConfig,
    266. height: 400,
    267. width: "100%"
    268. });
    269. </script>
    270. </body>
    271.  
    272. </html>
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingSoft Demo</title>
    7.  
    8. <script src="https://cdn.zingchart.com/zingchart.min.js"></script>
    9. </head>
    10.  
    11. <body>
    12. <div id='myChart'></div>
    13. </body>
    14.  
    15. </html>
    1.  
    1. var myConfig = {
    2. "type": "mixed",
    3. "title": {
    4. "text": "Stock & Volume Chart with Scrollbar"
    5. },
    6. "plot": {
    7. "tooltip": {
    8. "visible": false
    9. }
    10. },
    11. "scale-x": {
    12. "min-value": 1420232400000,
    13. "step": "day",
    14. "transform": {
    15. "type": "date",
    16. "all": "%D,<br>%m/%d"
    17. },
    18. "max-items": 6,
    19. "item": {
    20. "font-size": 10
    21. },
    22. "zooming": true,
    23. "zoom-to-values": [1420232400000, 1422651600000]
    24. },
    25. "scroll-x": {
    26.  
    27. },
    28. "scale-y": {
    29. "offset-start": "35%",
    30. "values": "29:33:2",
    31. "format": "$%v",
    32. "label": {
    33. "text": "Prices"
    34. },
    35. "guide": {
    36. "line-style": "solid"
    37. },
    38. "item": {
    39. "font-size": 10
    40. }
    41. },
    42. "scale-y-2": {
    43. "blended": true,
    44. "offset-end": "75%",
    45. "placement": "default",
    46. "values": "0:3:3",
    47. "format": "%vM",
    48. "label": {
    49. "text": "Volume"
    50. },
    51. "guide": {
    52. "line-style": "solid"
    53. },
    54. "item": {
    55. "font-size": 10
    56. }
    57. },
    58. "crosshair-x": {
    59. "plot-label": {
    60. "multiple": true
    61. }
    62. },
    63. "series": [{
    64. "type": "stock",
    65. "scales": "scale-x,scale-y",
    66. "aspect": "candlestick",
    67. "guide-label": {
    68. "text": "Open: $%open<br>High: $%high<br>Low: $%low<br>Close: $%close"
    69. },
    70. "trend-up": {
    71. "background-color": "#099EFF",
    72. "line-color": "#099EFF",
    73. "border-color": "#099EFF"
    74. },
    75. "trend-down": {
    76. "background-color": "none",
    77. "line-color": "#35203B",
    78. "border-color": "#35203B"
    79. },
    80. "values": [
    81. [1420232400000, [31.34, 31.46, 30.87, 31.06]], //01/02/15
    82.  
    83. [1420491600000, [31.80, 32.25, 31.52, 32.05]], //01/05/15
    84. [1420578000000, [32.05, 32.57, 31.93, 32.30]], //01/06/15
    85. [1420664400000, [32.21, 32.39, 31.98, 32.08]], //01/07/15
    86. [1420750800000, [32.32, 32.38, 32.13, 32.37]], //01/08/15
    87. [1420837200000, [32.52, 32.53, 31.95, 32.03]], //01/09/15
    88.  
    89. [1421096400000, [32.07, 32.14, 31.77, 31.98]], //01/12/15
    90. [1421182800000, [32.26, 32.33, 31.61, 31.86]], //01/13/15
    91. [1421269200000, [31.65, 31.85, 31.41, 31.78]], //01/14/15
    92. [1421355600000, [31.86, 31.97, 31.56, 31.58]], //01/15/15
    93. [1421442000000, [31.51, 31.65, 31.45, 31.59]], //01/16/15
    94.  
    95. [1421787600000, [31.84, 31.87, 31.55, 31.85]], //01/20/15
    96. [1421874000000, [31.83, 32.08, 31.71, 32.04]], //01/21/15
    97. [1421960400000, [32.30, 32.36, 31.96, 32.28]], //01/22/15
    98. [1422046800000, [32.43, 32.88, 32.29, 32.48]], //01/23/15
    99.  
    100. [1422306000000, [32.72, 32.74, 32.40, 32.60]], //01/26/15
    101. [1422392400000, [32.39, 32.46, 32.20, 32.38]], //01/27/15
    102. [1422478800000, [32.47, 32.49, 31.81, 31.84]], //01/28/15
    103. [1422565200000, [31.84, 32.20, 31.78, 32.08]], //01/29/15
    104. [1422651600000, [31.88, 32.11, 31.82, 31.89]], //01/30/15
    105.  
    106. [1422910800000, [32.00, 32.22, 31.90, 32.21]], //02/02/15
    107. [1422997200000, [32.29, 32.52, 32.26, 32.47]], //02/03/15
    108. [1423083600000, [32.41, 32.43, 32.08, 32.16]], //02/04/15
    109. [1423170000000, [32.25, 32.50, 32.23, 32.50]], //02/05/15
    110. [1423256400000, [32.54, 32.75, 32.47, 32.52]], //02/06/15
    111.  
    112. [1423515600000, [32.47, 32.75, 31.50, 31.64]], //02/09/15
    113. [1423602000000, [31.77, 32.05, 31.55, 31.96]], //02/10/15
    114. [1423688400000, [31.49, 31.82, 31.35, 31.77]], //02/11/15
    115. [1423774800000, [31.70, 31.99, 30.71, 30.89]], //02/12/15
    116. [1423861200000, [30.99, 31.57, 30.50, 31.55]], //02/13/15
    117.  
    118. [1424206800000, [30.02, 30.30, 29.98, 30.27]], //02/17/15
    119. [1424293200000, [30.34, 30.90, 30.15, 30.80]], //02/18/15
    120. [1424379600000, [30.85, 30.91, 30.05, 30.15]], //02/19/15
    121. [1424466000000, [29.88, 30.21, 29.80, 30.21]], //02/20/15
    122.  
    123. [1424725200000, [30.22, 30.30, 30.10, 30.17]], //02/23/15
    124. [1424811600000, [30.15, 30.45, 30.01, 30.39]], //02/24/15
    125. [1424898000000, [30.45, 31.06, 30.40, 30.91]], //02/25/15
    126. [1424984400000, [30.94, 31.01, 30.81, 30.89]], //02/26/15
    127. [1425070800000, [30.83, 31.27, 30.75, 30.99]], //02/27/15
    128.  
    129. [1425330000000, [30.90, 31.12, 30.85, 31.11]], //03/02/15
    130. [1425416400000, [31.05, 31.08, 30.78, 30.86]], //03/03/15
    131. [1425502800000, [30.76, 30.77, 30.47, 30.66]], //03/04/15
    132. [1425589200000, [30.62, 30.82, 30.57, 30.82]], //03/05/15
    133. [1425675600000, [30.71, 30.78, 30.33, 30.42]], //03/06/15
    134.  
    135. [1425934800000, [30.52, 30.70, 30.49, 30.64]], //03/09/15
    136. [1426021200000, [30.50, 30.64, 30.17, 30.17]], //03/10/15
    137. [1426107600000, [30.28, 30.49, 30.15, 30.19]], //03/11/15
    138. [1426194000000, [30.27, 30.41, 30.17, 30.40]], //03/12/15
    139. [1426280400000, [30.28, 30.36, 29.81, 30.04]], //03/13/15
    140.  
    141. [1426539600000, [30.06, 30.48, 29.96, 30.45]], //03/16/15
    142. [1426626000000, [30.30, 30.39, 30.09, 30.31]], //03/17/15
    143. [1426712400000, [30.18, 30.85, 30.11, 30.64]], //03/18/15
    144. [1426798800000, [30.44, 30.61, 30.26, 30.33]], //03/19/15
    145. [1426885200000, [30.34, 30.53, 30.30, 30.40]], //03/20/15
    146.  
    147. [1427144400000, [30.48, 30.74, 30.45, 30.47]], //03/23/15
    148. [1427230800000, [30.38, 30.48, 30.27, 30.28]], //03/24/15
    149. [1427317200000, [30.23, 30.33, 29.91, 29.91]], //03/25/15
    150. [1427403600000, [30.80, 30.92, 30.17, 30.30]], //03/26/15
    151. [1427490000000, [30.34, 30.90, 29.60, 29.64]], //03/27/15
    152.  
    153. [1427749200000, [29.98, 30.20, 29.97, 30.12]], //03/30/15
    154. [1427835600000, [30.15, 30.90, 29.81, 30.81]] //03/31/15
    155. ]
    156. },
    157. {
    158. "type": "bar",
    159. "scales": "scale-x,scale-y-2",
    160. "guide-label": {
    161. "text": "Shares Sold: %vM"
    162. },
    163. "aspect": "histogram",
    164. "background-color": "#991249",
    165. "border-color": "white",
    166. "border-width": 1,
    167. "line-style": "dashdot",
    168. "values": [
    169. [1420232400000, 1.3], //01/02/15
    170.  
    171. [1420491600000, 1.5], //01/05/15
    172. [1420578000000, 2.1], //01/06/15
    173. [1420664400000, 2.2], //01/07/15
    174. [1420750800000, 1.9], //01/08/15
    175. [1420837200000, 1.7], //01/09/15
    176.  
    177. [1421096400000, 1.8], //01/12/15
    178. [1421182800000, 1.9], //01/13/15
    179. [1421269200000, 1.9], //01/14/15
    180. [1421355600000, 2.0], //01/15/15
    181. [1421442000000, 1.4], //01/16/15
    182.  
    183. [1421787600000, 2.1], //01/20/15
    184. [1421874000000, 2.3], //01/21/15
    185. [1421960400000, 2.6], //01/22/15
    186. [1422046800000, 2.5], //01/23/15
    187.  
    188. [1422306000000, 2.3], //01/26/15
    189. [1422392400000, 1.5], //01/27/15
    190. [1422478800000, 2.4], //01/28/15
    191. [1422565200000, 1.6], //01/29/15
    192. [1422651600000, 1.4], //01/30/15
    193.  
    194. [1422910800000, 1.6], //02/02/15
    195. [1422997200000, 1.1], //02/03/15
    196. [1423083600000, 1.3], //02/04/15
    197. [1423170000000, 1.5], //02/05/15
    198. [1423256400000, 1.9], //02/06/15
    199.  
    200. [1423515600000, 2.0], //02/09/15
    201. [1423602000000, 2.4], //02/10/15
    202. [1423688400000, 1.4], //02/11/15
    203. [1423774800000, 1.3], //02/12/15
    204. [1423861200000, 1.0], //02/13/15
    205.  
    206. [1424206800000, 0.9], //02/17/15
    207. [1424293200000, 1.1], //02/18/15
    208. [1424379600000, 0.5], //02/19/15
    209. [1424466000000, 0.8], //02/20/15
    210.  
    211. [1424725200000, 1.0], //02/23/15
    212. [1424811600000, 1.5], //02/24/15
    213. [1424898000000, 1.3], //02/25/15
    214. [1424984400000, 1.4], //02/26/15
    215. [1425070800000, 0.9], //02/27/15
    216.  
    217. [1425330000000, 1.8], //03/02/15
    218. [1425416400000, 0.8], //03/03/15
    219. [1425502800000, 1.2], //03/04/15
    220. [1425589200000, 1.4], //03/05/15
    221. [1425675600000, 0.9], //03/06/15
    222.  
    223. [1425934800000, 0.9], //03/09/15
    224. [1426021200000, 1.1], //03/10/15
    225. [1426107600000, 1.5], //03/11/15
    226. [1426194000000, 1.3], //03/12/15
    227. [1426280400000, 1.2], //03/13/15
    228.  
    229. [1426539600000, 1.4], //03/16/15
    230. [1426626000000, 1.7], //03/17/15
    231. [1426712400000, 1.6], //03/18/15
    232. [1426798800000, 1.1], //03/19/15
    233. [1426885200000, 1.0], //03/20/15
    234.  
    235. [1427144400000, 0.9], //03/23/15
    236. [1427230800000, 1.9], //03/24/15
    237. [1427317200000, 1.1], //03/25/15
    238. [1427403600000, 1.5], //03/26/15
    239. [1427490000000, 1.3], //03/27/15
    240.  
    241. [1427749200000, 1.2], //03/30/15
    242. [1427835600000, 2.3], //03/31/15
    243. ]
    244. }
    245. ]
    246. };
    247.  
    248. zingchart.render({
    249. id: 'myChart',
    250. data: myConfig,
    251. height: 400,
    252. width: "100%"
    253. });