put bubble chart in straight line? - Javascript highcharts

Javascript examples for highcharts:Line Chart

Description

put bubble chart in straight line?

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <title>decreasing bubble example</title> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript" src="https://code.jquery.com/jquery-2.0.2.js"></script> 
      <script type="text/javascript">
    $(function(){//from   w w w . j a va  2  s .c  o m
var chart = new Highcharts.Chart({
    chart: {
        margin:[50,0,30,0],
        renderTo:'container',
        //type:'column'
        //type:'bar'
        //type:'area'
        type:'scatter'
        //type:'bubble'
    },
    credits: {},
    exporting: {},
    legend: {enabled:false},
    title: {},
    tooltip: {},
    plotOptions: {
        series: {
            marker:{
                fillColor:'rgba(90,155,212,.5)',
                LineColor:'rgba(90,155,212,1)',
                color:'rgba(90,155,212,1)',
                lineWidth:2,
                states:{
                    hover:{
                        enabled:false
                    }
                }
            }
        }
    },
    xAxis: {
        min:0,
        max:500,
        tickPositions:[1,100,180,240,280,300,310,318],
        gridLineWidth:.5,
        gridLineColor:'#ccc'
    },
    yAxis: {
        allowDecimals:false,
        labels:{enabled:false},
        title:{text:''}
    },
    series:[{
        data:[{x:50,y:1,marker:{radius:50}},
              {x:140,y:1,marker:{radius:40}},
              {x:210,y:1,marker:{radius:30}},
              {x:260,y:1,marker:{radius:20}},
              {x:290,y:1,marker:{radius:10}},
              {x:305,y:1,marker:{radius:5}},
              {x:314,y:1,marker:{radius:4}},
             ]
    }]
});
    });

      </script> 
   </head> 
   <body> 
      <script src="https://code.highcharts.com/highcharts.js"></script> 
      <script src="https://code.highcharts.com/highcharts-more.js"></script> 
      <script src="https://code.highcharts.com/modules/exporting.js"></script> 
      <div id="container" style="width:500px;height:400px;margin:1.5em 1em;"></div>  
   </body>
</html>

Related Tutorials