• 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 Tooltips"
    20. },
    21. "subtitle": {
    22. "text": "Hover over the scale items",
    23. "font-weight": "normal"
    24. },
    25. "scale-x": {
    26. "labels": ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
    27. "item": {
    28. "max-chars": 3
    29. },
    30. "tooltip": {
    31. "text": "%v 2016",
    32. "font-size": 12,
    33. "font-family": "Georgia",
    34. "font-color": "red",
    35. "border-width": 1,
    36. "border-color": "red",
    37. "border-radius": "5px",
    38. "background-color": "#ffe6e6",
    39. "padding": "10%"
    40. }
    41. },
    42. "scale-y": {
    43. "values": "0:100:20",
    44. "format": "%v%",
    45. "tooltip": {
    46. "text": "%v% of the goal was reached.",
    47. "font-size": 12,
    48. "font-family": "Georgia",
    49. "font-color": "red",
    50. "border-width": 1,
    51. "border-color": "red",
    52. "border-radius": "5px",
    53. "background-color": "#ffe6e6",
    54. "padding": "10%",
    55. "width": "15%",
    56. "wrap-text": true
    57. }
    58. },
    59. "plot": {
    60. "stacked": true,
    61. "bar-width": "50%"
    62. },
    63. "plotarea": {
    64. "margin-left": "dynamic"
    65. },
    66. "series": [{
    67. "values": [43, 34, 51, 59, 65, 35, 31, 30, 35, 37, 45, 49]
    68. },
    69. {
    70. "values": [16, 15, 12, 14, 25, 29, 21, 19, 17, 16, 14, 20]
    71. },
    72. {
    73. "values": [3, 14, 3, 11, 5, 9, 12, 11, 15, 16, 19, 7]
    74. }
    75. ]
    76. };
    77.  
    78. zingchart.render({
    79. id: 'myChart',
    80. data: myConfig,
    81. height: 400,
    82. width: "100%"
    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": "Scale Tooltips"
    5. },
    6. "subtitle": {
    7. "text": "Hover over the scale items",
    8. "font-weight": "normal"
    9. },
    10. "scale-x": {
    11. "labels": ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
    12. "item": {
    13. "max-chars": 3
    14. },
    15. "tooltip": {
    16. "text": "%v 2016",
    17. "font-size": 12,
    18. "font-family": "Georgia",
    19. "font-color": "red",
    20. "border-width": 1,
    21. "border-color": "red",
    22. "border-radius": "5px",
    23. "background-color": "#ffe6e6",
    24. "padding": "10%"
    25. }
    26. },
    27. "scale-y": {
    28. "values": "0:100:20",
    29. "format": "%v%",
    30. "tooltip": {
    31. "text": "%v% of the goal was reached.",
    32. "font-size": 12,
    33. "font-family": "Georgia",
    34. "font-color": "red",
    35. "border-width": 1,
    36. "border-color": "red",
    37. "border-radius": "5px",
    38. "background-color": "#ffe6e6",
    39. "padding": "10%",
    40. "width": "15%",
    41. "wrap-text": true
    42. }
    43. },
    44. "plot": {
    45. "stacked": true,
    46. "bar-width": "50%"
    47. },
    48. "plotarea": {
    49. "margin-left": "dynamic"
    50. },
    51. "series": [{
    52. "values": [43, 34, 51, 59, 65, 35, 31, 30, 35, 37, 45, 49]
    53. },
    54. {
    55. "values": [16, 15, 12, 14, 25, 29, 21, 19, 17, 16, 14, 20]
    56. },
    57. {
    58. "values": [3, 14, 3, 11, 5, 9, 12, 11, 15, 16, 19, 7]
    59. }
    60. ]
    61. };
    62.  
    63. zingchart.render({
    64. id: 'myChart',
    65. data: myConfig,
    66. height: 400,
    67. width: "100%"
    68. });