PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index PDFsharp - moved to http://forum.pdfsharp.net/
Please visit the new PDFsharp forum at http://forum.pdfsharp.net/
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Tick mark on horizontal axis...

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Bug Reports - moved to http://forum.pdfsharp.net/
View previous topic :: View next topic  
Author Message
ldelabre



Joined: 12 Apr 2008
Posts: 10

PostPosted: Sat Jun 14, 2008 4:35 pm    Post subject: Tick mark on horizontal axis... Reply with quote

Hi !

I couldn't get tick marks on a horizontal axis (using MigraDoc w/ PdfSharp), after comparing HorizontalXAvisRenderer and VerticalYAxisRenderer, here's the trick :

Changes in PDFsharp\Charting\Charting\PdfSharp.Charting.Renderers\HorizontalXAxisRenderer.cs

inside Draw(), at line 160 after
Code:

      LineFormatRenderer lineFormatRenderer = new LineFormatRenderer(gfx, xari.LineFormat);

add the following
Code:

      LineFormatRenderer minorTickMarkLineFormat = new LineFormatRenderer(gfx, xari.MinorTickMarkLineFormat);
      LineFormatRenderer majorTickMarkLineFormat = new LineFormatRenderer(gfx, xari.MajorTickMarkLineFormat);


then at line 176 replace
Code:

          lineFormatRenderer.DrawLine(points[0], points[1]);

with
Code:

          minorTickMarkLineFormat.DrawLine(points[0], points[1]);


and at line 194 replace
Code:

          lineFormatRenderer.DrawLine(points[0], points[1]);

with
Code:

          majorTickMarkLineFormat.DrawLine(points[0], points[1]);


This work it out for me Wink

Have a nice day !
Back to top
View user's profile Send private message
motamman



Joined: 07 Jan 2009
Posts: 3

PostPosted: Wed Jan 07, 2009 8:06 pm    Post subject: devilish xaxis major/minorticks Reply with quote

So i thought maybe your solution would solve my problem.

Nope.

the yaxis minor/major ticks work perfectly but the xaxis majortick is always = 1 and minortick = 0.5. (BTW that's the default set up in HorizontalXAxisRenderer and VerticalXAxisRenderer.)

the process is getting into the loop that I believe is setting the major and minor values but the value isn't changing. There has to be something wrong with the variables used in that loop but I haven't found it yet.

Anyone had any luck fixing this?

Cheers,
Mo
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Bug Reports - moved to http://forum.pdfsharp.net/ All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © phpBB Group. Hosted by phpBB.BizHat.com


Start Your Own YouTube Clone

Free Web Hosting | Free Forum Hosting | FlashWebHost.com | Image Hosting | Photo Gallery | FreeMarriage.com

Powered by PhpBBweb.com, setup your forum now!
For Support, visit Forums.BizHat.com