1. Graph
VaR chart; $ (document ). ready (function () {Line ()}); function line () {var Options = {chart: {renderto: 'Container', // The container where the chart is placed, plotbackgroundcolor: NULL, plotborderwidth: NULL, defaultseriestype :' Line '}, Title: {text :' <% = Titletext %> '}, Subtitle: {text: ''}, xaxis: {// X axis data categories :[ <% = Xdata %> ], // X-axis data, array format labels: {rotation:-45, // font skew align: 'right', style: {Font: 'normal 13px '}}, yaxis :{// the Y axis displays the text title: {text: 'number of servers' }}, tooltip: {enabled: True, formatter: function () {return' < B > '+ This. x +' </ B > < BR /> '+ This. series. name + ':' + highcharts. numberformat (this. y, 0) ;}}, plotoptions: {Line: {datalabels: {enabled: true}, enablemousetracking: True // whether to display title }}, series :[ <% = Ydata %> // Y-axis data in array format ]}; Chart = new highcharts. Chart (options );}
2. Disease chart
Function Index () {var begintime = $ ("# <% = Tbbegintime. clientid %> "). Val (); var endtime = $ ("# <% = Tbendtime. clientid %> "). Val (); // y axis var jsondata =" "; $. Ajax ({type:" Get ", // Request Method URL:" ajaxhandle/hightchars_ydata.ashx? Type = "+ _ type +" & R = "+ Math. floor (math. random () * 1000 + 1), // name of the class to be passed for Processing Using ajax: {"name": "" + encodeuri (x_data) + "", 'begintime': "" + begintime + "", "endtime": "" + endtime + ""}, datatype: "text", // The returned data type is global: false, // Ajax range: async: false, // asynchronous execution // success: function (strreult) {If (strreult = "-1 ") {alert ("data request failed! "); Return;} datas = []; datas = eval (" ("+ strreult +") ") ;}, // handle error: function () in case of failure () {alert ("ajax request data failed! ") ;}}); Switch (_ type) {Case" game ": typename =" game "; break; Case" plat ": typename =" Platform "; break; case "Developer": typename = "Developer"; break; Case "theme": typename = "subject"; break; Case "type": typename = "type"; break; case "picturestyle": typename = "image style"; break; default: break;} var Options = {chart: {renderto: 'Container', // The container for placing charts: plotbackgroundcolor: null, plotborderwidth: NULL, defaultseriestype: 'column'}, Title: {text: 'service-opening column fig'}, subtitle: {text: ''}, xaxis: {// X axis data categories: x_data, labels: {rotation:-45, // font skew align: 'right', style: {Font: 'normal 13px '}}, yaxis :{// the Y axis displays the text title: {text: 'number of servers' }}, tooltip: {enabled: True, formatter: function () {return'< B > '+ This. x +' </ B > < BR /> '+ This. series. name + ':' + highcharts. numberformat (this. y, 0) ;}}, plotoptions: {Line: {datalabels: {enabled: true}, enablemousetracking: True // whether to display title }}, series: [{Name: typename, data: datas}]}; Chart = new highcharts. chart (options );}
3. Pie Chart
Function Index () {var begintime = $ ("# <% = Tbbegintime. clientid %> "). Val (); var endtime = $ ("# <% = Tbendtime. clientid %> "). Val (); $. Ajax ({type:" Get ", // Request Method URL:" ajaxhandle/hightchar_pie.ashx? Type = "+ _ type +" & R = "+ Math. floor (math. random () * 1000 + 1), // Class Name Data: {"name": "" + encodeuri (names) + "", 'begintime': "" + begintime + "", "endtime": "" + endtime + ""}, datatype: "text", // The returned data type is global: false, // Ajax range: async: false, // asynchronous execution // success: function (strreult) {If (strreult = "-1 ") {alert ("data request failed! "); Return;} datas = []; datas = eval (" ("+ strreult +") ") ;}, // handle error: function () in case of failure () {alert ("ajax request data failed! ") ;}}); Chart = new highcharts. chart ({chart: {renderto: 'Container', plotbackgroundcolor: NULL, plotborderwidth: NULL, plotshadow: false}, Title: {text: 'pie fig'}, tooltip: {formatter: function () {return'< B > '+ This. Point. Name +' </ B > : '+ Highcharts. numberformat (this. percentage, 1) + '%'; }}, plotoptions: {pie: {allowpointselect: True, cursor: 'pointer ', datalabels: {enabled: True, color: '#000000', connectorcolor: '#000000', formatter: function () {return' < B > '+ This. Point. Name +' </ B > : '+ Highcharts. numberformat (this. percentage, 1) + '%' ;}}}, series: [{type: 'pie ', name: 'browser share', // data: [/// ['giggle, 60.0], {Name: 'divine comedy, Y: 10.1, sliced: True, selected: true}, ['other ', 9.9], ['swords', 20.0] //] data: datas}]});}