• 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. mediaRules: [{
    30. maxWidth: 400,
    31. backgroundColor: 'red'
    32. }]
    33. },
    34. series: [{
    35. values: [11, 26, 7, 44, 11]
    36. },
    37. {
    38. values: [42, 13, 21, 15, 33]
    39. },
    40. {
    41. values: [23, 24, 13, 4, 18]
    42. }
    43. ]
    44. };
    45.  
    46. zingchart.render({
    47. id: 'myChart',
    48. data: chartConfig,
    49. height: 400,
    50. width: '100%'
    51. });
    52. </script>
    53. </body>
    54.  
    55. </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. mediaRules: [{
    15. maxWidth: 400,
    16. backgroundColor: 'red'
    17. }]
    18. },
    19. series: [{
    20. values: [11, 26, 7, 44, 11]
    21. },
    22. {
    23. values: [42, 13, 21, 15, 33]
    24. },
    25. {
    26. values: [23, 24, 13, 4, 18]
    27. }
    28. ]
    29. };
    30.  
    31. zingchart.render({
    32. id: 'myChart',
    33. data: chartConfig,
    34. height: 400,
    35. width: '100%'
    36. });