• Edit
  • Download
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingSoft Demo</title>
    7. <script nonce="undefined" src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
    8.  
    9. <script nonce="undefined" src="https://cdn.zingchart.com/zingchart.min.js"></script>
    10. <style>
    11. html,
    12. body {
    13. height: 100%;
    14. width: 100%;
    15. margin: 0;
    16. padding: 0;
    17. }
    18.  
    19. #myChart {
    20. height: 100%;
    21. width: 100%;
    22. min-height: 150px;
    23. }
    24. </style>
    25. </head>
    26.  
    27. <body>
    28. <div id="myChart"></div>
    29. <script>
    30. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    31. var myConfig = {
    32. "type": "vbar3d",
    33. "plotarea": {
    34.  
    35. },
    36. "scaleX": {
    37.  
    38. },
    39. "scaleY": {
    40.  
    41. },
    42. "plot": {
    43. "hoverState": {
    44. "backgroundColor": "#000",
    45. "borderWidth": 5,
    46. "borderColor": "#999"
    47. }
    48. },
    49. "-series": [{
    50. "values": [69],
    51. "text": "Apple"
    52. },
    53. {
    54. "values": [51],
    55. "text": "Microsoft"
    56. },
    57. {
    58. "values": [42],
    59. "text": "Oracle"
    60. },
    61. {
    62. "values": [25],
    63. "text": "Dell"
    64. }
    65. ],
    66. "series": [{
    67. "values": [69, 68, 54, 48, 70, 74, 98, 70, 72, 68, 49, 69],
    68. "text": "Apple"
    69. },
    70. {
    71. "values": [51, 53, 47, 60, 48, 52, 75, 52, 55, 47, 60, 48],
    72. "text": "Microsoft"
    73. }
    74. ]
    75. };
    76.  
    77. zingchart.render({
    78. id: 'myChart',
    79. data: myConfig,
    80. height: '100%',
    81. width: '100%'
    82. });
    83.  
    84. var NODE_STATE = {};
    85. zingchart.bind('myChart', 'node_mouseover', function(p) {
    86. var sClass = p.graphid + '-plotset-plot-' + p.plotindex + '-node-' + p.nodeindex + '-3dfacet';
    87. var oNode = $('.' + sClass);
    88. NODE_STATE = {
    89. 'fill': oNode.attr('fill'),
    90. 'stroke-width': oNode.attr('stroke-width'),
    91. 'stroke': oNode.attr('stroke')
    92. };
    93. $('.' + sClass)
    94. .attr('fill', '#000')
    95. .attr('stroke', '#f90')
    96. .attr('stroke-width', 3);
    97. });
    98.  
    99. zingchart.bind('myChart', 'node_mouseout', function(p) {
    100. var sClass = p.graphid + '-plotset-plot-' + p.plotindex + '-node-' + p.nodeindex + '-3dfacet';
    101. var oNode = $('.' + sClass);
    102. $('.' + sClass)
    103. .attr('fill', NODE_STATE['fill'])
    104. .attr('stroke', NODE_STATE['stroke'])
    105. .attr('stroke-width', NODE_STATE['stroke-width']);
    106. });
    107. </script>
    108. </body>
    109.  
    110. </html>
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingSoft Demo</title>
    7. <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
    8.  
    9. <script src="https://cdn.zingchart.com/zingchart.min.js"></script>
    10. </head>
    11.  
    12. <body>
    13. <div id="myChart"></div>
    14. </body>
    15.  
    16. </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. var myConfig = {
    2. "type": "vbar3d",
    3. "plotarea": {
    4.  
    5. },
    6. "scaleX": {
    7.  
    8. },
    9. "scaleY": {
    10.  
    11. },
    12. "plot": {
    13. "hoverState": {
    14. "backgroundColor": "#000",
    15. "borderWidth": 5,
    16. "borderColor": "#999"
    17. }
    18. },
    19. "-series": [{
    20. "values": [69],
    21. "text": "Apple"
    22. },
    23. {
    24. "values": [51],
    25. "text": "Microsoft"
    26. },
    27. {
    28. "values": [42],
    29. "text": "Oracle"
    30. },
    31. {
    32. "values": [25],
    33. "text": "Dell"
    34. }
    35. ],
    36. "series": [{
    37. "values": [69, 68, 54, 48, 70, 74, 98, 70, 72, 68, 49, 69],
    38. "text": "Apple"
    39. },
    40. {
    41. "values": [51, 53, 47, 60, 48, 52, 75, 52, 55, 47, 60, 48],
    42. "text": "Microsoft"
    43. }
    44. ]
    45. };
    46.  
    47. zingchart.render({
    48. id: 'myChart',
    49. data: myConfig,
    50. height: '100%',
    51. width: '100%'
    52. });
    53.  
    54. var NODE_STATE = {};
    55. zingchart.bind('myChart', 'node_mouseover', function(p) {
    56. var sClass = p.graphid + '-plotset-plot-' + p.plotindex + '-node-' + p.nodeindex + '-3dfacet';
    57. var oNode = $('.' + sClass);
    58. NODE_STATE = {
    59. 'fill': oNode.attr('fill'),
    60. 'stroke-width': oNode.attr('stroke-width'),
    61. 'stroke': oNode.attr('stroke')
    62. };
    63. $('.' + sClass)
    64. .attr('fill', '#000')
    65. .attr('stroke', '#f90')
    66. .attr('stroke-width', 3);
    67. });
    68.  
    69. zingchart.bind('myChart', 'node_mouseout', function(p) {
    70. var sClass = p.graphid + '-plotset-plot-' + p.plotindex + '-node-' + p.nodeindex + '-3dfacet';
    71. var oNode = $('.' + sClass);
    72. $('.' + sClass)
    73. .attr('fill', NODE_STATE['fill'])
    74. .attr('stroke', NODE_STATE['stroke'])
    75. .attr('stroke-width', NODE_STATE['stroke-width']);
    76. });