This is a migrated thread and some comments may be shown as answers.

pie chart problem..

0 Answers 114 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
oli koli
Top achievements
Rank 1
oli koli asked on 15 Mar 2010, 05:04 PM
Hello to all , I  am new at this coding...
My files explains everything . Just want to see the values at the right of the graph  like  AA  - BB... I couldn't change it according coming from db. Just writes there "genelpuani"

my code :

private void chart1_NeedDataSource(object sender, EventArgs e)  
    {  
        Telerik.Reporting.Processing.ReportItemBase itemBase = (Telerik.Reporting.Processing.ReportItemBase)sender;  
        int hastaID = int.Parse(itemBase.DataObject["HastaID"].ToString());  
        int formid = int.Parse(itemBase.DataObject["formid"].ToString());  
 
        Telerik.Reporting.Processing.Chart procChart = (Telerik.Reporting.Processing.Chart)sender;  
        string sql = @"SELECT        kat.KategoriName as kategoriismi, genelpuan.Puan as genelpuani
                                FROM  GenelPuanlama AS genelpuan INNER JOIN
                     Kategoriler AS kat ON genelpuan.KategoriID = kat.KategoriID WHERE (genelpuan.FormID='" + formid.ToString() + "') AND (genelpuan.HastaID ='" + hastaID.ToString() + "')";  
        string connectionString = "Data Source=.\\SQLEXPRESS;AttachDbFilename=|DataDirectory|\\Database.mdf;Integrated Security=True;User Instance=True";  
        SqlDataAdapter adapter = new SqlDataAdapter(sql, connectionString);  
        DataTable datatable = new DataTable();  
        adapter.Fill(datatable);  
        procChart.DataSource = datatable;  
        //chart1.IntelligentLabelsEnabled = true;  
        //chart1.PlotArea.XAxis.DataLabelsColumn = "kategoriismi";  
         
          
        //chart1.PlotArea.XAxis.Appearance.LabelAppearance.RotationAngle = 300;  
        chart1.PlotArea.XAxis.Appearance.TextAppearance.TextProperties.Color = System.Drawing.Color.DarkBlue;  
          
        chart1.PlotArea.Appearance.Dimensions.Margins.Bottom = Telerik.Reporting.Charting.Styles.Unit.Percentage(30);  

No answers yet. Maybe you can help?

Tags
General Discussions
Asked by
oli koli
Top achievements
Rank 1
Share this question
or