0

zedgraph dllを使用したグラフにデータを表示したいWebアプリケーションがありましたが、zedグラフではなくシステムdllを使用してのみグラフを描画したい

zed グラフのコードは次のとおりです。

protected void ZedGraphWeb1_RenderGraph(ZedGraph.Web.ZedGraphWeb webObject, System.Drawing.Graphics g, ZedGraph.MasterPane masterPane)
    {

        // Get the GraphPane so we can work with it
        GraphPane myPane = masterPane[0];

        // Set the title and axis labels        

        myPane.XAxis.Title.Text = "Order Status";
        myPane.YAxis.Title.Text = "No Of Orders";
        myPane.XAxis.Type = AxisType.Text;
        string[] labels = { "Pending", "Elapsed", "Dispatched", "Delivered" };
        myPane.XAxis.Scale.TextLabels = labels;

        //myPane.XAxis.Scale.TextLabels = arr1;

        // Declare a BarItem:- Bar Item is used for creating a bar     
        BarItem myCurve;
        BarItem myCurve2;
        // Declare a LineItem:- LineItem is used for creating a line     

        PointPairList listEcoPack = new PointPairList();
        PointPairList listProduct = new PointPairList();

        double[] lstEcoPack = new double[4];
        double[] lstProduct = new double[4];


                   OrderStatusoutput objOrderStatusoutput = new OrderStatusoutput();
            OrderStatusinput objOrderStatusinput = new OrderStatusinput();

                objOrderStatusinput.StartDate = Convert.ToDateTime(txtfromdatepacks.Text).ToShortDateString();
                objOrderStatusinput.EndDate = Convert.ToDateTime(txttodatepacks.Text).ToShortDateString();

                objOrderStatusoutput.dsorderstatusresult = objHrservice.OrderStatus(objOrderStatusinput).dsorderstatusresult;
                objHrservice.Close();

                DataSet dsoreder = objOrderStatusoutput.dsorderstatusresult;
                double EcoPendingOrders = Convert.ToDouble(dsoreder.Tables[4].Rows[0]["PendingOrders"]);
                double EcoElapsed = Convert.ToDouble(dsoreder.Tables[4].Rows[0]["Elapsed"]);
                double EcoDispatchedOrders = Convert.ToDouble(dsoreder.Tables[4].Rows[0]["DispatchedOrders"]);
                double EcoDeliveredOrders = Convert.ToDouble(dsoreder.Tables[4].Rows[0]["DeliveredOrders"]);

                double ProPendingOrders = Convert.ToDouble(dsoreder.Tables[3].Rows[0]["PendingOrders"]);
                double ProElapsed = Convert.ToDouble(dsoreder.Tables[3].Rows[0]["Elapsed"]);
                double ProDispatchedOrders = Convert.ToDouble(dsoreder.Tables[3].Rows[0]["DispatchedOrders"]);
                double ProDeliveredOrders = Convert.ToDouble(dsoreder.Tables[3].Rows[0]["DeliveredOrders"]);





                lstEcoPack[0] = EcoPendingOrders;
                lstEcoPack[1] = EcoElapsed;
                lstEcoPack[2] = EcoDispatchedOrders;
                lstEcoPack[3] = EcoDeliveredOrders;


                lstProduct[0] = ProPendingOrders;
                lstProduct[1] = ProElapsed;
                lstProduct[2] = ProDispatchedOrders;
                lstProduct[3] = ProDeliveredOrders;
            }
4

2 に答える 2

0
        GraphPane pane = zedGraphControl1.GraphPane;

        pane.Title.Text = "Graph By Alax Technology";
        pane.XAxis.Title.Text = "EMPLOYEE";
        pane.YAxis.Title.Text = "SALARY";

        PieItem Attendence = pane.AddPieSlice(Convert.ToDouble(textBox1.Text), System.Drawing.Color.Orange, 0f, "Attendence");
        PieItem Grown = pane.AddPieSlice(Convert.ToDouble(textBox2.Text), System.Drawing.Color.White, 0f, "Grown Up");
        PieItem Salary = pane.AddPieSlice(Convert.ToDouble(textBox3.Text), System.Drawing.Color.Green, 0f, "Salary Increase");

        Attendence.LabelType = PieLabelType.Value;
        Grown.LabelType = PieLabelType.Value;
        Salary.LabelType = PieLabelType.Value;

        zedGraphControl1.AxisChange();
        zedGraphControl1.Invalidate();
        zedGraphControl1.Refresh();
于 2014-03-29T06:40:33.673 に答える
0

ASP.NET で Microsoft のチャート コントロールを試して ください http://www.4guysfromrolla.com/articles/072209-1.aspx

于 2013-08-21T12:56:06.933 に答える