• 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. var myConfig = {
    17. "type": "bar",
    18. "title": {
    19. "text": "%scale-value-text"
    20. },
    21. "plot": {
    22. "bar-width": "50%",
    23. "stacked": true,
    24. "tooltip": {
    25. "text": "%plot-text by %scale-value-text"
    26. },
    27. },
    28. "scale-x": {
    29. "labels": ["Fundraiser Goals"]
    30. },
    31. "scale-y": {
    32. "min-value": "1457091000000", //6 AM
    33. "max-value": "1457132400000", //Midnight
    34. "step": "3600000", //1 hour. (2 hours makes it go wonky.)
    35. "transform": {
    36. "type": "date",
    37. "all": "%g:%i %a"
    38. },
    39. "item": {
    40. "font-size": 10
    41. },
    42. },
    43. "utc": true,
    44. "timezone": -5, //EST time
    45. "plotarea": {
    46. "margin-left": "15%"
    47. },
    48. "series": [{
    49. "values": [1457110800000],
    50. "text": "300K"
    51. },
    52. {
    53. "values": [7200000],
    54. "text": "350K"
    55. },
    56. {
    57. "values": [7200000],
    58. "text": "400K"
    59. },
    60. {
    61. "values": [3600000],
    62. "text": "450K"
    63. },
    64. {
    65. "values": [3600000],
    66. "text": "500K"
    67. }
    68. ]
    69. };
    70. zingchart.render({
    71. id: 'myChart',
    72. data: myConfig,
    73. height: 300,
    74. width: "100%"
    75. });
    76. </script>
    77. </body>
    78.  
    79. </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. var myConfig = {
    2. "type": "bar",
    3. "title": {
    4. "text": "%scale-value-text"
    5. },
    6. "plot": {
    7. "bar-width": "50%",
    8. "stacked": true,
    9. "tooltip": {
    10. "text": "%plot-text by %scale-value-text"
    11. },
    12. },
    13. "scale-x": {
    14. "labels": ["Fundraiser Goals"]
    15. },
    16. "scale-y": {
    17. "min-value": "1457091000000", //6 AM
    18. "max-value": "1457132400000", //Midnight
    19. "step": "3600000", //1 hour. (2 hours makes it go wonky.)
    20. "transform": {
    21. "type": "date",
    22. "all": "%g:%i %a"
    23. },
    24. "item": {
    25. "font-size": 10
    26. },
    27. },
    28. "utc": true,
    29. "timezone": -5, //EST time
    30. "plotarea": {
    31. "margin-left": "15%"
    32. },
    33. "series": [{
    34. "values": [1457110800000],
    35. "text": "300K"
    36. },
    37. {
    38. "values": [7200000],
    39. "text": "350K"
    40. },
    41. {
    42. "values": [7200000],
    43. "text": "400K"
    44. },
    45. {
    46. "values": [3600000],
    47. "text": "450K"
    48. },
    49. {
    50. "values": [3600000],
    51. "text": "500K"
    52. }
    53. ]
    54. };
    55. zingchart.render({
    56. id: 'myChart',
    57. data: myConfig,
    58. height: 300,
    59. width: "100%"
    60. });