Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/07/11 18:44:15 (13 years ago)
Author:
fruehrli
Message:

#1503 BubbleChart without exception

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Controllers/ChartController.cs

    r6118 r6165  
    88using HLWebOKBQueryPlugin.OKBQueryService;
    99
    10 namespace HLWebOKBQueryPlugin.Controllers
    11 {
    12     public class ChartController : Controller
    13     {
    14         //
    15         // GET: /Chart/
     10namespace HLWebOKBQueryPlugin.Controllers {
     11  public class ChartController : Controller {
     12    //
     13    // GET: /Chart/
    1614
    1715
    18         public ActionResult UpdateBubbleChart(FormCollection collection)
    19         {
     16    public ActionResult UpdateBubbleChart(FormCollection collection) {
    2017
    2118
    22             String selectedAxisX = collection.Get("valuesAxisXCombobox");
    23             String selectedAxisY = collection.Get("valuesAxisYCombobox");
    24             String selectedBubbleSize = collection.Get("bubbleSizeCombobox");
    25            
    26                
    27             ChartModel cm = new ChartModel();
     19      String selectedAxisX = collection.Get("valuesAxisXCombobox");
     20      String selectedAxisY = collection.Get("valuesAxisYCombobox");
     21      String selectedBubbleSize = collection.Get("bubbleSizeCombobox");
    2822
    29             // Later, we will get the runs from the session ...
    30             QueryServiceClient client = Query.GetClientFactory("okbtester", "okbtester");
     23      Response.Write("axis x => " + selectedAxisX);
     24      Response.Write("axis y => " + selectedAxisY);
     25      Response.Write("size => " + selectedBubbleSize);
    3126
    32             long[] runIds = new long[5];
    33             for (int i = 0; i < 5; i++)
    34             {
    35                 runIds[i] = i;
    36             }
    37             Run[] runs = client.GetRuns(runIds, false);
     27      ChartModel cm = new ChartModel();
    3828
    39             cm.UpdateRunCollection(runs);
    40             cm.UpdateBubbleChart(selectedAxisY, selectedAxisX, selectedBubbleSize);
     29      // Later, we will get the runs from the session ...
     30      QueryServiceClient client = Query.GetClientFactory("okbtester", "okbtester");
    4131
    42             return View(cm);
    43         }
     32      long[] runIds = new long[5];
     33      for (int i = 0; i < 5; i++) {
     34        runIds[i] = i;
     35      }
     36      Run[] runs = client.GetRuns(runIds, false);
     37
     38      cm.UpdateRunCollection(runs);
     39      cm.UpdateBubbleChart(selectedAxisY, selectedAxisX, selectedBubbleSize);
     40
     41      return View("Index",cm);
     42    }
    4443
    4544
    46         public ActionResult Index()
    47         {
    48             ChartModel cm = new ChartModel();
     45    public ActionResult Index() {
     46      ChartModel cm = new ChartModel();
    4947
    50             // Later, we will get the runs from the session ...
    51             QueryServiceClient client = Query.GetClientFactory("okbtester", "okbtester");
     48      // Later, we will get the runs from the session ...
     49      QueryServiceClient client = Query.GetClientFactory("okbtester", "okbtester");
    5250
    53             long[] runIds = new long[5];
    54             for (int i = 0; i < 5; i++)
    55             {
    56                 runIds[i] = i;
    57             }
    58             Run[] runs = client.GetRuns(runIds, false);
     51      long[] runIds = new long[5];
     52      for (int i = 0; i < 5; i++) {
     53        runIds[i] = i;
     54      }
     55      Run[] runs = client.GetRuns(runIds, false);
    5956
    60             cm.UpdateRunCollection(runs);
     57      cm.UpdateRunCollection(runs);
    6158
    6259
    63             return View(cm);
    64         }
     60      return View(cm);
     61    }
    6562
    66         // [ChildActionOnly]
    67         public ActionResult BubbleChart()
    68         {
    69             ChartModel cm = new ChartModel();
     63    // [ChildActionOnly]
     64    public ActionResult BubbleChart() {
     65      ChartModel cm = new ChartModel();
    7066
    71             return PartialView("BubbleChart",cm); // name of usercontrol
    72         }
     67      return PartialView("BubbleChart", cm); // name of usercontrol
     68    }
    7369
    7470
    75         //public ActionResult BoxPlot()
    76         //{
    77         //    return View();
    78         //}
     71    //public ActionResult BoxPlot()
     72    //{
     73    //    return View();
     74    //}
    7975
    80     }
     76  }
    8177}
Note: See TracChangeset for help on using the changeset viewer.