Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
40
Wrong rendering of Doughnut Chart
posted

Hello all,

I am new to the Infragistics Charts and Documents.

I use folliowing libraries:
- .Net 4.0
- Infragistics NetAdvantage 2009.2

I created a DoughnutChart and can display it on my WinFormApp and I can export it to the PDF file.
The Data comes from DB.

Sometimes i get only one Data-Item to display/render.
Aslo DoughnutChart with only one row.

By displaying it on my WinFormApp there is no problem,
but if I render it to the PDF file the chart has wrong shape.

Here is my exsample code:

var chart = new UltraChart
                {
                   ChartType =
ChartType.DoughnutChart,
                   Data = {DataSource = 
new [] {42}}
                };
chart.Data.DataBind();

var report = new Report();
var section = report.AddSection();
var band = section.AddBand();
var canvas = band.AddCanvas();
canvas.Width =
new FixedWidth(200);
canvas.Height =
new FixedHeight(200);
var graphics = canvas.CreateGraphics();
chart.RenderPdfFriendlyGraphics(graphics, 200, 200);
try
{
   report.Publish(
"out.pdf", FileFormat.PDF);
  
   new
Process{StartInfo = {FileName = "out.pdf"}}.Start();
}
catch (Exception ex)
{
   MessageBox.Show(ex.Message);
}


With this code I get following result:

 

I would like to have a round shape of my chart.

Thanks.

Best regards
Vaceslav

Parents Reply Children