• 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. utc: true,
    19. timezone: -5, //EST time
    20. plot: {
    21. barWidth: '50%',
    22. stacked: true,
    23. tooltip: {
    24. text: 'Raise %plot-text by %scale-value-value',
    25. transform: {
    26. type: 'date',
    27. all: '%g:%i %A'
    28. }
    29. }
    30. },
    31. scaleX: {
    32. labels: ["A's Goal", "B's Goal", "C's Goal"],
    33. label: {
    34. text: '12-Hour Fundraiser'
    35. },
    36. item: {
    37. fontSize: 10
    38. },
    39. },
    40. scaleY: {
    41. minValue: 1457091000000, //6 AM
    42. maxValue: 1457132400000, //Midnight
    43. step: 3600000, //1 hour
    44. transform: {
    45. type: 'date',
    46. all: '%g:%i %a'
    47. },
    48. label: {
    49. text: 'Time'
    50. },
    51. item: {
    52. fontSize: 10
    53. },
    54. guide: {
    55. lineStyle: 'dotted'
    56. }
    57. },
    58. plotarea: {
    59. marginLeft: '15%'
    60. },
    61. series: [{
    62. values: [1457110800000, 1457107200000, 1457103600000],
    63. text: '300K',
    64. backgroundColor: '#1565C0'
    65. },
    66. {
    67. values: [7200000, 7200000, 12600000],
    68. text: '350K',
    69. backgroundColor: '#1E88E5'
    70. },
    71. {
    72. values: [7200000, 7200000, 5400000],
    73. text: '400K',
    74. backgroundColor: '#42A5F5'
    75. },
    76. {
    77. values: [3600000, 5400000, 3600000],
    78. text: '450K',
    79. backgroundColor: '#90CAF9'
    80. },
    81. {
    82. values: [3600000, 5400000, 7200000],
    83. text: '500K',
    84. backgroundColor: '#E3F2FD'
    85. }
    86. ]
    87. };
    88.  
    89. zingchart.render({
    90. id: 'myChart',
    91. data: myConfig,
    92. height: 400,
    93. width: '100%'
    94. });
    95. </script>
    96. </body>
    97.  
    98. </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. utc: true,
    4. timezone: -5, //EST time
    5. plot: {
    6. barWidth: '50%',
    7. stacked: true,
    8. tooltip: {
    9. text: 'Raise %plot-text by %scale-value-value',
    10. transform: {
    11. type: 'date',
    12. all: '%g:%i %A'
    13. }
    14. }
    15. },
    16. scaleX: {
    17. labels: ["A's Goal", "B's Goal", "C's Goal"],
    18. label: {
    19. text: '12-Hour Fundraiser'
    20. },
    21. item: {
    22. fontSize: 10
    23. },
    24. },
    25. scaleY: {
    26. minValue: 1457091000000, //6 AM
    27. maxValue: 1457132400000, //Midnight
    28. step: 3600000, //1 hour
    29. transform: {
    30. type: 'date',
    31. all: '%g:%i %a'
    32. },
    33. label: {
    34. text: 'Time'
    35. },
    36. item: {
    37. fontSize: 10
    38. },
    39. guide: {
    40. lineStyle: 'dotted'
    41. }
    42. },
    43. plotarea: {
    44. marginLeft: '15%'
    45. },
    46. series: [{
    47. values: [1457110800000, 1457107200000, 1457103600000],
    48. text: '300K',
    49. backgroundColor: '#1565C0'
    50. },
    51. {
    52. values: [7200000, 7200000, 12600000],
    53. text: '350K',
    54. backgroundColor: '#1E88E5'
    55. },
    56. {
    57. values: [7200000, 7200000, 5400000],
    58. text: '400K',
    59. backgroundColor: '#42A5F5'
    60. },
    61. {
    62. values: [3600000, 5400000, 3600000],
    63. text: '450K',
    64. backgroundColor: '#90CAF9'
    65. },
    66. {
    67. values: [3600000, 5400000, 7200000],
    68. text: '500K',
    69. backgroundColor: '#E3F2FD'
    70. }
    71. ]
    72. };
    73.  
    74. zingchart.render({
    75. id: 'myChart',
    76. data: myConfig,
    77. height: 400,
    78. width: '100%'
    79. });