• Edit
  • Download
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingSoft Demo</title>
    7. <link href="https://fonts.googleapis.com/css?family=Inconsolata" rel="stylesheet">
    8.  
    9. <script nonce="undefined" src="https://cdn.zingchart.com/zingchart.min.js"></script>
    10. <style>
    11. html,
    12. body {
    13. height: 100%;
    14. width: 100%;
    15. margin: 0;
    16. padding: 0;
    17. }
    18.  
    19. #myChart {
    20. height: 100%;
    21. width: 100%;
    22. min-height: 150px;
    23. }
    24.  
    25. .zc-ref {
    26. display: none;
    27. }
    28. </style>
    29. </head>
    30.  
    31. <body>
    32. <div id="myChart"><a class="zc-ref" href="https://www.zingchart.com">Powered by ZingChart</a></div>
    33. <script>
    34. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    35. let chartConfig = {
    36. type: 'area',
    37. globals: {
    38. tooltip: {
    39. border: '3px solid red',
    40. padding: 15,
    41.  
    42. rules: [{
    43. rule: '%v > 40',
    44. backgroundColor: 'red'
    45. },
    46. {
    47. rule: '%v < 20',
    48. backgroundColor: 'green'
    49. }
    50. ],
    51. },
    52. },
    53. title: {
    54. text: 'Area Chart',
    55. fontSize: 20,
    56. },
    57. legend: {},
    58. crosshairX: {},
    59. scaleX: {},
    60. scaleY: {
    61. guide: {
    62. visible: false
    63. }
    64. },
    65. plot: {
    66. valueBox: {}
    67. },
    68. series: [{
    69. values: [35, 42, 67, 89, 25, 34, 67, 85],
    70. backgroundColor: '#212121'
    71. },
    72. {
    73. values: [25, 59, 30, 16, 51, 99, 31, 39],
    74. backgroundColor: '#616161'
    75. }
    76. ]
    77. };
    78.  
    79. zingchart.render({
    80. id: 'myChart',
    81. data: chartConfig,
    82. height: 400,
    83. width: '100%'
    84. });
    85. </script>
    86. </body>
    87.  
    88. </html>
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingSoft Demo</title>
    7. <link href="https://fonts.googleapis.com/css?family=Inconsolata" rel="stylesheet">
    8.  
    9. <script src="https://cdn.zingchart.com/zingchart.min.js"></script>
    10. </head>
    11.  
    12. <body>
    13. <div id="myChart"><a class="zc-ref" href="https://www.zingchart.com">Powered by ZingChart</a></div>
    14. </body>
    15.  
    16. </html>
    1. html,
    2. body {
    3. height: 100%;
    4. width: 100%;
    5. margin: 0;
    6. padding: 0;
    7. }
    8.  
    9. #myChart {
    10. height: 100%;
    11. width: 100%;
    12. min-height: 150px;
    13. }
    14.  
    15. .zc-ref {
    16. display: none;
    17. }
    1. let chartConfig = {
    2. type: 'area',
    3. globals: {
    4. tooltip: {
    5. border: '3px solid red',
    6. padding: 15,
    7.  
    8. rules: [{
    9. rule: '%v > 40',
    10. backgroundColor: 'red'
    11. },
    12. {
    13. rule: '%v < 20',
    14. backgroundColor: 'green'
    15. }
    16. ],
    17. },
    18. },
    19. title: {
    20. text: 'Area Chart',
    21. fontSize: 20,
    22. },
    23. legend: {},
    24. crosshairX: {},
    25. scaleX: {},
    26. scaleY: {
    27. guide: {
    28. visible: false
    29. }
    30. },
    31. plot: {
    32. valueBox: {}
    33. },
    34. series: [{
    35. values: [35, 42, 67, 89, 25, 34, 67, 85],
    36. backgroundColor: '#212121'
    37. },
    38. {
    39. values: [25, 59, 30, 16, 51, 99, 31, 39],
    40. backgroundColor: '#616161'
    41. }
    42. ]
    43. };
    44.  
    45. zingchart.render({
    46. id: 'myChart',
    47. data: chartConfig,
    48. height: 400,
    49. width: '100%'
    50. });