Jump to content
Software FX Community

passing values for pie chart


User (Legacy)
 Share

Recommended Posts

Hi,

I am using chartfx interner 5.5 and using C# .net by using a wrapper class

for the com object.

I am having problems with the pie charts.

With the same dataset i am getting different behaviour for pie and bar.

Bar looks correct but pie is reduced in size as it expects one more pie

which is not visible because there is no data for that pie. So we see an

empty space to the right of the pie.

I am also sending a code snippet used to output this.

public void setSeries(ChartFXClass chart, DataTable table)

{

string chtType=ChartType.ToString();

DataRowCollection rows = table.Rows;

for(int i=0; i<table.Rows.Count; i++)

{

for(int j=0; j<table.Columns.Count; j++)

{

DataRow r = rows[i];

if (chtType.Equals("bar"))

{

chart.set_ValueEx(Convert.ToByte(i),j,Convert.ToDouble(r[j]));

}

else

{

chart.set_ValueEx(Convert.ToByte(j),i,Convert.ToDouble(r[j]));

}

}

}

}

Please help.

Thanks,

Kunal Agrawal

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...