Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Float values in bar chart (Read 8748 times)
madhan1
Full Member
***
Offline


FOLLOW NO ONE BUT LEARN
FROM EVERY ONE ..

Posts: 101
Location: India
Joined: Feb 17th, 2010
Float values in bar chart
Sep 6th, 2012 at 8:58am
Print Post  
Dear Stoyan,

               i am using bar chart(v3.4). when i am using the integer values it is working fine.but when i am trying for the float values it displaying the value wrong. kindly help
  

if you want something then go and grab it
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Float values in bar chart
Reply #1 - Sep 6th, 2012 at 10:13am
Print Post  
I can't see an problem with float values. If you are assigning them from the property grid, are you using "." as the fraction separator and "," to separate the values in the series?
  
Back to top
 
IP Logged
 
madhan1
Full Member
***
Offline


FOLLOW NO ONE BUT LEARN
FROM EVERY ONE ..

Posts: 101
Location: India
Joined: Feb 17th, 2010
Re: Float values in bar chart
Reply #2 - Sep 6th, 2012 at 11:26am
Print Post  
Dear stoyan,

     here the following code i am using

double[] pw_median = new double[count];
string[] pw_name = new string[count];
for (int i = 0; i < count; i++)
{
pw_median[i]=Convert.ToDouble(ds.Tables[0].Rows[i]["Median_HB"]);

pw_name[i] = (ds.Tables[0].Rows[i]["phc_name"].ToString());
}

BarChart7.XLabels = pw_name;
//double[] data ={ 10.4,10.6,10.4 }; now
BarChart7.Data.Clear();
BarChart7.Data = pw_median;
BarChart7.TitleText = "HB Median ";


while we are binding the data we receive the values of ( 10.4,10.6,10.4)
  

chart.JPG (Attachment deleted)

if you want something then go and grab it
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Float values in bar chart
Reply #3 - Sep 6th, 2012 at 12:53pm
Print Post  
Apparently the control decides you are giving it date values... Set barChart1.YAxisSettings.DataFormat = DataFormat.Number and it should work better.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
madhan1
Full Member
***
Offline


FOLLOW NO ONE BUT LEARN
FROM EVERY ONE ..

Posts: 101
Location: India
Joined: Feb 17th, 2010
Re: Float values in bar chart
Reply #4 - Sep 7th, 2012 at 8:05am
Print Post  
Thanks stoyan
it works fine
  

if you want something then go and grab it
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint