• Edit
  • Download
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingSoft Demo</title>
    7. <script nonce="undefined" src="https://cdn.zingchart.com/zingchart.min.js"></script>
    8. <style>
    9. html,
    10. body {
    11. margin: 0;
    12. padding: 0;
    13. width: 100%;
    14. height: 100%;
    15. }
    16.  
    17. .chart--container {
    18. min-height: 150px;
    19. width: 100%;
    20. height: 100%;
    21. }
    22.  
    23. .zc-ref {
    24. display: none;
    25. }
    26. </style>
    27. </head>
    28.  
    29. <body>
    30. <!-- CHART CONTAINER -->
    31. <div id="myChart" class="chart--container">
    32. <a class="zc-ref" href="https://www.zingchart.com/">Powered by ZingChart</a>
    33. </div>
    34. <script>
    35. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"]; // window:load event for Javascript to run after HTML
    36. // because this Javascript is injected into the document head
    37. window.addEventListener('load', () => {
    38. // Javascript code to execute after DOM content
    39.  
    40. // full ZingChart schema can be found here:
    41. // https://www.zingchart.com/docs/api/json-configuration/
    42. let chartConfig = {
    43. theme: 'spark',
    44. type: 'line',
    45. globals: {
    46. fontSize: '14px'
    47. },
    48. title: {
    49. text: 'Spark Theme'
    50. },
    51. scaleX: {
    52. // set scale label
    53. label: {
    54. text: 'Days'
    55. },
    56. // convert text on scale indices
    57. labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
    58. },
    59. scaleY: {
    60. // scale label with unicode character
    61. label: {
    62. text: 'Temperature (°F)'
    63. }
    64. },
    65. crosshairX: {
    66. plotLabel: {
    67. padding: '10px 15px',
    68. borderRadius: '3px'
    69. }
    70. },
    71. series: [{
    72. text: 'Week 1',
    73. // plot values
    74. values: [23, 20, 27, 29, 25, 17, 15],
    75. },
    76. {
    77. text: 'Week 2',
    78. // plot values
    79. values: [35, 42, null, 49, 35, 47, 35],
    80. }
    81. ]
    82. };
    83.  
    84. // render chart with width and height to
    85. // fill the parent container CSS dimensions
    86. zingchart.render({
    87. id: 'myChart',
    88. data: chartConfig,
    89. height: '100%',
    90. width: '100%'
    91. });
    92. });
    93. </script>
    94. </body>
    95.  
    96. </html>
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingSoft Demo</title>
    7. <script src="https://cdn.zingchart.com/zingchart.min.js"></script>
    8. </head>
    9.  
    10. <body>
    11. <!-- CHART CONTAINER -->
    12. <div id="myChart" class="chart--container">
    13. <a class="zc-ref" href="https://www.zingchart.com/">Powered by ZingChart</a>
    14. </div>
    15. </body>
    16.  
    17. </html>
    1. html,
    2. body {
    3. margin: 0;
    4. padding: 0;
    5. width: 100%;
    6. height: 100%;
    7. }
    8.  
    9. .chart--container {
    10. min-height: 150px;
    11. width: 100%;
    12. height: 100%;
    13. }
    14.  
    15. .zc-ref {
    16. display: none;
    17. }
    1. // window:load event for Javascript to run after HTML
    2. // because this Javascript is injected into the document head
    3. window.addEventListener('load', () => {
    4. // Javascript code to execute after DOM content
    5.  
    6. // full ZingChart schema can be found here:
    7. // https://www.zingchart.com/docs/api/json-configuration/
    8. let chartConfig = {
    9. theme: 'spark',
    10. type: 'line',
    11. globals: {
    12. fontSize: '14px'
    13. },
    14. title: {
    15. text: 'Spark Theme'
    16. },
    17. scaleX: {
    18. // set scale label
    19. label: {
    20. text: 'Days'
    21. },
    22. // convert text on scale indices
    23. labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
    24. },
    25. scaleY: {
    26. // scale label with unicode character
    27. label: {
    28. text: 'Temperature (°F)'
    29. }
    30. },
    31. crosshairX: {
    32. plotLabel: {
    33. padding: '10px 15px',
    34. borderRadius: '3px'
    35. }
    36. },
    37. series: [{
    38. text: 'Week 1',
    39. // plot values
    40. values: [23, 20, 27, 29, 25, 17, 15],
    41. },
    42. {
    43. text: 'Week 2',
    44. // plot values
    45. values: [35, 42, null, 49, 35, 47, 35],
    46. }
    47. ]
    48. };
    49.  
    50. // render chart with width and height to
    51. // fill the parent container CSS dimensions
    52. zingchart.render({
    53. id: 'myChart',
    54. data: chartConfig,
    55. height: '100%',
    56. width: '100%'
    57. });
    58. });