• 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": "area",
    18. "title": {
    19. "text": "Legend Tooltips"
    20. },
    21. "subtitle": {
    22. "text": "Hover over the legend items.",
    23. "font-weight": "normal"
    24. },
    25. "legend": {
    26. "tooltip": {
    27. "text": "%t was performed by %plot-description.",
    28. "background-color": "#ffe6e6",
    29. "font-color": "red",
    30. "font-family": "Georgia",
    31. "border-width": 1,
    32. "border-color": "red",
    33. "border-radius": "5px"
    34. },
    35. "layout": "5x1",
    36. "x": "82%",
    37. "y": "25%",
    38. },
    39. "plot": {
    40. "aspect": "spline",
    41. "stacked": true,
    42. "marker": {
    43. "visible": false
    44. }
    45. },
    46. "plotarea": {
    47. "margin-right": "25%",
    48. },
    49. "scale-y": {
    50. "values": "0:1000:200",
    51. "guide": {
    52. "line-style": "dotted"
    53. }
    54. },
    55. "series": [{
    56. "values": [138.6, 196.3, 153.6, 127.4, 114.1, 181.4, 131.5, 170.9],
    57. "text": "Test 1",
    58. "description": "Dr. Abel"
    59. },
    60. {
    61. "values": [84.8, 65.8, 122.4, 96.6, 279.1, 56.4, 275.9, 237.8],
    62. "text": "Test 2",
    63. "description": "Dr. Bernard"
    64. },
    65. {
    66. "values": [108.7, 132.9, 61.6, 192.1, 134.5, 349.4, 183.9, 224.4],
    67. "text": "Test 3",
    68. "description": "Dr. Chang"
    69. },
    70. {
    71. "values": [213.2, 65.6, 139.5, 194.6, 184.4, 79.2, 73.1, 33.7],
    72. "text": "Test 4",
    73. "description": "Dr. Diaz"
    74. },
    75. {
    76. "values": [236.6, 260.8, 155.2, 58.7, 119.1, 192.4, 164.8, 51.4],
    77. "text": "Test 5",
    78. "description": "Dr. Eugene"
    79. }
    80. ]
    81. };
    82.  
    83. zingchart.render({
    84. id: 'myChart',
    85. data: myConfig,
    86. height: 400,
    87. width: "100%"
    88. });
    89. </script>
    90. </body>
    91.  
    92. </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": "area",
    3. "title": {
    4. "text": "Legend Tooltips"
    5. },
    6. "subtitle": {
    7. "text": "Hover over the legend items.",
    8. "font-weight": "normal"
    9. },
    10. "legend": {
    11. "tooltip": {
    12. "text": "%t was performed by %plot-description.",
    13. "background-color": "#ffe6e6",
    14. "font-color": "red",
    15. "font-family": "Georgia",
    16. "border-width": 1,
    17. "border-color": "red",
    18. "border-radius": "5px"
    19. },
    20. "layout": "5x1",
    21. "x": "82%",
    22. "y": "25%",
    23. },
    24. "plot": {
    25. "aspect": "spline",
    26. "stacked": true,
    27. "marker": {
    28. "visible": false
    29. }
    30. },
    31. "plotarea": {
    32. "margin-right": "25%",
    33. },
    34. "scale-y": {
    35. "values": "0:1000:200",
    36. "guide": {
    37. "line-style": "dotted"
    38. }
    39. },
    40. "series": [{
    41. "values": [138.6, 196.3, 153.6, 127.4, 114.1, 181.4, 131.5, 170.9],
    42. "text": "Test 1",
    43. "description": "Dr. Abel"
    44. },
    45. {
    46. "values": [84.8, 65.8, 122.4, 96.6, 279.1, 56.4, 275.9, 237.8],
    47. "text": "Test 2",
    48. "description": "Dr. Bernard"
    49. },
    50. {
    51. "values": [108.7, 132.9, 61.6, 192.1, 134.5, 349.4, 183.9, 224.4],
    52. "text": "Test 3",
    53. "description": "Dr. Chang"
    54. },
    55. {
    56. "values": [213.2, 65.6, 139.5, 194.6, 184.4, 79.2, 73.1, 33.7],
    57. "text": "Test 4",
    58. "description": "Dr. Diaz"
    59. },
    60. {
    61. "values": [236.6, 260.8, 155.2, 58.7, 119.1, 192.4, 164.8, 51.4],
    62. "text": "Test 5",
    63. "description": "Dr. Eugene"
    64. }
    65. ]
    66. };
    67.  
    68. zingchart.render({
    69. id: 'myChart',
    70. data: myConfig,
    71. height: 400,
    72. width: "100%"
    73. });