• 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: 'waterfall',
    25. options: {
    26. positive: {
    27. backgroundColor: 'green',
    28. mediaRules: [{
    29. maxWidth: 400,
    30. backgroundColor: 'orange',
    31. }]
    32. },
    33. negative: {
    34. backgroundColor: 'red'
    35. },
    36. intermediate: {
    37. backgroundColor: 'blue'
    38. },
    39. final: {
    40. backgroundColor: 'grey',
    41. },
    42. line: {
    43. lineStyle: 'dashed',
    44. lineSegmentSize: 4,
    45. lineGapSize: 4,
    46. lineWidth: 1
    47. }
    48. },
    49. series: [{
    50. values: [
    51. 420,
    52. 210,
    53. -170,
    54. 'SUM',
    55. -140,
    56. 'SUM'
    57. ]
    58. }]
    59. };
    60.  
    61. zingchart.render({
    62. id: 'myChart',
    63. data: chartConfig,
    64. height: '100%',
    65. width: '100%'
    66. });
    67. </script>
    68. </body>
    69.  
    70. </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: 'waterfall',
    3. options: {
    4. positive: {
    5. backgroundColor: 'green',
    6. mediaRules: [{
    7. maxWidth: 400,
    8. backgroundColor: 'orange',
    9. }]
    10. },
    11. negative: {
    12. backgroundColor: 'red'
    13. },
    14. intermediate: {
    15. backgroundColor: 'blue'
    16. },
    17. final: {
    18. backgroundColor: 'grey',
    19. },
    20. line: {
    21. lineStyle: 'dashed',
    22. lineSegmentSize: 4,
    23. lineGapSize: 4,
    24. lineWidth: 1
    25. }
    26. },
    27. series: [{
    28. values: [
    29. 420,
    30. 210,
    31. -170,
    32. 'SUM',
    33. -140,
    34. 'SUM'
    35. ]
    36. }]
    37. };
    38.  
    39. zingchart.render({
    40. id: 'myChart',
    41. data: chartConfig,
    42. height: '100%',
    43. width: '100%'
    44. });