• 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": "Berry Picking Contest"
    20. },
    21. "plot": {
    22. "bars-space-left": "25%",
    23. "bars-space-right": "25%",
    24. "tooltip": {
    25. "visible": false
    26. }
    27. },
    28. "scale-x": {
    29. "labels": ["Alice", "Brett", "Chris", "Donna", "Emily", "Frank"],
    30. "tooltip": { //X-Axis Tooltips
    31. "text": "%v picked<br>blackberries,<br>blueberries, and<br>cloudberries.",
    32. "font-color": "gray",
    33. "font-family": "Georgia",
    34. "background-color": "white",
    35. "border-color": "gray",
    36. "border-width": 1,
    37. "line-style": "dotted",
    38. "padding": "15%",
    39. //with sticky tooltip feature
    40. "sticky": true,
    41. "timeout": 30000,
    42. //and fixed tooltip feature
    43. "x": "75%",
    44. "y": "5%"
    45. }
    46. },
    47. "scale-y": {
    48. "values": "0:150:50",
    49. "tooltip": { //Y-Axis Tooltips
    50. "text": "%v<br>berries",
    51. "font-color": "gray",
    52. "font-family": "Georgia",
    53. "background-color": "white",
    54. "border-color": "gray",
    55. "border-width": 1,
    56. "line-style": "dashed",
    57. "padding": "5%"
    58. }
    59. },
    60. "series": [{
    61. "values": [64, 50, 34, 30, 90, 99],
    62. "background-color": "#666699",
    63. "text": "Blackberries"
    64. },
    65. {
    66. "values": [70, 77, 134, 114, 130, 65],
    67. "background-color": "#66ccff",
    68. "text": "Blueberries"
    69. },
    70. {
    71. "values": [30, 34, 15, 16, 59, 64],
    72. "background-color": "#ff9999",
    73. "text": "Cloudberries"
    74. }
    75. ]
    76. };
    77.  
    78. zingchart.render({
    79. id: 'myChart',
    80. data: myConfig,
    81. height: 400,
    82. width: 600
    83. });
    84. </script>
    85. </body>
    86.  
    87. </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": "Berry Picking Contest"
    5. },
    6. "plot": {
    7. "bars-space-left": "25%",
    8. "bars-space-right": "25%",
    9. "tooltip": {
    10. "visible": false
    11. }
    12. },
    13. "scale-x": {
    14. "labels": ["Alice", "Brett", "Chris", "Donna", "Emily", "Frank"],
    15. "tooltip": { //X-Axis Tooltips
    16. "text": "%v picked<br>blackberries,<br>blueberries, and<br>cloudberries.",
    17. "font-color": "gray",
    18. "font-family": "Georgia",
    19. "background-color": "white",
    20. "border-color": "gray",
    21. "border-width": 1,
    22. "line-style": "dotted",
    23. "padding": "15%",
    24. //with sticky tooltip feature
    25. "sticky": true,
    26. "timeout": 30000,
    27. //and fixed tooltip feature
    28. "x": "75%",
    29. "y": "5%"
    30. }
    31. },
    32. "scale-y": {
    33. "values": "0:150:50",
    34. "tooltip": { //Y-Axis Tooltips
    35. "text": "%v<br>berries",
    36. "font-color": "gray",
    37. "font-family": "Georgia",
    38. "background-color": "white",
    39. "border-color": "gray",
    40. "border-width": 1,
    41. "line-style": "dashed",
    42. "padding": "5%"
    43. }
    44. },
    45. "series": [{
    46. "values": [64, 50, 34, 30, 90, 99],
    47. "background-color": "#666699",
    48. "text": "Blackberries"
    49. },
    50. {
    51. "values": [70, 77, 134, 114, 130, 65],
    52. "background-color": "#66ccff",
    53. "text": "Blueberries"
    54. },
    55. {
    56. "values": [30, 34, 15, 16, 59, 64],
    57. "background-color": "#ff9999",
    58. "text": "Cloudberries"
    59. }
    60. ]
    61. };
    62.  
    63. zingchart.render({
    64. id: 'myChart',
    65. data: myConfig,
    66. height: 400,
    67. width: 600
    68. });