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