Exemple #1
0
    /// <summary>
    /// Create chart for Existing customer vs New customer
    /// </summary>
    private void CreateNewCustomerChart()
    {
        C1BarChart1.SeriesList.Clear();
        C1BarChart1.DataBindings.Clear();

        C1ChartBinding bar = new C1ChartBinding();

        bar.XField     = "NewProduct";
        bar.XFieldType = ChartDataXFieldType.String;
        bar.YField     = "NewCustomer";
        bar.YFieldType = ChartDataYFieldType.Number;

        C1ChartBinding bar1 = new C1ChartBinding();

        bar1.XField             = "OldProduct";
        bar1.XFieldType         = ChartDataXFieldType.String;
        bar1.YField             = "OldCustomer";
        bar1.YFieldType         = ChartDataYFieldType.Number;
        this.C1BarChart1.Shadow = true;

        this.C1BarChart1.Axis.X.TextStyle = new ChartStyle {
            Fill = new ChartStyleFill {
                Color = Color.BlueViolet
            }
        };
        this.C1BarChart1.DataBindings.Add(bar);
        this.C1BarChart1.DataBindings.Add(bar1);
        this.C1BarChart1.DataSource = SalesOrderReport.CustomerRatio;
        this.C1BarChart1.DataBind();
        this.C1BarChart1.SeriesStyles[0].Fill = new ChartStyleFill {
            Color = Color.FromName("#ff9900"), Type = ChartStyleFillType.Default
        };
        this.C1BarChart1.ClusterRadius = 12;

        #region Styles
        ChartStyleFill chartfill = new ChartStyleFill();
        chartfill.Color = Color.Beige;

        ChartStyleFill chartfillstyle = new ChartStyleFill();
        chartfillstyle.Type  = ChartStyleFillType.Default;
        chartfillstyle.Color = Color.FromName("#ff9900");

        ChartStyle chstyle = new ChartStyle();
        chstyle.Fill.Color = Color.FromName("#ff9900");
        ChartStyle chstyle1 = new ChartStyle();
        chstyle1.Fill.Color = Color.FromName("#ff0000");

        #endregion
    }
Exemple #2
0
    /// <summary>
    /// Create summary data of all products revenue and units sold
    /// </summary>
    private void CreateSummary()
    {
        //Scale Sales Summary data

        this.C1RadialGauge1.Value = SalesOrderReport.CategoryRevenue[0].Amount / 1000000;
        this.C1RadialGauge2.Value = SalesOrderReport.CategoryRevenue[1].Amount / 1000000;
        this.C1RadialGauge3.Value = SalesOrderReport.CategoryRevenue[2].Amount / 1000000;
        this.sonysales.Text       = "";
        this.mssales.Text         = "";
        this.NVideaSales.Text     = "";
        this.sonysales.Text       = " SONY: " + SalesOrderReport.CategoryRevenue[0].Amount.ToString("C");
        this.mssales.Text         = "MS: " + SalesOrderReport.CategoryRevenue[1].Amount.ToString("C");
        this.NVideaSales.Text     = "NVIDEA: " + SalesOrderReport.CategoryRevenue[2].Amount.ToString("C");

        // Unit Sold summary
        C1ChartBinding unitLine = new C1ChartBinding();

        unitLine.XField       = "Product";
        unitLine.YField       = "Units";
        unitsummarychart.Type = LineChartType.Area;

        unitsummarychart.ShowChartLabels = false;
        unitsummarychart.DataBindings.Add(unitLine);
        unitsummarychart.DataSource = SalesOrderReport.CategoryRevenue;
        unitsummarychart.DataBind();
        unitsummarychart.SeriesList[0].FitType = LineChartFitType.Spline;
        unitsummarychart.AutoResize            = true;

        #region Styles
        ChartStyleFill chartfill = new ChartStyleFill();
        chartfill.Color = Color.Beige;
        ChartStyle chstyle = new ChartStyle();
        chstyle.Fill.Color = Color.FromName("#ff9900");;
        chstyle.Fill.Type  = ChartStyleFillType.Default;

        this.unitsummarychart.SeriesStyles.Add(chstyle);

        #endregion
    }
