• 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. },
    29. negative: {
    30. backgroundColor: 'red'
    31. },
    32. intermediate: {
    33. backgroundColor: 'blue'
    34. },
    35. final: {
    36. backgroundColor: 'grey',
    37. mediaRules: [{
    38. maxWidth: 400,
    39. backgroundColor: 'orange',
    40. }]
    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. },
    7. negative: {
    8. backgroundColor: 'red'
    9. },
    10. intermediate: {
    11. backgroundColor: 'blue'
    12. },
    13. final: {
    14. backgroundColor: 'grey',
    15. mediaRules: [{
    16. maxWidth: 400,
    17. backgroundColor: 'orange',
    18. }]
    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. });