• 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. "crosshair-x": {
    19. "plot-label": {
    20. "text": "%v<br>+%node-error-plus/-%node-error-minus",
    21. "text-align": "center",
    22. "font-color": "#660066",
    23. "font-family": "Georgia",
    24. "background-color": "#ffe6f0",
    25. "alpha": 0.7,
    26. "border-color": "none",
    27. "border-radius": "5px",
    28. "padding": "10%",
    29. },
    30. "scale-label": {
    31. "text": "%v",
    32. "transform": {
    33. "type": "date",
    34. "all": "%M %d, %Y<br>%g:%i %a"
    35. },
    36. "font-family": "Georgia"
    37. }
    38. },
    39. "plot": {
    40. "errors": [
    41. [3.3, 2.1],
    42. [3.6, 5],
    43. [3.1, 3.4],
    44. [3, 4],
    45. [1.9, 2.9],
    46. [6, 1.6],
    47. [5.5, 5.3],
    48. [4, 3]
    49. ],
    50. "error": {
    51. "size": "10px",
    52. "line-color": "#660066",
    53. "line-style": "dashed"
    54. },
    55. "tooltip": {
    56. "visible": false
    57. },
    58. "aspect": "spline",
    59. "styles": ["#ff0066", "#ff4d94", "#ff80b3", "#ffcce0", "#b3ffff", "#00b3b3", "#008080", "#004d4d"],
    60. "marker": {
    61. "visible": false
    62. }
    63. },
    64.  
    65. "scale-x": {
    66. "min-value": "1459515600000",
    67. "max-value": "1459558800000",
    68. "transform": {
    69. "type": "date",
    70. "all": "%g:%i %a"
    71. },
    72. "max-items": 6
    73. },
    74. "utc": true,
    75. "timezone": -5, //EST time
    76. "scale-y": {
    77. "guide": {
    78. "line-style": "solid"
    79. }
    80. },
    81. "series": [{
    82. "values": [
    83. [1459517460000, 3],
    84. [1459539240000, 34],
    85. [1459542660000, 9],
    86. [1459547040000, 16],
    87. [1459553400000, 15],
    88. [1459553640000, 31],
    89. [1459554660000, 33],
    90. [1459557060000, 35]
    91. ]
    92. }]
    93. };
    94.  
    95. zingchart.render({
    96. id: 'myChart',
    97. data: myConfig,
    98. height: 400,
    99. width: "100%"
    100. });
    101. </script>
    102. </body>
    103.  
    104. </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. "crosshair-x": {
    4. "plot-label": {
    5. "text": "%v<br>+%node-error-plus/-%node-error-minus",
    6. "text-align": "center",
    7. "font-color": "#660066",
    8. "font-family": "Georgia",
    9. "background-color": "#ffe6f0",
    10. "alpha": 0.7,
    11. "border-color": "none",
    12. "border-radius": "5px",
    13. "padding": "10%",
    14. },
    15. "scale-label": {
    16. "text": "%v",
    17. "transform": {
    18. "type": "date",
    19. "all": "%M %d, %Y<br>%g:%i %a"
    20. },
    21. "font-family": "Georgia"
    22. }
    23. },
    24. "plot": {
    25. "errors": [
    26. [3.3, 2.1],
    27. [3.6, 5],
    28. [3.1, 3.4],
    29. [3, 4],
    30. [1.9, 2.9],
    31. [6, 1.6],
    32. [5.5, 5.3],
    33. [4, 3]
    34. ],
    35. "error": {
    36. "size": "10px",
    37. "line-color": "#660066",
    38. "line-style": "dashed"
    39. },
    40. "tooltip": {
    41. "visible": false
    42. },
    43. "aspect": "spline",
    44. "styles": ["#ff0066", "#ff4d94", "#ff80b3", "#ffcce0", "#b3ffff", "#00b3b3", "#008080", "#004d4d"],
    45. "marker": {
    46. "visible": false
    47. }
    48. },
    49.  
    50. "scale-x": {
    51. "min-value": "1459515600000",
    52. "max-value": "1459558800000",
    53. "transform": {
    54. "type": "date",
    55. "all": "%g:%i %a"
    56. },
    57. "max-items": 6
    58. },
    59. "utc": true,
    60. "timezone": -5, //EST time
    61. "scale-y": {
    62. "guide": {
    63. "line-style": "solid"
    64. }
    65. },
    66. "series": [{
    67. "values": [
    68. [1459517460000, 3],
    69. [1459539240000, 34],
    70. [1459542660000, 9],
    71. [1459547040000, 16],
    72. [1459553400000, 15],
    73. [1459553640000, 31],
    74. [1459554660000, 33],
    75. [1459557060000, 35]
    76. ]
    77. }]
    78. };
    79.  
    80. zingchart.render({
    81. id: 'myChart',
    82. data: myConfig,
    83. height: 400,
    84. width: "100%"
    85. });