anychart-jquery
Version:
JQuery plugin for AnyChart JavaScript charting library
49 lines (45 loc) • 1.58 kB
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;
}
#load {
margin: 5px 0 10px 15px;
}
#container {
width: 100%;
height: 480px;
}
</style>
</head>
<body>
<button id="load">load new data</button>
<div id="container"></div>
<script>
var cnt = $('#container');
cnt.anychart('line', [3, 1, 2]);
$('#load').click(function () {
$.ajax({
url: 'assets/data.json',
type: 'GET',
dataType: 'json'
}).done(function (json) {
cnt.anychart().data(json);
})
});
</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>