• 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. globals: {
    37. tooltip: {
    38. border: '3px solid red',
    39. padding: 15,
    40.  
    41. rules: [{
    42. rule: '%v > 40',
    43. backgroundColor: 'red'
    44. },
    45. {
    46. rule: '%v < 20',
    47. backgroundColor: 'green'
    48. }
    49. ],
    50. },
    51. },
    52. graphset: [{
    53. type: 'area',
    54. title: {
    55. text: 'Area Chart',
    56. fontSize: 20,
    57. },
    58. legend: {},
    59. crosshairX: {},
    60. scaleX: {},
    61. scaleY: {
    62. guide: {
    63. visible: false
    64. }
    65. },
    66. plot: {
    67. valueBox: {}
    68. },
    69. series: [{
    70. values: [35, 42, 67, 89, 25, 34, 67, 85],
    71. backgroundColor: '#212121'
    72. },
    73. {
    74. values: [25, 59, 30, 16, 51, 99, 31, 39],
    75. backgroundColor: '#616161'
    76. }
    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. <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. globals: {
    3. tooltip: {
    4. border: '3px solid red',
    5. padding: 15,
    6.  
    7. rules: [{
    8. rule: '%v > 40',
    9. backgroundColor: 'red'
    10. },
    11. {
    12. rule: '%v < 20',
    13. backgroundColor: 'green'
    14. }
    15. ],
    16. },
    17. },
    18. graphset: [{
    19. type: 'area',
    20. title: {
    21. text: 'Area Chart',
    22. fontSize: 20,
    23. },
    24. legend: {},
    25. crosshairX: {},
    26. scaleX: {},
    27. scaleY: {
    28. guide: {
    29. visible: false
    30. }
    31. },
    32. plot: {
    33. valueBox: {}
    34. },
    35. series: [{
    36. values: [35, 42, 67, 89, 25, 34, 67, 85],
    37. backgroundColor: '#212121'
    38. },
    39. {
    40. values: [25, 59, 30, 16, 51, 99, 31, 39],
    41. backgroundColor: '#616161'
    42. }
    43. ]
    44. }]
    45. };
    46.  
    47. zingchart.render({
    48. id: 'myChart',
    49. data: chartConfig,
    50. height: 400,
    51. width: '100%'
    52. });