• 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": "line",
    18. "title": {
    19. "text": "%scale-key-text"
    20. },
    21. "subtitle": {
    22. "text": "the unparsed value"
    23. },
    24. "crosshair-x": {
    25. "plot-label": {
    26. "text": "%scale-key-text: $%v",
    27. "decimals": 2,
    28. "transform": {
    29. "type": "date",
    30. "all": "%g:%i %A"
    31. }
    32. },
    33. "scale-label": {
    34. "visible": false
    35. }
    36. },
    37. "plot": {
    38. "tooltip": {
    39. "visible": false
    40. }
    41. },
    42. "utc": true,
    43. "timezone": -5,
    44. "scale-x": {
    45. "min-value": "1457101800000",
    46. "max-value": "1457125200000",
    47. "step": "30minute",
    48. "transform": {
    49. "type": "date",
    50. "all": "%g:%i"
    51. },
    52. "label": {
    53. "text": "Trading Day"
    54. },
    55. "item": {
    56. "font-size": 10
    57. },
    58. "max-items": 14,
    59. },
    60. "scale-y": {
    61. "values": "30:34:1",
    62. "format": "$%v",
    63. "label": {
    64. "text": "Price"
    65. },
    66. "item": {
    67. "font-size": 10
    68. }
    69. },
    70. "series": [{
    71. "values": [
    72. [1457101800000, 30.34], //03/04/2016 at 9:30 a.m. EST (which is 14:30 in GMT)
    73. [1457103600000, 31.30], //10:00 a.m.
    74. [1457105400000, 30.95], //10:30 a.m.
    75. [1457107200000, 30.99], //11:00 a.m.
    76. [1457109000000, 32.33], //11:30 a.m.
    77. [1457110800000, 33.34], //12:00 p.m.
    78. [1457112600000, 33.01], //12:30 p.m.
    79. [1457114400000, 34], //1:00 p.m.
    80. [1457116200000, 33.64], //1:30 p.m.
    81. [1457118000000, 32.59], //2:00 p.m.
    82. [1457119800000, 32.60], //2:30 p.m.
    83. [1457121600000, 31.99], //3:00 p.m.
    84. [1457123400000, 31.14], //3:30 p.m.
    85. [1457125200000, 32.34], //at 4:00 p.m. EST (which is 21:00 GMT)
    86. ]
    87. }]
    88. };
    89.  
    90. zingchart.render({
    91. id: 'myChart',
    92. data: myConfig,
    93. height: 300,
    94. width: "100%"
    95. });
    96. </script>
    97. </body>
    98.  
    99. </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": "line",
    3. "title": {
    4. "text": "%scale-key-text"
    5. },
    6. "subtitle": {
    7. "text": "the unparsed value"
    8. },
    9. "crosshair-x": {
    10. "plot-label": {
    11. "text": "%scale-key-text: $%v",
    12. "decimals": 2,
    13. "transform": {
    14. "type": "date",
    15. "all": "%g:%i %A"
    16. }
    17. },
    18. "scale-label": {
    19. "visible": false
    20. }
    21. },
    22. "plot": {
    23. "tooltip": {
    24. "visible": false
    25. }
    26. },
    27. "utc": true,
    28. "timezone": -5,
    29. "scale-x": {
    30. "min-value": "1457101800000",
    31. "max-value": "1457125200000",
    32. "step": "30minute",
    33. "transform": {
    34. "type": "date",
    35. "all": "%g:%i"
    36. },
    37. "label": {
    38. "text": "Trading Day"
    39. },
    40. "item": {
    41. "font-size": 10
    42. },
    43. "max-items": 14,
    44. },
    45. "scale-y": {
    46. "values": "30:34:1",
    47. "format": "$%v",
    48. "label": {
    49. "text": "Price"
    50. },
    51. "item": {
    52. "font-size": 10
    53. }
    54. },
    55. "series": [{
    56. "values": [
    57. [1457101800000, 30.34], //03/04/2016 at 9:30 a.m. EST (which is 14:30 in GMT)
    58. [1457103600000, 31.30], //10:00 a.m.
    59. [1457105400000, 30.95], //10:30 a.m.
    60. [1457107200000, 30.99], //11:00 a.m.
    61. [1457109000000, 32.33], //11:30 a.m.
    62. [1457110800000, 33.34], //12:00 p.m.
    63. [1457112600000, 33.01], //12:30 p.m.
    64. [1457114400000, 34], //1:00 p.m.
    65. [1457116200000, 33.64], //1:30 p.m.
    66. [1457118000000, 32.59], //2:00 p.m.
    67. [1457119800000, 32.60], //2:30 p.m.
    68. [1457121600000, 31.99], //3:00 p.m.
    69. [1457123400000, 31.14], //3:30 p.m.
    70. [1457125200000, 32.34], //at 4:00 p.m. EST (which is 21:00 GMT)
    71. ]
    72. }]
    73. };
    74.  
    75. zingchart.render({
    76. id: 'myChart',
    77. data: myConfig,
    78. height: 300,
    79. width: "100%"
    80. });