• 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. "legend": {
    22. "x": "80%",
    23. "y": "15%",
    24. "tooltip": { //Legend Tooltips
    25. "text": "%plot-text %plot-description",
    26. "font-color": "gray",
    27. "font-family": "Georgia",
    28. "background-color": "white",
    29. "border-color": "gray",
    30. "border-width": 2,
    31. "line-style": "dashdot",
    32. "padding": "5%",
    33. "wrap-text": true,
    34. "width": "17%",
    35. "height": "43%",
    36. //with sticky tooltip feature
    37. "sticky": true,
    38. "timeout": 30000,
    39. //and fixed tooltip feature
    40. "x": "80%",
    41. "y": "39%"
    42. }
    43. },
    44. "plotarea": {
    45. "margin-right": "25%"
    46. },
    47. "plot": {
    48. "bars-space-left": "25%",
    49. "bars-space-right": "25%",
    50. "tooltip": {
    51. "visible": false
    52. }
    53. },
    54. "scale-x": {
    55. "labels": ["Alice", "Brett", "Chris", "Donna", "Emily", "Frank"]
    56. },
    57. "scale-y": {
    58. "values": "0:150:50"
    59. },
    60. "series": [{
    61. "values": [64, 50, 34, 30, 90, 99],
    62. "background-color": "#666699",
    63. "text": "Blackberries",
    64. "description": "are composed of many tiny berries, which are known as drupes. They grow in the wild and are also cultivated commercially."
    65. },
    66. {
    67. "values": [70, 77, 134, 114, 130, 65],
    68. "background-color": "#66ccff",
    69. "text": "Blueberries",
    70. "description": "are high in antioxidants. They are one of the most popular berry types in the United States and pair well with Greek yogurt."
    71. },
    72. {
    73. "values": [30, 34, 15, 16, 59, 64],
    74. "background-color": "#ff9999",
    75. "text": "Cloudberries",
    76. "description": "are unique in coloring, ranging from amber to red. They grow where it is cold, and are considered delicacies in Norway and Finland."
    77. }
    78. ]
    79. };
    80.  
    81. zingchart.render({
    82. id: 'myChart',
    83. data: myConfig,
    84. height: 400,
    85. width: 600
    86. });
    87. </script>
    88. </body>
    89.  
    90. </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. "legend": {
    7. "x": "80%",
    8. "y": "15%",
    9. "tooltip": { //Legend Tooltips
    10. "text": "%plot-text %plot-description",
    11. "font-color": "gray",
    12. "font-family": "Georgia",
    13. "background-color": "white",
    14. "border-color": "gray",
    15. "border-width": 2,
    16. "line-style": "dashdot",
    17. "padding": "5%",
    18. "wrap-text": true,
    19. "width": "17%",
    20. "height": "43%",
    21. //with sticky tooltip feature
    22. "sticky": true,
    23. "timeout": 30000,
    24. //and fixed tooltip feature
    25. "x": "80%",
    26. "y": "39%"
    27. }
    28. },
    29. "plotarea": {
    30. "margin-right": "25%"
    31. },
    32. "plot": {
    33. "bars-space-left": "25%",
    34. "bars-space-right": "25%",
    35. "tooltip": {
    36. "visible": false
    37. }
    38. },
    39. "scale-x": {
    40. "labels": ["Alice", "Brett", "Chris", "Donna", "Emily", "Frank"]
    41. },
    42. "scale-y": {
    43. "values": "0:150:50"
    44. },
    45. "series": [{
    46. "values": [64, 50, 34, 30, 90, 99],
    47. "background-color": "#666699",
    48. "text": "Blackberries",
    49. "description": "are composed of many tiny berries, which are known as drupes. They grow in the wild and are also cultivated commercially."
    50. },
    51. {
    52. "values": [70, 77, 134, 114, 130, 65],
    53. "background-color": "#66ccff",
    54. "text": "Blueberries",
    55. "description": "are high in antioxidants. They are one of the most popular berry types in the United States and pair well with Greek yogurt."
    56. },
    57. {
    58. "values": [30, 34, 15, 16, 59, 64],
    59. "background-color": "#ff9999",
    60. "text": "Cloudberries",
    61. "description": "are unique in coloring, ranging from amber to red. They grow where it is cold, and are considered delicacies in Norway and Finland."
    62. }
    63. ]
    64. };
    65.  
    66. zingchart.render({
    67. id: 'myChart',
    68. data: myConfig,
    69. height: 400,
    70. width: 600
    71. });