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

Upgrading
http://wiki.pchart.net/forum/viewtopic.php?f=3&t=4
Page 1 of 1

Author:  mrbobdobolina [ Sun Dec 05, 2010 8:11 pm ]
Post subject:  Upgrading

Hi.

I'm currently reworking some code for a personal project which uses pChart 1.27. How easy is it to upgrade to version 2?

-mrbobdobolina

Author:  mice32 [ Mon Dec 06, 2010 1:27 am ]
Post subject:  Re: Upgrading

Rewrite code, but for pChart 2. Only then you'll get a normal result.

Author:  jean-damien [ Mon Dec 06, 2010 11:02 am ]
Post subject:  Re: Upgrading

Hi mrbobdobolina,

The coding philosophy has deeply changed with this new version. You'll have to rewrite all your code to adapt it. Hopefully, I strongly believe that it will be quite easy because of the function naming and the new help interface.

I'll publish a note on the wiki explaining how to plan an upgrade.

Kind regards,
JD.

Author:  mrbobdobolina [ Mon Dec 06, 2010 11:57 pm ]
Post subject:  Re: Upgrading

I've downloaded the code and given it a whirl.

I really like the way everything is laid out now. It's definitely easier to use, but it will take some time to port things over. I managed to get my Pie Charts switched over, but i'm having some trouble with the bar charts.

Hopefully I'll have time later this week to play around with some of the other things I need to do.

Author:  bgengine [ Tue Dec 07, 2010 2:25 pm ]
Post subject:  Re: Upgrading

HI, I'm in the process of upgrading ...

I'm stuck with the new drawscale function -
My 1.27.d version is below - but I can't understand the format of the new function - even from the documentation - could anyone give me some pointers ?
thanks


this is the 1.27.d version of my drawscale function( $scaleskip is a pre set variable)
$Test->drawScale($DataSet->GetData(),SCALE_NORMAL,0,0,0,TRUE,0,2,TRUE,$scale_skip);

Author:  jean-damien [ Tue Dec 07, 2010 3:32 pm ]
Post subject:  Re: Upgrading

There is no special tweak in your call :
Code:
$Test->drawScale($DataSet->GetData(),SCALE_NORMAL,0,0,0,TRUE,0,2,TRUE,$scale_skip);


This should be translated to something like :
Code:
$Settings = array("LabelSkip"=>$scale_skip);
$myPicture->drawScale($Settings);


..assuming that your pImage object is called $myPicture.

Author:  Guest [ Tue Dec 07, 2010 4:26 pm ]
Post subject:  Re: Upgrading

Thanks JD,

This makes sense to me and I've tried it - but for some reason it's not working ...
I'll play around with a bit more and see if I can find the problem


regards

Author:  Guest [ Tue Dec 07, 2010 4:43 pm ]
Post subject:  Re: Upgrading

Update ...

Eventually got this working - silly mistake on my part ..

thanks again

Author:  Guest [ Wed Jan 12, 2011 2:52 pm ]
Post subject:  Re: Upgrading

jean-damien wrote:
I'll publish a note on the wiki explaining how to plan an upgrade.


I am looking forward to this. 8-)

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