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