pChart 2.x forum
http://wiki.pchart.net/forum/

LabelSkip Tick colors
http://wiki.pchart.net/forum/viewtopic.php?f=3&t=18
Page 1 of 1

Author:  rdubya [ Fri Dec 10, 2010 9:52 pm ]
Post subject:  LabelSkip Tick colors

Hey Guys,

Great product. Just a suggestion that would be good. I actually added it myself to the library. When you do skip labels and only label certain ticks, its hard to tell which ticks are actually labeled. It would be nice to be able to make them a different color. Here is what I added, and a few other lines to pass the color values etc...

if ( $InnerTickWidth !=0 || $OuterTickWidth != 0 )
if ($ID % $LabelSkip == 1)
$this->drawLine($XPos,$YPos-$InnerTickWidth,$XPos,$YPos+$OuterTickWidth,array("R"=>$SkipTickR,"G"=>$SkipTickG,"B"=>$SkipTickB,"Alpha"=>$SkipTickAlpha));
else
$this->drawLine($XPos,$YPos-$InnerTickWidth,$XPos,$YPos+$OuterTickWidth,array("R"=>$TickR,"G"=>$TickG,"B"=>$TickB,"Alpha"=>$TickAlpha));

Thanks
Ryan

Author:  jean-damien [ Mon Dec 13, 2010 2:10 pm ]
Post subject:  Re: LabelSkip Tick colors

Indeed this feature was missing. I've extended the drawScale function (2.0.7) to allow a bit more customization. The following attributes now applies to the skipped ticks :

$SkippedAxisTicks
$SkippedAxisR
$SkippedAxisG
$SkippedAxisB
$SkippedAxisAlpha
$SkippedTickR
$SkippedTickG
$SkippedTickB
$SkippedTickAlpha
$SkippedInnerTickWidth
$SkippedOuterTickWidth

Kind regards,
JD.

Author:  jean-damien [ Mon Dec 13, 2010 2:43 pm ]
Post subject:  Re: LabelSkip Tick colors

How it looks like :

Image

Author:  rdubya [ Mon Dec 13, 2010 6:46 pm ]
Post subject:  Re: LabelSkip Tick colors

Awesome! Thanks!

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/