| <!doctype html>
|
| <html lang="en">
|
| <head>
|
| <meta charset="UTF-8">
|
| <meta content="IE=edge" http-equiv="X-UA-Compatible">
|
| <meta content="width=device-width, initial-scale=1" name="viewport">
|
| <title>BCT Bubble Chart 04</title>
|
| <link href="https://playground.anychart.com/docs/samples/BCT_Bubble_Chart_04/iframe" rel="canonical">
|
| <meta content="Bubble Chart,Statistical Data" name="keywords">
|
| <meta content="AnyChart - JavaScript Charts designed to be embedded and integrated" name="description">
|
| |
| |
| |
|
|
| <link href="_deps/cdn.anychart.com/releases/8.14.1/css/anychart-ui.min_qe95e7e741b.css" rel="stylesheet" type="text/css">
|
| <style>html, body, #container {
|
| width: 100%;
|
| height: 100%;
|
| margin: 0;
|
| padding: 0;
|
| }</style>
|
| </head>
|
| <body>
|
| <div id="container"></div>
|
| <script src="_deps/cdn.anychart.com/releases/8.14.1/js/anychart-base.min_qe95e7e741b.js"></script>
|
| <script src="_deps/cdn.anychart.com/releases/8.14.1/js/anychart-exports.min_qe95e7e741b.js"></script>
|
| <script src="_deps/cdn.anychart.com/releases/8.14.1/js/anychart-ui.min_qe95e7e741b.js"></script>
|
| <script type="text/javascript">anychart.onDocumentReady(function () {
|
|
|
|
|
| var chart = anychart.cartesian();
|
|
|
|
|
| var data1 = [
|
| {x: 2000, value: 1100, size: 3},
|
| {x: 2001, value: 800, size: 3},
|
| {x: 2002, value: 1100, size: 3},
|
| {x: 2003, value: 1500, size: 2},
|
| {x: 2004, value: 921, size: 4},
|
| {x: 2005, value: 1000, size: 3},
|
| {x: 2006, value: 1400, size: 2}
|
| ];
|
|
|
| var data2 = [
|
| {x: 2000, value: 900, size: 1},
|
| {x: 2001, value: 950, size: 4},
|
| {x: 2002, value: 800, size: 2},
|
| {x: 2003, value: 1000, size: 3},
|
| {x: 2004, value: 800, size: 3},
|
| {x: 2005, value: 750, size: 1},
|
| {x: 2006, value: 800, size: 2}
|
| ];
|
|
|
|
|
| series1 = chart.bubble(data1);
|
| series2 = chart.bubble(data2);
|
|
|
|
|
| chart.minBubbleSize("3%");
|
| chart.maxBubbleSize("10%");
|
|
|
|
|
| chart.title("Bubble Chart: Size (Percent)");
|
|
|
| chart.legend(true);
|
|
|
|
|
| chart.interactivity({hoverMode: "by-x"});
|
|
|
|
|
| chart.xAxis().title("Year");
|
| chart.yAxis().title("Sales, $");
|
|
|
|
|
| chart.container("container");
|
| chart.draw();
|
| });</script>
|
| </body>
|
| </html> |