• 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": "pie",
    18. "title": {
    19. "text": "Legend Dragging"
    20. },
    21. "subtitle": {
    22. "text": "Drag the legend around the chart area.",
    23. "font-weight": "normal"
    24. },
    25. "legend": {
    26. "draggable": true, //automatically adds header
    27. "drag-handler": "icon", //"header" (default) or "icon"
    28. "icon": {
    29. "line-color": "red"
    30. },
    31. "header": {
    32. "height": "20px",
    33. "background-color": "#ffe6e6",
    34. "border-left": "1px solid red",
    35. "border-right": "1px solid red",
    36. "border-top": "1px solid red",
    37. "border-bottom": "1px solid red"
    38. },
    39. "x": "75%",
    40. "y": "25%"
    41. },
    42. "plotarea": {
    43. "margin-right": "30%",
    44. "margin-top": "15%"
    45. },
    46. "plot": {
    47. "value-box": {
    48. "font-size": 11,
    49. "font-weight": "normal",
    50. "offset-r": "20%"
    51. }
    52. },
    53. "series": [{
    54. "values": [234]
    55. },
    56. {
    57. "values": [121]
    58. },
    59. {
    60. "values": [77]
    61. },
    62. {
    63. "values": [65]
    64. },
    65. {
    66. "values": [59]
    67. },
    68. {
    69. "values": [35]
    70. },
    71. {
    72. "values": [34]
    73. },
    74. {
    75. "values": [31]
    76. },
    77. {
    78. "values": [16]
    79. },
    80. {
    81. "values": [14]
    82. }
    83. ]
    84. };
    85.  
    86. zingchart.render({
    87. id: 'myChart',
    88. data: myConfig,
    89. height: 400,
    90. width: "100%"
    91. });
    92. </script>
    93. </body>
    94.  
    95. </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": "pie",
    3. "title": {
    4. "text": "Legend Dragging"
    5. },
    6. "subtitle": {
    7. "text": "Drag the legend around the chart area.",
    8. "font-weight": "normal"
    9. },
    10. "legend": {
    11. "draggable": true, //automatically adds header
    12. "drag-handler": "icon", //"header" (default) or "icon"
    13. "icon": {
    14. "line-color": "red"
    15. },
    16. "header": {
    17. "height": "20px",
    18. "background-color": "#ffe6e6",
    19. "border-left": "1px solid red",
    20. "border-right": "1px solid red",
    21. "border-top": "1px solid red",
    22. "border-bottom": "1px solid red"
    23. },
    24. "x": "75%",
    25. "y": "25%"
    26. },
    27. "plotarea": {
    28. "margin-right": "30%",
    29. "margin-top": "15%"
    30. },
    31. "plot": {
    32. "value-box": {
    33. "font-size": 11,
    34. "font-weight": "normal",
    35. "offset-r": "20%"
    36. }
    37. },
    38. "series": [{
    39. "values": [234]
    40. },
    41. {
    42. "values": [121]
    43. },
    44. {
    45. "values": [77]
    46. },
    47. {
    48. "values": [65]
    49. },
    50. {
    51. "values": [59]
    52. },
    53. {
    54. "values": [35]
    55. },
    56. {
    57. "values": [34]
    58. },
    59. {
    60. "values": [31]
    61. },
    62. {
    63. "values": [16]
    64. },
    65. {
    66. "values": [14]
    67. }
    68. ]
    69. };
    70.  
    71. zingchart.render({
    72. id: 'myChart',
    73. data: myConfig,
    74. height: 400,
    75. width: "100%"
    76. });