Exemple #3
0
    /// <summary>
    /// Create summary data of all products revenue and units sold
    /// </summary>
    private void CreateSummary()
    {
        //Scale Sales Summary data

        this.C1RadialGauge1.Value = SalesOrderReport.CategoryRevenue[0].Amount / 1000000;
        this.C1RadialGauge2.Value = SalesOrderReport.CategoryRevenue[1].Amount / 1000000;
        this.C1RadialGauge3.Value = SalesOrderReport.CategoryRevenue[2].Amount / 1000000;
        this.sonysales.Text = "";
        this.mssales.Text = "";
         this.NVideaSales.Text="";
        this.sonysales.Text = " SONY: " +  SalesOrderReport.CategoryRevenue[0].Amount.ToString("C");
        this.mssales.Text = "MS: " + SalesOrderReport.CategoryRevenue[1].Amount.ToString("C");
        this.NVideaSales.Text = "NVIDEA: " +SalesOrderReport.CategoryRevenue[2].Amount.ToString("C");

        // Unit Sold summary
        C1ChartBinding unitLine = new C1ChartBinding();
        unitLine.XField = "Product";
        unitLine.YField = "Units";
        unitsummarychart.Type = LineChartType.Area;
                
        unitsummarychart.ShowChartLabels = false;
        unitsummarychart.DataBindings.Add(unitLine);
        unitsummarychart.DataSource = SalesOrderReport.CategoryRevenue;
        unitsummarychart.DataBind();
        unitsummarychart.SeriesList[0].FitType = LineChartFitType.Spline;
        unitsummarychart.AutoResize = true;
       
        #region Styles
        ChartStyleFill chartfill = new ChartStyleFill();
        chartfill.Color = Color.Beige;
        ChartStyle chstyle = new ChartStyle();
        chstyle.Fill.Color = Color.FromName("#ff9900"); ;
        chstyle.Fill.Type = ChartStyleFillType.Default;
       
        this.unitsummarychart.SeriesStyles.Add(chstyle);
       
        #endregion

    }
Exemple #4
0
    /// <summary>
    /// Create chart for Existing customer vs New customer
    /// </summary>
    private void CreateNewCustomerChart()
    {
        C1BarChart1.SeriesList.Clear();
        C1BarChart1.DataBindings.Clear();

        C1ChartBinding bar = new C1ChartBinding();
        bar.XField = "NewProduct";
        bar.XFieldType = ChartDataXFieldType.String;
        bar.YField = "NewCustomer";
        bar.YFieldType = ChartDataYFieldType.Number;
     
        C1ChartBinding bar1 = new C1ChartBinding();
        bar1.XField = "OldProduct";
        bar1.XFieldType = ChartDataXFieldType.String;
        bar1.YField = "OldCustomer";
        bar1.YFieldType = ChartDataYFieldType.Number;
        this.C1BarChart1.Shadow = true;

        this.C1BarChart1.Axis.X.TextStyle = new ChartStyle { Fill = new ChartStyleFill { Color = Color.BlueViolet } };
        this.C1BarChart1.DataBindings.Add(bar);
        this.C1BarChart1.DataBindings.Add(bar1); 
        this.C1BarChart1.DataSource = SalesOrderReport.CustomerRatio;
        this.C1BarChart1.DataBind();
        this.C1BarChart1.SeriesStyles[0].Fill = new ChartStyleFill { Color = Color.FromName("#ff9900"),Type=ChartStyleFillType.Default };
        this.C1BarChart1.ClusterRadius = 12;
       
        #region Styles
        ChartStyleFill chartfill = new ChartStyleFill();
        chartfill.Color = Color.Beige;

        ChartStyleFill chartfillstyle = new ChartStyleFill();
        chartfillstyle.Type = ChartStyleFillType.Default;
        chartfillstyle.Color = Color.FromName("#ff9900");

        ChartStyle chstyle = new ChartStyle();
        chstyle.Fill.Color = Color.FromName("#ff9900");
        ChartStyle chstyle1 = new ChartStyle();
        chstyle1.Fill.Color = Color.FromName("#ff0000");
                
        #endregion

    }