• 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/2.6.1/zingchart.min.js"></script>
    9. <style>
    10. html,
    11. body {
    12. height: 100%;
    13. width: 100%;
    14. margin: 0;
    15. padding: 0;
    16. }
    17.  
    18. #myChart {
    19. height: 100%;
    20. width: 100%;
    21. min-height: 150px;
    22. }
    23.  
    24. zing-grid[loading] {
    25. height: 450px;
    26. }
    27. </style>
    28. </head>
    29.  
    30. <body>
    31. <div id='myChart'></div>
    32. <script>
    33. window.addEventListener('load', () => {
    34. zingchart
    35. var myConfig = {
    36. type: "radar",
    37. title: {
    38. text: "click and drag to select points"
    39. },
    40. subtitle: {
    41. text: "hold control (win) or command (osx) to freehand draw selection"
    42. },
    43. plot: {
    44. lineWidth: 3,
    45. selectedState: {
    46. lineColor: 'green'
    47. },
    48. marker: {
    49. visible: true,
    50. size: 4
    51. },
    52. selectedMarker: {
    53. size: 5,
    54. borderColor: "black",
    55. borderWidth: 2,
    56. backgroundColor: "green",
    57. alpha: 0.7
    58. }
    59. },
    60. selectionTool: {
    61. mask: {
    62. borderColor: "red", // will set line color when drawing
    63. borderWidth: 2, // will set line width when drawing
    64. backgroundColor: "#969696"
    65. }
    66. },
    67. series: [{
    68. values: [35, 25, 15, 41, 2, 45, 14, 65, 40]
    69. },
    70. {
    71. values: [89, 40, 56, 78, 15, 10, 40, 45, 5]
    72. }
    73. ]
    74. };
    75.  
    76. zingchart.loadModules('selection-tool', function() {
    77. zingchart.render({
    78. id: 'myChart',
    79. data: myConfig,
    80. height: '100%',
    81. width: '100%',
    82. modules: 'selection-tool'
    83. });
    84. });
    85. });
    86. </script>
    87. </body>
    88.  
    89. </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/2.6.1/zingchart.min.js"></script>
    9. </head>
    10.  
    11. <body>
    12. <div id='myChart'></div>
    13. </body>
    14.  
    15. </html>
    1. html,
    2. body {
    3. height: 100%;
    4. width: 100%;
    5. margin: 0;
    6. padding: 0;
    7. }
    8.  
    9. #myChart {
    10. height: 100%;
    11. width: 100%;
    12. min-height: 150px;
    13. }
    1. window.addEventListener('load', () => {
    2. zingchart
    3. var myConfig = {
    4. type: "radar",
    5. title: {
    6. text: "click and drag to select points"
    7. },
    8. subtitle: {
    9. text: "hold control (win) or command (osx) to freehand draw selection"
    10. },
    11. plot: {
    12. lineWidth: 3,
    13. selectedState: {
    14. lineColor: 'green'
    15. },
    16. marker: {
    17. visible: true,
    18. size: 4
    19. },
    20. selectedMarker: {
    21. size: 5,
    22. borderColor: "black",
    23. borderWidth: 2,
    24. backgroundColor: "green",
    25. alpha: 0.7
    26. }
    27. },
    28. selectionTool: {
    29. mask: {
    30. borderColor: "red", // will set line color when drawing
    31. borderWidth: 2, // will set line width when drawing
    32. backgroundColor: "#969696"
    33. }
    34. },
    35. series: [{
    36. values: [35, 25, 15, 41, 2, 45, 14, 65, 40]
    37. },
    38. {
    39. values: [89, 40, 56, 78, 15, 10, 40, 45, 5]
    40. }
    41. ]
    42. };
    43.  
    44. zingchart.loadModules('selection-tool', function() {
    45. zingchart.render({
    46. id: 'myChart',
    47. data: myConfig,
    48. height: '100%',
    49. width: '100%',
    50. modules: 'selection-tool'
    51. });
    52. });
    53. });