• 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>
    10. html,
    11. body,
    12. #myChart {
    13. height: 100%;
    14. width: 100%;
    15. }
    16. </style>
    17. </head>
    18.  
    19. <body>
    20. <div id='myChart'></div>
    21. <script>
    22. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    23. let chartConfig = {
    24. type: 'bar',
    25. plot: {
    26. valueBox: {
    27. rules: [{
    28. rule: '%v > 30',
    29. backgroundColor: 'green'
    30. }, {
    31. rule: '%v < 30',
    32. backgroundColor: 'red'
    33. }],
    34. }
    35. },
    36. scaleX: {
    37. labels: ['Q1', 'Q2', 'Q3', 'Q4']
    38. },
    39. scaleY: {
    40. values: '0:100:25'
    41. },
    42. series: [{
    43. values: [30, 59, 33, 81]
    44. }, {
    45. values: [34, 64, 40, 85]
    46. }]
    47. };
    48.  
    49. zingchart.render({
    50. id: 'myChart',
    51. data: chartConfig,
    52. height: '100%',
    53. width: '100%'
    54. });
    55. </script>
    56. </body>
    57.  
    58. </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. html,
    2. body,
    3. #myChart {
    4. height: 100%;
    5. width: 100%;
    6. }
    1. let chartConfig = {
    2. type: 'bar',
    3. plot: {
    4. valueBox: {
    5. rules: [{
    6. rule: '%v > 30',
    7. backgroundColor: 'green'
    8. }, {
    9. rule: '%v < 30',
    10. backgroundColor: 'red'
    11. }],
    12. }
    13. },
    14. scaleX: {
    15. labels: ['Q1', 'Q2', 'Q3', 'Q4']
    16. },
    17. scaleY: {
    18. values: '0:100:25'
    19. },
    20. series: [{
    21. values: [30, 59, 33, 81]
    22. }, {
    23. values: [34, 64, 40, 85]
    24. }]
    25. };
    26.  
    27. zingchart.render({
    28. id: 'myChart',
    29. data: chartConfig,
    30. height: '100%',
    31. width: '100%'
    32. });