Esempio n. 1
0
 public static AjaxHistory Parse(string data, AjaxHistory sibling)
 {
     return null;
 }
        /// <summary>
        /// Displays the statistics history.
        /// </summary>
        /// <param name="history">The statistics history.</param>
        /// <param name="axisX">The X axis.</param>
        /// <param name="axisY">The Y axis.</param>
        private void DisplayHistory(AjaxHistory history, string axisX, string axisY)
        {
            if (null == history) return;

            this.chart.Series.Clear();
            this.chart.Annotations.Clear();
            this.listViewDiscovery.Items.Clear();

            // Update the chart.
            Series series = new Series("Video {0}".FormatWith(this.textBox));
            series.ChartType = SeriesChartType.Line;
            series.XValueType = ChartValueType.DateTime;
            series.YValueType = ChartValueType.Int32;
            series.Font = new Font(this.Font.FontFamily, this.Font.Size, this.Font.Style);

            foreach (AjaxHistoryPoint point in history.Series)
                series.Points.AddXY(point.Time, point.Value);

            this.chart.Series.Add(series);
            this.chart.ChartAreas[0].AxisX.Title = axisX;
            this.chart.ChartAreas[0].AxisY.Title = axisY;
        }
Esempio n. 3
0
 /// <summary>
 /// Parses a string containing history data in Google chart format, and creates a history object.
 /// </summary>
 /// <param name="data">A string URI containing history data in Google chart format.</param>
 /// <returns>A history object</returns>
 public static AjaxHistory Parse(string data)
 {
     AjaxHistory history = new AjaxHistory(ChartType.Lc);
     history.ParseSeries(data);
     return history;
 }