UNPKG

anychart-jquery

Version:

JQuery plugin for AnyChart JavaScript charting library

51 lines (45 loc) 1.64 kB
<!doctype html> <html> <head> <script src="../node_modules/anychart/dist/js/anychart-base.min.js"></script> <script src="../node_modules/anychart/dist/js/anychart-ui.min.js"></script> <script src="../node_modules/anychart/dist/js/anychart-exports.min.js"></script> <script src="../node_modules/jquery/dist/jquery.min.js"></script> <script src="../dist/anychart-jquery.min.js"></script> <link rel="stylesheet" href="../node_modules/anychart/dist/css/anychart-ui.min.css"/> <link rel="stylesheet" href="../node_modules/anychart/dist/fonts/css/anychart-font.min.css"/> <style> html, body { margin: 0; padding: 0; } #container { width: 100%; height: 480px; } .buttons-container { margin: 5px 0 10px 15px; } </style> </head> <body> <div class="buttons-container"> <button id="pie">render pie chart</button> <button id="bg">change background to pink</button> </div> <div id="container" style=""></div> <script> var cnt = $('#container'); cnt.anychart('line', [3, 1, 2]); $('#pie').click(function () { cnt.anychart('pie', [4, 3, 3, 4]); }); $('#bg').click(function () { cnt.anychart().background('pink'); }) </script> <!-- This library enables the automatic resizing of the height and width of both same and cross domain iFrames to fit their contained content. --> <script src="https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/3.5.8/iframeResizer.contentWindow.min.js"></script> </body> </html>