• Edit
  • Download
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingSoft Demo</title>
    7. <link href='http://fonts.googleapis.com/css?family=Roboto:400' rel='stylesheet' type='text/css'>
    8.  
    9. <script nonce="undefined" src="https://cdn.zingchart.com/zingchart.min.js"></script>
    10. <style></style>
    11. </head>
    12.  
    13. <body>
    14. <div id='myChart'></div>
    15. <script>
    16. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    17. var myConfig = {
    18. globals: {
    19. fontFamily: "Roboto"
    20. },
    21. type: "bar",
    22. backgroundColor: "#f4f2f2",
    23. title: {
    24. text: "Revenue Comparison",
    25. backgroundColor: "none",
    26. color: "#333"
    27. },
    28. subtitle: {
    29. text: "Q1-Q4 2014",
    30. color: "#333"
    31. },
    32. plotarea: {
    33. backgroundColor: "#fff"
    34. },
    35. scaleX: {
    36. lineColor: "#7d7d7d",
    37. tick: {
    38. lineColor: "#7d7d7d"
    39. },
    40. guide: {
    41. visible: false
    42. },
    43. values: ["Q1", "Q2", "Q3", "Q4"],
    44. markers: [{
    45. type: "area",
    46. range: [1.5, 2.5],
    47. backgroundColor: "red",
    48. alpha: 0.2
    49. }]
    50. },
    51. scaleY: {
    52. lineColor: "#7d7d7d",
    53. tick: {
    54. lineColor: "#7d7d7d"
    55. },
    56. format: "$%v",
    57. short: true
    58. },
    59. legend: {
    60. backgroundColor: "none",
    61. layout: "h",
    62. verticalAlign: "bottom",
    63. align: "center",
    64. borderRadius: "3px",
    65. shadow: false,
    66. borderWidth: 0,
    67. marker: {
    68. borderWidth: 0,
    69. borderRadius: "3px"
    70. }
    71. },
    72. tooltip: {
    73. borderRadius: "3px",
    74. borderColor: "#F4F2F2",
    75. borderWidth: 2,
    76. width: 90,
    77. callout: true,
    78. height: 50,
    79. fontSize: 12,
    80. shadow: false,
    81. text: "%kt: $%v in %t Sales",
    82. short: true,
    83. decimals: 1
    84. },
    85. plot: {
    86. alpha: 0.8,
    87. borderRadius: "3px"
    88. },
    89. series: [{
    90. "values": [3500000, 4200000, 6700000, 8900000],
    91. text: "Internet",
    92. backgroundColor: "#447884 #69a3af",
    93. },
    94. {
    95. "values": [2800000, 4000000, 3900000, 3600000],
    96. text: "Cable",
    97. backgroundColor: "#ff9800 #f2b157",
    98. }
    99. ]
    100. };
    101.  
    102. zingchart.render({
    103. id: 'myChart',
    104. data: myConfig,
    105. height: 400,
    106. width: 600
    107. });
    108. </script>
    109. </body>
    110.  
    111. </html>
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingSoft Demo</title>
    7. <link href='http://fonts.googleapis.com/css?family=Roboto:400' rel='stylesheet' type='text/css'>
    8.  
    9. <script src="https://cdn.zingchart.com/zingchart.min.js"></script>
    10. </head>
    11.  
    12. <body>
    13. <div id='myChart'></div>
    14. </body>
    15.  
    16. </html>
    1.  
    1. var myConfig = {
    2. globals: {
    3. fontFamily: "Roboto"
    4. },
    5. type: "bar",
    6. backgroundColor: "#f4f2f2",
    7. title: {
    8. text: "Revenue Comparison",
    9. backgroundColor: "none",
    10. color: "#333"
    11. },
    12. subtitle: {
    13. text: "Q1-Q4 2014",
    14. color: "#333"
    15. },
    16. plotarea: {
    17. backgroundColor: "#fff"
    18. },
    19. scaleX: {
    20. lineColor: "#7d7d7d",
    21. tick: {
    22. lineColor: "#7d7d7d"
    23. },
    24. guide: {
    25. visible: false
    26. },
    27. values: ["Q1", "Q2", "Q3", "Q4"],
    28. markers: [{
    29. type: "area",
    30. range: [1.5, 2.5],
    31. backgroundColor: "red",
    32. alpha: 0.2
    33. }]
    34. },
    35. scaleY: {
    36. lineColor: "#7d7d7d",
    37. tick: {
    38. lineColor: "#7d7d7d"
    39. },
    40. format: "$%v",
    41. short: true
    42. },
    43. legend: {
    44. backgroundColor: "none",
    45. layout: "h",
    46. verticalAlign: "bottom",
    47. align: "center",
    48. borderRadius: "3px",
    49. shadow: false,
    50. borderWidth: 0,
    51. marker: {
    52. borderWidth: 0,
    53. borderRadius: "3px"
    54. }
    55. },
    56. tooltip: {
    57. borderRadius: "3px",
    58. borderColor: "#F4F2F2",
    59. borderWidth: 2,
    60. width: 90,
    61. callout: true,
    62. height: 50,
    63. fontSize: 12,
    64. shadow: false,
    65. text: "%kt: $%v in %t Sales",
    66. short: true,
    67. decimals: 1
    68. },
    69. plot: {
    70. alpha: 0.8,
    71. borderRadius: "3px"
    72. },
    73. series: [{
    74. "values": [3500000, 4200000, 6700000, 8900000],
    75. text: "Internet",
    76. backgroundColor: "#447884 #69a3af",
    77. },
    78. {
    79. "values": [2800000, 4000000, 3900000, 3600000],
    80. text: "Cable",
    81. backgroundColor: "#ff9800 #f2b157",
    82. }
    83. ]
    84. };
    85.  
    86. zingchart.render({
    87. id: 'myChart',
    88. data: myConfig,
    89. height: 400,
    90. width: 600
    91. });