• 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. let chartConfig = {
    17. type: 'bar',
    18. subtitle: {
    19. text: 'Click a legend item to turn it off'
    20. },
    21. legend: {
    22. itemOff: {
    23. borderColor: 'red',
    24. borderStyle: 'solid',
    25. borderWidth: '1px',
    26. fontColor: 'red'
    27. },
    28.  
    29. topState: {
    30. backgroundColor: 'red',
    31. offsetX: 10,
    32. offsetY: 10,
    33. }
    34. },
    35. series: [{
    36. values: [11, 26, 7, 44, 11]
    37. },
    38. {
    39. values: [42, 13, 21, 15, 33]
    40. },
    41. {
    42. values: [23, 24, 13, 4, 18]
    43. }
    44. ]
    45. };
    46.  
    47. zingchart.render({
    48. id: 'myChart',
    49. data: chartConfig,
    50. height: 400,
    51. width: '100%'
    52. });
    53. </script>
    54. </body>
    55.  
    56. </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. let chartConfig = {
    2. type: 'bar',
    3. subtitle: {
    4. text: 'Click a legend item to turn it off'
    5. },
    6. legend: {
    7. itemOff: {
    8. borderColor: 'red',
    9. borderStyle: 'solid',
    10. borderWidth: '1px',
    11. fontColor: 'red'
    12. },
    13.  
    14. topState: {
    15. backgroundColor: 'red',
    16. offsetX: 10,
    17. offsetY: 10,
    18. }
    19. },
    20. series: [{
    21. values: [11, 26, 7, 44, 11]
    22. },
    23. {
    24. values: [42, 13, 21, 15, 33]
    25. },
    26. {
    27. values: [23, 24, 13, 4, 18]
    28. }
    29. ]
    30. };
    31.  
    32. zingchart.render({
    33. id: 'myChart',
    34. data: chartConfig,
    35. height: 400,
    36. width: '100%'
    37. });