Go Highcharts Instrument Panel Production

Source: Internet
Author: User

Http://www.runoob.com/highcharts/highcharts-guage-solid.html

This article transferred from: http://blog.csdn.net/javaliuzhiyue/article/details/9943751

The use of the HIGHCHARTS instrument panel is simply packaged for easy use

In the Mygaugechart.js file
var chart;/** * * @param containerid Container id * @param min min * @param max Max * @param step step * @param text title * @para M Name Series name * @param data */function mygaugechart (Containerid, Min, max, step, text, name, data) {var a = new Array (); A.push (data); chart = new Highcharts.chart ({chart: {renderto:containerid,type: "gauge", Plotborderwidth:1,plotbackgro Undcolor: "#000000",//${pagecontext.request.contextpath}/js/1.jpgplotbackgroundimage:null,//width220 Height135width:220,height:135},exporting: {//Whether export enabled:false},credits is allowed: {enabled:false},title: {text: '}, pane: [{startangle: The center point of the -90,endangle:90,background:null,//Polar chart or angle meter, positioned like an array [x, Y]. The position can be an integer in pixels or a percentage of the plot Area center: [' 50% ', ' 90% '],size:125}],yaxis: {min:min,max:max,//step tickinterval:step,min Ortickposition: ' Outside ', tickposition: ' Outside ', Labels: {///scale value rotation angle rotation: ' Auto ', Distance:20,style: {color: ' #F FFFFF ', FontWeight: ' Bold '}},plotbands: [{//Alert red area length//from:80,//to: 100,//color: ' #C02316 ',///red area to detect tick marks Innerradius: ' 100% ', Outerradius: ' 115% '}],//dial, half-circle for 0, rest for round pane:0,title: {styl  E: {color: ' #FFFFFF ', fontSize: ' 12px '},text:text,y: -5}},plotoptions: {gauge:} {datalabels: {enabled:false},dial: { BackgroundColor: ' #FFD700 ',//RADIUS: Pointer length radius: ' 100% '}}},series: [{data:a,name:name,yaxis:0}]},function (chart) {///This function can be added with timing effect }); 

Called on the page: mygaugechart ("container", 0,100, 20, "(Unit:%)", "series", ();

Mygaugechart ("Container1", 0,100, 20, "Maybach", "series", 10); Mygaugechart ("Container2", 0,100, 20, "Maserati", "series", 40); Mygaugechart ("Container3", 0,100, 20, "Ferrari", "series", +);

Effect:

 

Go Highcharts Instrument Panel Production

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.