HLJ 发布于
2019-03-19 16:52:34

highcharts统计图基准线代码实例



highcharts柱状统计图基准线api接口设置代码实例

 
<!DOCTYPE HTML>  
<script src="jquery.js"></script>
<script src="highcharts.js"></script>   
<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>  
<script>  
$(function () {
    $('#container').highcharts({
	    chart: {  
	        type: 'column', 
	    },  
	    title: {  
	        text: 'colum'  
	    }, 
	    xAxis: {  
	        type: 'category',
	    },  
	    yAxis:{
	        plotLines:[{//基准线
	            color:'#FF4040',
	            dashStyle:'Dash',
	            width:1.5,
	            value:5,
	            zIndex:5
	        }]
	    },
	    legend: {  
	        enabled: false  
	    }, 
	    plotOptions: {  
	        series: {  
	            borderWidth: 0,  
	            dataLabels: {  
	                enabled: true  
	            },  
	            events:{  
	            click:function(e){//点击事件  
	                  
	                }  
	             }    
	        }  
	    },  
	    series: [{  
	        name: 'Things',  
	        colorByPoint: true,  
	        data: [{  
	            name: 'Animals',  
	            y: 5
	        }, {  
	            name: 'Fruits',  
	            y: 2 
	        }, {  
	            name: 'Cars',  
	            y: 4  
	        }]  
	    }], 
	})
})    
</script>  
当前文章内容为原创转载请注明出处:http://www.good1230.com/detail/2019-03-19/358.html
最后生成于 2023-06-18 18:32:55
此内容有帮助 ?
0