protected void Page_Load(object sender, EventArgs e) { cdsTemp = new CompositeChartSeries(); cdsPress = new CompositeChartSeries(); cdsCond = new CompositeChartSeries(); cdsPh = new CompositeChartSeries(); LoadChart(GetFilename); }
protected void Page_Load(object sender, EventArgs e) { cdsTemp = new CompositeChartSeries(); cdsPress = new CompositeChartSeries(); cdsCond = new CompositeChartSeries(); cdsPh = new CompositeChartSeries(); LoadChart(GetFilename); }
/// <summary> /// Createvenue and unit sold chart for selected product. /// </summary> private void ProductSalesChart() { this.productsaleschart.DataBindings.Clear(); this.productsaleschart.SeriesList.Clear(); this.productsaleschart.YAxes.Clear(); CompositeChartSeries seriesrevenue = new CompositeChartSeries(); seriesrevenue.Data.X.AddRange(SalesOrderReport.ProductsRevenue.Select(x => x.Day).ToArray()); seriesrevenue.Data.Y.AddRange(SalesOrderReport.ProductsRevenue.Select(x => x.Amount).ToArray()); seriesrevenue.Type = ChartSeriesType.Bezier; seriesrevenue.Label = "Revenue[In Hundered Thousand]"; seriesrevenue.MarkerStyle.Fill.Color = Color.LightCoral; CompositeChartYAxis y = new CompositeChartYAxis(); y.Text = "Revenue"; y.TextStyle.Fill.Type = ChartStyleFillType.Default; y.AxisStyle.Fill.Type = ChartStyleFillType.Default; CompositeChartYAxis y1 = new CompositeChartYAxis(); y1.Compass = ChartCompass.East; y1.GridMajor.Visible = false; y1.TextStyle.Fill.Type = ChartStyleFillType.Default; y1.AxisStyle.Fill.Type = ChartStyleFillType.Default; y1.Text = "Units"; CompositeChartSeries seriesunit = new CompositeChartSeries(); seriesunit.Data.X.AddRange(SalesOrderReport.ProductsRevenue.Select(x => x.Day).ToArray()); seriesunit.Data.Y.AddRange(SalesOrderReport.ProductsRevenue.Select(x => x.Units).ToArray()); seriesunit.Type = ChartSeriesType.Scatter; seriesunit.Label = "Units"; productsaleschart.Axis.X.Text = "Days"; productsaleschart.ShowChartLabels = false; this.productsaleschart.SeriesList.Add(seriesrevenue); this.productsaleschart.SeriesList.Add(seriesunit); this.productsaleschart.Legend.Compass = ChartCompass.North; productsaleschart.YAxes.Add(y); productsaleschart.YAxes.Add(y1); this.productsaleschart.SeriesList[1].YAxis = 1; this.productsaleschart.AutoResize = true; #region Styles ChartStyleFill chartstyle = new ChartStyleFill(); chartstyle.Type = ChartStyleFillType.Default; chartstyle.Color = Color.Beige; ChartStyleFill chartfillstyle = new ChartStyleFill(); chartfillstyle.Color = Color.FromName("#FFCC66"); ChartStyleFill chartfillstyle1 = new ChartStyleFill(); chartfillstyle1.Color = Color.FromName("#FF0000"); chartfillstyle.Type = ChartStyleFillType.Default; this.productsaleschart.SeriesStyles.Add(new ChartStyle { Fill = chartfillstyle, StrokeWidth = 3, Stroke = Color.FromName("#FF9900") }); this.productsaleschart.SeriesStyles.Add(new ChartStyle { Fill = chartfillstyle1, Stroke = Color.Red }); #endregion }
/// <summary> /// Createvenue and unit sold chart for selected product. /// </summary> private void ProductSalesChart() { this.productsaleschart.DataBindings.Clear(); this.productsaleschart.SeriesList.Clear(); this.productsaleschart.YAxes.Clear(); CompositeChartSeries seriesrevenue = new CompositeChartSeries(); seriesrevenue.Data.X.AddRange(SalesOrderReport.ProductsRevenue.Select(x => x.Day).ToArray()); seriesrevenue.Data.Y.AddRange(SalesOrderReport.ProductsRevenue.Select(x => x.Amount).ToArray()); seriesrevenue.Type = ChartSeriesType.Bezier; seriesrevenue.Label = "Revenue[In Hundered Thousand]"; seriesrevenue.MarkerStyle.Fill.Color = Color.LightCoral; CompositeChartYAxis y = new CompositeChartYAxis(); y.Text = "Revenue"; y.TextStyle.Fill.Type = ChartStyleFillType.Default; y.AxisStyle.Fill.Type = ChartStyleFillType.Default; CompositeChartYAxis y1 = new CompositeChartYAxis(); y1.Compass = ChartCompass.East; y1.GridMajor.Visible=false; y1.TextStyle.Fill.Type = ChartStyleFillType.Default; y1.AxisStyle.Fill.Type = ChartStyleFillType.Default; y1.Text = "Units"; CompositeChartSeries seriesunit = new CompositeChartSeries(); seriesunit.Data.X.AddRange(SalesOrderReport.ProductsRevenue.Select(x => x.Day).ToArray()); seriesunit.Data.Y.AddRange(SalesOrderReport.ProductsRevenue.Select(x => x.Units).ToArray()); seriesunit.Type = ChartSeriesType.Scatter; seriesunit.Label = "Units"; productsaleschart.Axis.X.Text = "Days"; productsaleschart.ShowChartLabels = false; this.productsaleschart.SeriesList.Add(seriesrevenue); this.productsaleschart.SeriesList.Add(seriesunit); this.productsaleschart.Legend.Compass = ChartCompass.North; productsaleschart.YAxes.Add(y); productsaleschart.YAxes.Add(y1); this.productsaleschart.SeriesList[1].YAxis = 1; this.productsaleschart.AutoResize = true; #region Styles ChartStyleFill chartstyle = new ChartStyleFill(); chartstyle.Type = ChartStyleFillType.Default; chartstyle.Color = Color.Beige; ChartStyleFill chartfillstyle = new ChartStyleFill(); chartfillstyle.Color = Color.FromName("#FFCC66"); ChartStyleFill chartfillstyle1 = new ChartStyleFill(); chartfillstyle1.Color = Color.FromName("#FF0000"); chartfillstyle.Type = ChartStyleFillType.Default; this.productsaleschart.SeriesStyles.Add(new ChartStyle { Fill = chartfillstyle, StrokeWidth = 3,Stroke=Color.FromName("#FF9900") }); this.productsaleschart.SeriesStyles.Add(new ChartStyle { Fill = chartfillstyle1,Stroke=Color.Red }); #endregion }