/// <summary> /// Handles the Load event of the Page control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> protected void Page_Load(object sender, EventArgs e) { XmlDocument xmlInput = new XmlDocument(); xmlInput.Load(Request.InputStream); ChartConfigProvider ccp = new ChartConfigProvider(xmlInput); ChartBuilder cb = new ChartBuilder(ccp, Page, true); Response.ContentType = "text/html"; Response.Write(cb.GetChartHtml()+cb.GetHtmlImageMap()); }
/// <summary> /// Handles the Click event of the Button3 control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> protected void Button3_Click(object sender, EventArgs e) { // Variable declarations WebClient webClient = new WebClient(); XmlDocument xmlChartConfig = new XmlDocument(); XmlDocument xmlData = new XmlDocument(); // Get the chart config Uri uri = new Uri(Server.MapPath("~/Configuration/Charts/TelemetryData1.xml"), UriKind.RelativeOrAbsolute); Stream configData = webClient.OpenRead(uri); XmlTextReader xmlText = new XmlTextReader(configData); xmlChartConfig.Load(xmlText); configData.Close(); ChartConfigProvider chartConfig = new ChartConfigProvider(xmlChartConfig); ChartBuilder cb = new ChartBuilder(chartConfig, Chart3); }