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

client template in <TooltipsAppearance/> which is databinded to a dataset from the database

0 Answers 80 Views
Chart (HTML5)
This is a migrated thread and some comments may be shown as answers.
Qurat
Top achievements
Rank 1
Qurat asked on 13 Mar 2013, 06:11 AM
i am trying to use client template(from the< toolstipApperance/>) for my radhtmlchart (type:pie) but i am unable to do it because i am using a dataset from the DB.
i tried using this 
  //PieChart1.PlotArea.Series[0].TooltipsAppearance.ClientTemplate = ds.Tables[0].ToString();
it is also not working.
please help me i have to submit the project and i have very less time

here is a piece of code :
 DataSet ds = DbHelper.ReadTable(sql1);
    
        if (ds != null && ds.Tables[0] != null && ds.Tables[0].Rows != null && ds.Tables[0].Rows.Count > 0)
        {
            //string[] arr = new string[15];
           
            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                SeriesItem si = new SeriesItem();
                si.YValue = (decimal)ds.Tables[0].Rows[i]["VoteShare"];
                si.Name = (string)ds.Tables[0].Rows[i]["PartyName"];
                 
                si.BackgroundColor = System.Drawing.ColorTranslator.FromHtml((string)ds.Tables[0].Rows[i]["PartyColor"]);
                PieChart1.PlotArea.Series[0].Items.Add(si);
                //PieChart1.PlotArea.Series[0].TooltipsAppearance.ClientTemplate = (string)ds.Tables[0].Rows[i]["PartyName"];
                //arr[i]=si.Name.ToString();
                
            }

            //PieChart1.PlotArea.Series[0].TooltipsAppearance.ClientTemplate = ds.Tables[0].ToString();
            
        

attaching my project files

also there are other related columns in the db like fullnames of the abbreviation.
i want to display that through client template.
regards
@nnu shah
punjab lok sujag

No answers yet. Maybe you can help?

Tags
Chart (HTML5)
Asked by
Qurat
Top achievements
Rank 1
Share this question
or