| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 
 | protected void Page_Load(object sender, EventArgs e)
    {
        yaflaSVG2DPie oChart = new yaflaSVG2DPie();
        oChart.SVGTitle = "Statistique de transfert d'article";
 
        MySqlConnection conn = new MySqlConnection("server=localhost;database=gestion;uid=root;password=;");
        //SqlConnection oSqlConnection = new SqlConnection("Initial Catalog=ComputerParts;Data Source=localhost;Integrated Security=SSPI;");
        string req="Select id_stat,titre_rubrique from table_stat ";
        MySqlCommand cmd = new MySqlCommand(req,conn);
        //cmd.Connection=conn;
        //cmd.CommandText=
        //SqlCommand oSqlCommand = new SqlCommand("GET_COMPUTER_PARTS", oSqlConnection);
        cmd.CommandType= CommandType.StoredProcedure;
        //oSqlCommand.CommandType = CommandType.StoredProcedure;
        DataSet dataset = new DataSet();
       // DataSet oResultDataset = new DataSet();
        MySqlDataAdapter adapter=new MySqlDataAdapter(cmd);
        //SqlDataAdapter oDataAdapter = new SqlDataAdapter(oSqlCommand);
        adapter.Fill(dataset);
        //oDataAdapter.Fill(oResultDataset);
 
        oChart.SVGDataSource = dataset.Tables[0];
        oChart.SVGDynamic = true;
        oChart.SVGWidthCM = 15;
        oChart.SVGHeightCM = 10;
        oChart.SVGFontHeightRatio = 1.7;
        oChart.SVGLabels = true;
        oChart.SVGLabelRadialDistance = 0.75f;
        oChart.SVGLegendSizePercentage = 35;
        oChart.SVGLabelRadialDivisor = 16.0f;
        oChart.CaptionField = "RUBRIQUE";
        oChart.ValueField = "NOMBRE";
        oChart.SVGXML.Save(Context.Response.OutputStream);
    } | 
Partager