%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<%@ Import Namespace="HLWebOKBQueryPlugin.Models" %>
<%@ Register assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="System.Web.UI.DataVisualization.Charting" tagprefix="asp" %>
<% using (Html.BeginForm("UpdateBubbleChart","Chart")) %>
<% { %>
<%: Html.Label("x axis")%>
<%: Html.DropDownList("valuesAxisXCombobox", new SelectList(((ChartModel)Model).valuesAxisX))%>
<%: Html.Label("y axis")%>
<%: Html.DropDownList("valuesAxisYCombobox", new SelectList(((ChartModel)Model).valuesAxisY))%>
<%: Html.Label("bubble size")%>
<%: Html.DropDownList("bubbleSizeCombobox", new SelectList(((ChartModel)Model).bubbleSize))%>
<% } %>
<%
if (((ChartModel)Model).Series != null) {
//bubbleChart = new Chart();
bubbleChart.Width = 150;
bubbleChart.Height = 300;
bubbleChart.Attributes.Add("align", "left");
bubbleChart.Titles.Add("bubbe chart");
bubbleChart.ChartAreas.Add(new ChartArea());
Response.Write(((ChartModel)Model).Series.Points.Count);
bubbleChart.Series.Add(((ChartModel)Model).Series);
bubbleChart.Legends.Add(new Legend("DBAs"));
bubbleChart.Legends[0].TableStyle = LegendTableStyle.Auto;
bubbleChart.Legends[0].Docking = Docking.Bottom;
bubbleChart.DataBind();
}
//Chart chart = new Chart();
//chart.BackColor = System.Drawing.Color.Transparent;
//chart.Width = Unit.Pixel(250);
//chart.Height = Unit.Pixel(100);
//Series series1 = new Series("Series1");
//series1.ChartArea = "ca1";
//series1.ChartType = SeriesChartType.Pie;
//series1.Font = new System.Drawing.Font("Verdana", 8.25f, System.Drawing.FontStyle.Regular);
//series1.Points.Add(new DataPoint {
// AxisLabel = "Value1", YValues = new double[] { 1, 2, 3.1 }
//});
//series1.Points.Add(new DataPoint {
// AxisLabel = "Value2", YValues = new double[] { 1, 2, 3.1 }
//});
//chart.Series.Add(series1);
//ChartArea ca1 = new ChartArea("ca1");
//ca1.BackColor = System.Drawing.Color.Transparent;
//chart.ChartAreas.Add(ca1);
//using (var ms = new System.IO.MemoryStream()) {
// chart.SaveImage(ms, ChartImageFormat.Png);
// ms.Seek(0, System.IO.SeekOrigin.Begin);
// Response.Write(new FileStreamResult(ms, "image/png"));
//}
%>