JavaScript Bubble Charts & Graphs - 0 | JSFiddle Sample Code
JavaScript Bubble Charts & Graphs - 0 | JSFiddle Sample Code
HTML
<div id="chartContainer" style="height: 370px; width: 100%;"></div>
<script src="https://cdn.canvasjs.com/canvasjs.min.js"></script>
<div style="margin-top:16px;color:dimgrey;font-size:9px;font-family: Verdana, Arial, Helvetica, sans-serif;text-decoration:none;">Source: <a href="https://canvasjs.com/html5-javascript-bubble-chart/" target="_blank" title="JavaScript Bubble Charts & Graphs ">https://canvasjs.com/html5-javascript-bubble-chart/</a></div>
JavaScript
window.onload = function () {
var chart = new CanvasJS.Chart("chartContainer", {
animationEnabled: true,
axisX: {
includeZero: false, minimum: 1, maximum: 6
},
axisY: {
includeZero: false, minimum: 1, maximum: 6
},
data: [{
type: "bubble",
showInLegend: true,
legendMarkerColor: "grey",
toolTipContent: "{z}",
dataPoints: [
{ x: 3, y: 5, z: 81 },
{ x: 2, y: 5, z: 100 },
{ x: 4, y: 5, z: 94 },
]
}]
});
chart.render();
}