PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Thu Apr 25, 2024 4:25 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Mon May 28, 2012 1:49 pm 
Offline

Joined: Thu May 10, 2012 1:09 am
Posts: 4
Location: Quebec, Canada
Hi,

I'm using MigraDoc document object and I need to add a BarStacked2D in a table cell, but i didn't find a way to do it.

All i have for the moment :

Code:
Chart chart = table.Rows[1].Cells[2].AddChart(ChartType.BarStacked2D);
chart.Width = Unit.FromCentimeter(5);
chart.Height = Unit.FromCentimeter(6);

Series series = chart.SeriesCollection.AddSeries();
series.ChartType = ChartType.BarStacked2D;
series.Add(new double[] { 5});


but this code doesn't show a Barstacked2D, only a Bar 2D. :?

I also want to know if i can hide the chart.XAxis and chart.YAxis and only display the stacked bar in the cell

Thank you in advance for any help

regards


Top
 Profile  
Reply with quote  
PostPosted: Mon May 28, 2012 2:52 pm 
Offline

Joined: Thu May 10, 2012 1:09 am
Posts: 4
Location: Quebec, Canada
Hi,

So now i can display a real BarStacked2D. In fact, i'vs forgot the second series :oops:

So that's what i have so far :
Code:
Chart chart = table.Rows[1].Cells[2].AddChart(ChartType.BarStacked2D);
chart.Width = Unit.FromCentimeter(5);
chart.Height = Unit.FromCentimeter(2);

Series series = chart.SeriesCollection.AddSeries();
series.Name = "Series 1";
series.Add(new double[] { 2 });

series = chart.SeriesCollection.AddSeries();
series.Name = "Series 2";
series.Add(new double[] { 15 });


now i need to find a way to hide the Axis, but i don't know if its possible .
If not, is there a way to draw only the stackebar in a table cell ?

Thank you again


Top
 Profile  
Reply with quote  
PostPosted: Mon Apr 25, 2016 2:21 pm 
Offline

Joined: Sun Apr 24, 2016 6:43 pm
Posts: 3
Did you solve the issue?


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 334 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group