create bubble chart with marker - Javascript highcharts

Javascript examples for highcharts:Bubble Chart

Description

create bubble chart with marker

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <title>Highcharts Demo</title> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript" src="https://code.jquery.com/jquery-3.1.1.js"></script> 
   </head> 
   <body> 
      <script src="https://code.highcharts.com/highcharts.js"></script> 
      <script src="https://code.highcharts.com/highcharts-more.js"></script> 
      <div id="container" style="min-width: 310px; max-width: 600px; height: 400px; margin: 0 auto;"></div> 
      <script type="text/javascript">
$(function() {/*from   w  w  w  .  j  a v a 2s .  c  o  m*/
    Highcharts.chart('container', {
        chart: {
            type: 'bubble',
            plotBorderWidth: 1,
            zoomType: 'xyz'
        },
        legend: {
            enabled: false
        },
        credits: {
            enabled: false
        },
        title: {
            text: 'Using X Y Z Coordinates'
        },
        xAxis: {
            type: "category",
            gridLineWidth: 1
        },
        yAxis: {
            startOnTick: false,
            endOnTick: true,
            title: {
                text: ''
            },
        },
        series: [{
            data: [
                ['0-50%', 2017, 12],
                ['51-65%', 2017, 48],
                ['66-75%', 2017, 28],
                ['76-85%', 2017, 9],
                ['86-100%', 2017, 3],
                ['0-50%', 2018, 6],
                ['51-65%', 2018, 47],
                ['66-75%', 2018, 26],
                ['76-85%', 2018, 19],
                ['86-100%', 2018, 3],
                ['0-50%', 2019, 8],
                ['51-65%', 2019, 27],
                ['66-75%', 2019, 48],
                ['76-85%', 2019, 15],
                ['86-100%', 2019, 15]
            ],
            marker: {
                fillColor: {
                    radialGradient: {
                        cx: 0.4,
                        cy: 0.3,
                        r: 0.7
                    },
                    stops: [
                        [0, 'rgba(255,255,255,0.5)'],
                        [1, Highcharts.Color(Highcharts.getOptions().colors[0]).setOpacity(0.5).get('rgba')]
                    ]
                }
            }
        }]
    });
});

      </script>  
   </body>
</html>

Related Tutorials