using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using HLWebOKBQueryPlugin.Models; using HLWebOKBQueryPlugin.Helpers; using HLWebOKBQueryPlugin.OKBQueryService; namespace HLWebOKBQueryPlugin.Controllers { public class ChartController : Controller { // // GET: /Chart/ public ActionResult UpdateBubbleChart(FormCollection collection) { String selectedAxisX = collection.Get("valuesAxisXCombobox"); String selectedAxisY = collection.Get("valuesAxisYCombobox"); String selectedBubbleSize = collection.Get("bubbleSizeCombobox"); Response.Write("axis x => " + selectedAxisX); Response.Write("axis y => " + selectedAxisY); Response.Write("size => " + selectedBubbleSize); ChartModel cm = new ChartModel(); // Later, we will get the runs from the session ... QueryServiceClient client = Query.GetClientFactory("okbtester", "okbtester"); long[] runIds = new long[5]; for (int i = 0; i < 5; i++) { runIds[i] = i; } Run[] runs = client.GetRuns(runIds, false); cm.UpdateRunCollection(runs); cm.UpdateBubbleChart(selectedAxisY, selectedAxisX, selectedBubbleSize); return View("Index",cm); } public ActionResult Index() { ChartModel cm = new ChartModel(); // Later, we will get the runs from the session ... QueryServiceClient client = Query.GetClientFactory("okbtester", "okbtester"); long[] runIds = new long[5]; for (int i = 0; i < 5; i++) { runIds[i] = i; } Run[] runs = client.GetRuns(runIds, false); cm.UpdateRunCollection(runs); return View(cm); } // [ChildActionOnly] public ActionResult BubbleChart() { ChartModel cm = new ChartModel(); return PartialView("BubbleChart", cm); // name of usercontrol } //public ActionResult BoxPlot() //{ // return View(); //} } }