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