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