From 4bc29d84bd61615daae575828f06ceb4676fdca1 Mon Sep 17 00:00:00 2001 From: luqiong <605601787@qq.com> Date: Tue, 9 Sep 2014 14:00:16 +0800 Subject: [PATCH] edit chartplot xAxis edit chartplot xAxis --- Bench4Q-Web/src/main/webapp/css/test.css | 2 +- .../src/main/webapp/script/TestPlan/TestPlanUI.js | 15 +++++++-------- .../main/webapp/script/scriptManager/uiFactory.js | 2 +- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/Bench4Q-Web/src/main/webapp/css/test.css b/Bench4Q-Web/src/main/webapp/css/test.css index c55af61c..50d0ad82 100644 --- a/Bench4Q-Web/src/main/webapp/css/test.css +++ b/Bench4Q-Web/src/main/webapp/css/test.css @@ -64,7 +64,7 @@ select{ #highchartsPlot{ margin-top:10px; margin-bottom:10px; - width:85%; + width:65%; } .centre{ diff --git a/Bench4Q-Web/src/main/webapp/script/TestPlan/TestPlanUI.js b/Bench4Q-Web/src/main/webapp/script/TestPlan/TestPlanUI.js index c742b07c..60724bfb 100644 --- a/Bench4Q-Web/src/main/webapp/script/TestPlan/TestPlanUI.js +++ b/Bench4Q-Web/src/main/webapp/script/TestPlan/TestPlanUI.js @@ -42,7 +42,10 @@ function loadSchedulePlot() { x : -50 }, xAxis : { - categories : [ 0 ], + plotLines : [ { + width : 10, + color : '#808080' + } ], min : 0, title : { text : 'Time(s)' @@ -66,20 +69,16 @@ function loadSchedulePlot() { } }, series : [ { - data : [ 0 ] + data : [[ 0 , 0 ]] } ] }; var RequireLoadLength = $('input[name="RequireLoad"]').length; var RequireLoad = 0; + var ExecuteRange = 0; for(var i = 1; i < RequireLoadLength; i++){ RequireLoad = parseInt($('input[name="RequireLoad"]')[i].value); - options.series[0].data.push(RequireLoad); - } - var ExecuteRangeLength = $('input[name="ExecuteRange"]').length; - var ExecuteRange = 0; - for(var i = 1; i < ExecuteRangeLength; i++){ ExecuteRange += parseInt($('input[name="ExecuteRange"]')[i].value); - options.xAxis.categories.push(ExecuteRange); + options.series[0].data.push([ExecuteRange,RequireLoad]); } var chart = new Highcharts.Chart(options); } diff --git a/Bench4Q-Web/src/main/webapp/script/scriptManager/uiFactory.js b/Bench4Q-Web/src/main/webapp/script/scriptManager/uiFactory.js index 92b0bc4a..55f67d70 100644 --- a/Bench4Q-Web/src/main/webapp/script/scriptManager/uiFactory.js +++ b/Bench4Q-Web/src/main/webapp/script/scriptManager/uiFactory.js @@ -44,6 +44,6 @@ function createRadioGroupByAttribute(items,textAttr,valueAttr,idAttr, name,conta } function information(text){ - noty({text: text,type:'information',layout:'center'}); + noty({text: text,type:'information',layout:'center',maxVisible: 1}); setTimeout("document.body.removeChild(noty_center_layout_container)",2000); }