• 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": "Blended Scales"
    20. },
    21. "scale-x": {
    22. "min-value": 1420232400000,
    23. "step": "day",
    24. "transform": {
    25. "type": "date",
    26. "all": "%m/%d/%y"
    27. },
    28. "items-overlap": true,
    29. "max-items": 10,
    30. "item": {
    31. "font-size": 10
    32. }
    33. },
    34. "scale-y": {
    35. "offset-end": "60%",
    36. "values": "0:6:3",
    37. "format": "%vM",
    38. "guide": {
    39. "line-style": "dashdot"
    40. },
    41. "item": {
    42. "font-size": 10
    43. }
    44. },
    45. "scale-y-2": {
    46. "placement": "default",
    47. "blended": true,
    48. "offset-start": "50%",
    49. "values": "28:34:2",
    50. "format": "$%v",
    51. "guide": {
    52. "line-style": "dashdot"
    53. },
    54. "item": {
    55. "font-size": 10
    56. }
    57. },
    58. "crosshair-x": {
    59. "plot-label": {
    60. "multiple": true
    61. }
    62. },
    63. "plot": {
    64. "tooltip": {
    65. "visible": false
    66. }
    67. },
    68. "series": [{
    69. "type": "area",
    70. "scales": "scale-x,scale-y",
    71. "guide-label": {
    72. "text": "Shares Sold: %vM",
    73. "decimals": 2
    74. },
    75. "background-color": "#91C740",
    76. "line-color": "#91C740",
    77. "line-width": 1,
    78. "marker": {
    79. "visible": false
    80. },
    81. "values": [
    82. [1420232400000, 1.3], //01/02/15
    83.  
    84. [1420491600000, 1.5], //01/05/15
    85. [1420578000000, 2.1], //01/06/15
    86. [1420664400000, 2.2], //01/07/15
    87. [1420750800000, 1.9], //01/08/15
    88. [1420837200000, 1.7], //01/09/15
    89.  
    90. [1421096400000, 1.8], //01/12/15
    91. [1421182800000, 1.9], //01/13/15
    92. [1421269200000, 1.9], //01/14/15
    93. [1421355600000, 2.0], //01/15/15
    94. [1421442000000, 1.4], //01/16/15
    95.  
    96. [1421787600000, 2.1], //01/20/15
    97. [1421874000000, 2.3], //01/21/15
    98. [1421960400000, 2.6], //01/22/15
    99. [1422046800000, 2.5], //01/23/15
    100.  
    101. [1422306000000, 2.3], //01/26/15
    102. [1422392400000, 1.5], //01/27/15
    103. [1422478800000, 2.4], //01/28/15
    104. [1422565200000, 1.6], //01/29/15
    105. [1422651600000, 1.4], //01/30/15
    106.  
    107. [1422910800000, 1.6], //02/02/15
    108. [1422997200000, 1.1], //02/03/15
    109. [1423083600000, 1.3], //02/04/15
    110. [1423170000000, 1.5], //02/05/15
    111. [1423256400000, 1.9], //02/06/15
    112.  
    113. [1423515600000, 2.0], //02/09/15
    114. [1423602000000, 2.4], //02/10/15
    115. [1423688400000, 1.4], //02/11/15
    116. [1423774800000, 1.3], //02/12/15
    117. [1423861200000, 1.0], //02/13/15
    118.  
    119. [1424206800000, 0.9], //02/17/15
    120. [1424293200000, 1.1], //02/18/15
    121. [1424379600000, 0.5], //02/19/15
    122. [1424466000000, 0.8], //02/20/15
    123.  
    124. [1424725200000, 1.0], //02/23/15
    125. [1424811600000, 1.5], //02/24/15
    126. [1424898000000, 1.3], //02/25/15
    127. [1424984400000, 1.4], //02/26/15
    128. [1425070800000, 0.9], //02/27/15
    129.  
    130. [1425330000000, 1.8], //03/02/15
    131. [1425416400000, 0.8], //03/03/15
    132. [1425502800000, 1.2], //03/04/15
    133. [1425589200000, 1.4], //03/05/15
    134. [1425675600000, 0.9], //03/06/15
    135.  
    136. [1425934800000, 0.9], //03/09/15
    137. [1426021200000, 1.1], //03/10/15
    138. [1426107600000, 2.5], //03/11/15
    139. [1426194000000, 2.3], //03/12/15
    140. [1426280400000, 1.2], //03/13/15
    141.  
    142. [1426539600000, 1.4], //03/16/15
    143. [1426626000000, 2.7], //03/17/15
    144. [1426712400000, 2.6], //03/18/15
    145. [1426798800000, 2.1], //03/19/15
    146. [1426885200000, 3.0], //03/20/15
    147.  
    148. [1427144400000, 3.9], //03/23/15
    149. [1427230800000, 4.9], //03/24/15
    150. [1427317200000, 5.1], //03/25/15
    151. [1427403600000, 4.5], //03/26/15
    152. [1427490000000, 5.3], //03/27/15
    153.  
    154. [1427749200000, 4.2], //03/30/15
    155. [1427835600000, 3.3], //03/31/15
    156. ]
    157. },
    158. {
    159. "type": "stock",
    160. "scales": "scale-x,scale-y-2",
    161. "aspect": "candlestick",
    162. "guide-label": {
    163. "text": "Open: $%open<br>High: $%high<br>Low: $%low<br>Close: $%close",
    164. "decimals": 2
    165. },
    166. "trend-up": {
    167. "background-color": "#ED008E",
    168. "line-color": "#ED008E",
    169. "border-color": "#ED008E"
    170. },
    171. "trend-down": {
    172. "background-color": "#F0592B",
    173. "line-color": "#F0592B",
    174. "border-color": "#F0592B"
    175. },
    176. "values": [
    177. [1420232400000, [29.34, 29.46, 28.87, 29.06]], //01/02/15
    178.  
    179. [1420491600000, [29.80, 30.25, 29.52, 30.05]], //01/05/15
    180. [1420578000000, [30.05, 29.57, 29.93, 30.30]], //01/06/15
    181. [1420664400000, [30.21, 30.39, 29.98, 30.08]], //01/07/15
    182. [1420750800000, [30.32, 30.38, 30.13, 30.37]], //01/08/15
    183. [1420837200000, [29.52, 29.53, 28.95, 29.03]], //01/09/15
    184.  
    185. [1421096400000, [30.07, 30.14, 29.77, 29.98]], //01/12/15
    186. [1421182800000, [30.26, 30.33, 29.61, 29.86]], //01/13/15
    187. [1421269200000, [29.65, 29.85, 29.41, 29.78]], //01/14/15
    188. [1421355600000, [29.86, 29.97, 29.56, 29.58]], //01/15/15
    189. [1421442000000, [29.51, 29.65, 29.45, 29.59]], //01/16/15
    190.  
    191. [1421787600000, [29.84, 29.87, 29.55, 29.85]], //01/20/15
    192. [1421874000000, [29.83, 30.08, 29.71, 30.04]], //01/21/15
    193. [1421960400000, [30.30, 30.36, 29.96, 30.28]], //01/22/15
    194. [1422046800000, [29.95, 30.88, 29.90, 30.48]], //01/23/15
    195.  
    196. [1422306000000, [30.72, 31.74, 30.40, 31.60]], //01/26/15
    197. [1422392400000, [31.39, 31.91, 31.20, 31.28]], //01/27/15
    198. [1422478800000, [32.47, 32.49, 31.81, 31.84]], //01/28/15
    199. [1422565200000, [31.84, 32.20, 31.78, 32.08]], //01/29/15
    200. [1422651600000, [31.88, 32.11, 31.82, 31.89]], //01/30/15
    201.  
    202. [1422910800000, [32.00, 32.22, 31.90, 32.21]], //02/02/15
    203. [1422997200000, [32.29, 32.52, 32.26, 32.47]], //02/03/15
    204. [1423083600000, [32.41, 32.43, 32.08, 32.16]], //02/04/15
    205. [1423170000000, [32.25, 32.50, 32.23, 32.50]], //02/05/15
    206. [1423256400000, [32.54, 32.75, 32.47, 32.52]], //02/06/15
    207.  
    208. [1423515600000, [32.47, 32.75, 31.50, 31.64]], //02/09/15
    209. [1423602000000, [31.77, 32.05, 31.55, 31.96]], //02/10/15
    210. [1423688400000, [31.49, 31.82, 31.35, 31.77]], //02/11/15
    211. [1423774800000, [31.70, 31.99, 30.71, 30.89]], //02/12/15
    212. [1423861200000, [30.99, 31.57, 30.50, 31.55]], //02/13/15
    213.  
    214. [1424206800000, [30.02, 30.30, 29.98, 30.27]], //02/17/15
    215. [1424293200000, [30.34, 30.90, 30.15, 30.80]], //02/18/15
    216. [1424379600000, [30.85, 30.91, 30.05, 30.15]], //02/19/15
    217. [1424466000000, [29.88, 30.21, 29.80, 30.21]], //02/20/15
    218.  
    219. [1424725200000, [30.22, 30.30, 30.10, 30.17]], //02/23/15
    220. [1424811600000, [30.15, 30.45, 30.01, 30.39]], //02/24/15
    221. [1424898000000, [30.45, 31.06, 30.40, 30.91]], //02/25/15
    222. [1424984400000, [30.94, 31.01, 30.81, 30.89]], //02/26/15
    223. [1425070800000, [30.83, 31.27, 30.75, 30.99]], //02/27/15
    224.  
    225. [1425330000000, [30.90, 31.12, 30.85, 31.11]], //03/02/15
    226. [1425416400000, [31.05, 31.08, 30.78, 30.86]], //03/03/15
    227. [1425502800000, [30.76, 30.77, 30.47, 30.66]], //03/04/15
    228. [1425589200000, [30.62, 30.82, 30.57, 30.82]], //03/05/15
    229. [1425675600000, [30.71, 30.78, 30.33, 30.42]], //03/06/15
    230.  
    231. [1425934800000, [30.52, 30.70, 30.49, 30.64]], //03/09/15
    232. [1426021200000, [30.50, 30.64, 30.17, 30.17]], //03/10/15
    233. [1426107600000, [30.28, 30.49, 30.15, 30.19]], //03/11/15
    234. [1426194000000, [30.27, 30.41, 30.17, 30.40]], //03/12/15
    235. [1426280400000, [30.28, 30.36, 29.81, 30.04]], //03/13/15
    236.  
    237. [1426539600000, [30.06, 30.48, 29.96, 30.45]], //03/16/15
    238. [1426626000000, [30.30, 30.39, 30.09, 30.31]], //03/17/15
    239. [1426712400000, [30.18, 30.85, 30.11, 30.64]], //03/18/15
    240. [1426798800000, [30.44, 30.61, 30.26, 30.33]], //03/19/15
    241. [1426885200000, [30.34, 30.53, 30.30, 30.40]], //03/20/15
    242.  
    243. [1427144400000, [30.48, 30.74, 30.45, 30.47]], //03/23/15
    244. [1427230800000, [30.38, 30.48, 30.27, 30.28]], //03/24/15
    245. [1427317200000, [30.23, 30.33, 29.91, 29.91]], //03/25/15
    246. [1427403600000, [30.80, 30.92, 30.17, 30.30]], //03/26/15
    247. [1427490000000, [30.34, 30.90, 29.60, 29.64]], //03/27/15
    248.  
    249. [1427749200000, [29.98, 30.20, 29.97, 30.12]], //03/30/15
    250. [1427835600000, [30.15, 30.90, 29.81, 30.81]] //03/31/15
    251. ]
    252. }
    253. ]
    254. };
    255.  
    256. zingchart.render({
    257. id: 'myChart',
    258. data: myConfig,
    259. height: 400,
    260. width: "100%"
    261. });
    262. </script>
    263. </body>
    264.  
    265. </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": "Blended Scales"
    5. },
    6. "scale-x": {
    7. "min-value": 1420232400000,
    8. "step": "day",
    9. "transform": {
    10. "type": "date",
    11. "all": "%m/%d/%y"
    12. },
    13. "items-overlap": true,
    14. "max-items": 10,
    15. "item": {
    16. "font-size": 10
    17. }
    18. },
    19. "scale-y": {
    20. "offset-end": "60%",
    21. "values": "0:6:3",
    22. "format": "%vM",
    23. "guide": {
    24. "line-style": "dashdot"
    25. },
    26. "item": {
    27. "font-size": 10
    28. }
    29. },
    30. "scale-y-2": {
    31. "placement": "default",
    32. "blended": true,
    33. "offset-start": "50%",
    34. "values": "28:34:2",
    35. "format": "$%v",
    36. "guide": {
    37. "line-style": "dashdot"
    38. },
    39. "item": {
    40. "font-size": 10
    41. }
    42. },
    43. "crosshair-x": {
    44. "plot-label": {
    45. "multiple": true
    46. }
    47. },
    48. "plot": {
    49. "tooltip": {
    50. "visible": false
    51. }
    52. },
    53. "series": [{
    54. "type": "area",
    55. "scales": "scale-x,scale-y",
    56. "guide-label": {
    57. "text": "Shares Sold: %vM",
    58. "decimals": 2
    59. },
    60. "background-color": "#91C740",
    61. "line-color": "#91C740",
    62. "line-width": 1,
    63. "marker": {
    64. "visible": false
    65. },
    66. "values": [
    67. [1420232400000, 1.3], //01/02/15
    68.  
    69. [1420491600000, 1.5], //01/05/15
    70. [1420578000000, 2.1], //01/06/15
    71. [1420664400000, 2.2], //01/07/15
    72. [1420750800000, 1.9], //01/08/15
    73. [1420837200000, 1.7], //01/09/15
    74.  
    75. [1421096400000, 1.8], //01/12/15
    76. [1421182800000, 1.9], //01/13/15
    77. [1421269200000, 1.9], //01/14/15
    78. [1421355600000, 2.0], //01/15/15
    79. [1421442000000, 1.4], //01/16/15
    80.  
    81. [1421787600000, 2.1], //01/20/15
    82. [1421874000000, 2.3], //01/21/15
    83. [1421960400000, 2.6], //01/22/15
    84. [1422046800000, 2.5], //01/23/15
    85.  
    86. [1422306000000, 2.3], //01/26/15
    87. [1422392400000, 1.5], //01/27/15
    88. [1422478800000, 2.4], //01/28/15
    89. [1422565200000, 1.6], //01/29/15
    90. [1422651600000, 1.4], //01/30/15
    91.  
    92. [1422910800000, 1.6], //02/02/15
    93. [1422997200000, 1.1], //02/03/15
    94. [1423083600000, 1.3], //02/04/15
    95. [1423170000000, 1.5], //02/05/15
    96. [1423256400000, 1.9], //02/06/15
    97.  
    98. [1423515600000, 2.0], //02/09/15
    99. [1423602000000, 2.4], //02/10/15
    100. [1423688400000, 1.4], //02/11/15
    101. [1423774800000, 1.3], //02/12/15
    102. [1423861200000, 1.0], //02/13/15
    103.  
    104. [1424206800000, 0.9], //02/17/15
    105. [1424293200000, 1.1], //02/18/15
    106. [1424379600000, 0.5], //02/19/15
    107. [1424466000000, 0.8], //02/20/15
    108.  
    109. [1424725200000, 1.0], //02/23/15
    110. [1424811600000, 1.5], //02/24/15
    111. [1424898000000, 1.3], //02/25/15
    112. [1424984400000, 1.4], //02/26/15
    113. [1425070800000, 0.9], //02/27/15
    114.  
    115. [1425330000000, 1.8], //03/02/15
    116. [1425416400000, 0.8], //03/03/15
    117. [1425502800000, 1.2], //03/04/15
    118. [1425589200000, 1.4], //03/05/15
    119. [1425675600000, 0.9], //03/06/15
    120.  
    121. [1425934800000, 0.9], //03/09/15
    122. [1426021200000, 1.1], //03/10/15
    123. [1426107600000, 2.5], //03/11/15
    124. [1426194000000, 2.3], //03/12/15
    125. [1426280400000, 1.2], //03/13/15
    126.  
    127. [1426539600000, 1.4], //03/16/15
    128. [1426626000000, 2.7], //03/17/15
    129. [1426712400000, 2.6], //03/18/15
    130. [1426798800000, 2.1], //03/19/15
    131. [1426885200000, 3.0], //03/20/15
    132.  
    133. [1427144400000, 3.9], //03/23/15
    134. [1427230800000, 4.9], //03/24/15
    135. [1427317200000, 5.1], //03/25/15
    136. [1427403600000, 4.5], //03/26/15
    137. [1427490000000, 5.3], //03/27/15
    138.  
    139. [1427749200000, 4.2], //03/30/15
    140. [1427835600000, 3.3], //03/31/15
    141. ]
    142. },
    143. {
    144. "type": "stock",
    145. "scales": "scale-x,scale-y-2",
    146. "aspect": "candlestick",
    147. "guide-label": {
    148. "text": "Open: $%open<br>High: $%high<br>Low: $%low<br>Close: $%close",
    149. "decimals": 2
    150. },
    151. "trend-up": {
    152. "background-color": "#ED008E",
    153. "line-color": "#ED008E",
    154. "border-color": "#ED008E"
    155. },
    156. "trend-down": {
    157. "background-color": "#F0592B",
    158. "line-color": "#F0592B",
    159. "border-color": "#F0592B"
    160. },
    161. "values": [
    162. [1420232400000, [29.34, 29.46, 28.87, 29.06]], //01/02/15
    163.  
    164. [1420491600000, [29.80, 30.25, 29.52, 30.05]], //01/05/15
    165. [1420578000000, [30.05, 29.57, 29.93, 30.30]], //01/06/15
    166. [1420664400000, [30.21, 30.39, 29.98, 30.08]], //01/07/15
    167. [1420750800000, [30.32, 30.38, 30.13, 30.37]], //01/08/15
    168. [1420837200000, [29.52, 29.53, 28.95, 29.03]], //01/09/15
    169.  
    170. [1421096400000, [30.07, 30.14, 29.77, 29.98]], //01/12/15
    171. [1421182800000, [30.26, 30.33, 29.61, 29.86]], //01/13/15
    172. [1421269200000, [29.65, 29.85, 29.41, 29.78]], //01/14/15
    173. [1421355600000, [29.86, 29.97, 29.56, 29.58]], //01/15/15
    174. [1421442000000, [29.51, 29.65, 29.45, 29.59]], //01/16/15
    175.  
    176. [1421787600000, [29.84, 29.87, 29.55, 29.85]], //01/20/15
    177. [1421874000000, [29.83, 30.08, 29.71, 30.04]], //01/21/15
    178. [1421960400000, [30.30, 30.36, 29.96, 30.28]], //01/22/15
    179. [1422046800000, [29.95, 30.88, 29.90, 30.48]], //01/23/15
    180.  
    181. [1422306000000, [30.72, 31.74, 30.40, 31.60]], //01/26/15
    182. [1422392400000, [31.39, 31.91, 31.20, 31.28]], //01/27/15
    183. [1422478800000, [32.47, 32.49, 31.81, 31.84]], //01/28/15
    184. [1422565200000, [31.84, 32.20, 31.78, 32.08]], //01/29/15
    185. [1422651600000, [31.88, 32.11, 31.82, 31.89]], //01/30/15
    186.  
    187. [1422910800000, [32.00, 32.22, 31.90, 32.21]], //02/02/15
    188. [1422997200000, [32.29, 32.52, 32.26, 32.47]], //02/03/15
    189. [1423083600000, [32.41, 32.43, 32.08, 32.16]], //02/04/15
    190. [1423170000000, [32.25, 32.50, 32.23, 32.50]], //02/05/15
    191. [1423256400000, [32.54, 32.75, 32.47, 32.52]], //02/06/15
    192.  
    193. [1423515600000, [32.47, 32.75, 31.50, 31.64]], //02/09/15
    194. [1423602000000, [31.77, 32.05, 31.55, 31.96]], //02/10/15
    195. [1423688400000, [31.49, 31.82, 31.35, 31.77]], //02/11/15
    196. [1423774800000, [31.70, 31.99, 30.71, 30.89]], //02/12/15
    197. [1423861200000, [30.99, 31.57, 30.50, 31.55]], //02/13/15
    198.  
    199. [1424206800000, [30.02, 30.30, 29.98, 30.27]], //02/17/15
    200. [1424293200000, [30.34, 30.90, 30.15, 30.80]], //02/18/15
    201. [1424379600000, [30.85, 30.91, 30.05, 30.15]], //02/19/15
    202. [1424466000000, [29.88, 30.21, 29.80, 30.21]], //02/20/15
    203.  
    204. [1424725200000, [30.22, 30.30, 30.10, 30.17]], //02/23/15
    205. [1424811600000, [30.15, 30.45, 30.01, 30.39]], //02/24/15
    206. [1424898000000, [30.45, 31.06, 30.40, 30.91]], //02/25/15
    207. [1424984400000, [30.94, 31.01, 30.81, 30.89]], //02/26/15
    208. [1425070800000, [30.83, 31.27, 30.75, 30.99]], //02/27/15
    209.  
    210. [1425330000000, [30.90, 31.12, 30.85, 31.11]], //03/02/15
    211. [1425416400000, [31.05, 31.08, 30.78, 30.86]], //03/03/15
    212. [1425502800000, [30.76, 30.77, 30.47, 30.66]], //03/04/15
    213. [1425589200000, [30.62, 30.82, 30.57, 30.82]], //03/05/15
    214. [1425675600000, [30.71, 30.78, 30.33, 30.42]], //03/06/15
    215.  
    216. [1425934800000, [30.52, 30.70, 30.49, 30.64]], //03/09/15
    217. [1426021200000, [30.50, 30.64, 30.17, 30.17]], //03/10/15
    218. [1426107600000, [30.28, 30.49, 30.15, 30.19]], //03/11/15
    219. [1426194000000, [30.27, 30.41, 30.17, 30.40]], //03/12/15
    220. [1426280400000, [30.28, 30.36, 29.81, 30.04]], //03/13/15
    221.  
    222. [1426539600000, [30.06, 30.48, 29.96, 30.45]], //03/16/15
    223. [1426626000000, [30.30, 30.39, 30.09, 30.31]], //03/17/15
    224. [1426712400000, [30.18, 30.85, 30.11, 30.64]], //03/18/15
    225. [1426798800000, [30.44, 30.61, 30.26, 30.33]], //03/19/15
    226. [1426885200000, [30.34, 30.53, 30.30, 30.40]], //03/20/15
    227.  
    228. [1427144400000, [30.48, 30.74, 30.45, 30.47]], //03/23/15
    229. [1427230800000, [30.38, 30.48, 30.27, 30.28]], //03/24/15
    230. [1427317200000, [30.23, 30.33, 29.91, 29.91]], //03/25/15
    231. [1427403600000, [30.80, 30.92, 30.17, 30.30]], //03/26/15
    232. [1427490000000, [30.34, 30.90, 29.60, 29.64]], //03/27/15
    233.  
    234. [1427749200000, [29.98, 30.20, 29.97, 30.12]], //03/30/15
    235. [1427835600000, [30.15, 30.90, 29.81, 30.81]] //03/31/15
    236. ]
    237. }
    238. ]
    239. };
    240.  
    241. zingchart.render({
    242. id: 'myChart',
    243. data: myConfig,
    244. height: 400,
    245. width: "100%"
    246. });