View unanswered posts | View active topics It is currently Thu Mar 28, 2024 10:01 am



Reply to topic  [ 9 posts ] 
Upgrading 
Author Message
Regular pChart user
Regular pChart user

Joined: Sun Dec 05, 2010 8:07 pm
Posts: 9
Post 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


Sun Dec 05, 2010 8:11 pm
Profile
Experienced pChart user
Experienced pChart user

Joined: Thu Dec 02, 2010 3:03 pm
Posts: 36
Location: Somerville, MA, USA
Post Re: Upgrading
Rewrite code, but for pChart 2. Only then you'll get a normal result.

_________________
Image


Mon Dec 06, 2010 1:27 am
Profile WWW
Site Admin
Site Admin
User avatar

Joined: Thu Dec 02, 2010 2:31 pm
Posts: 409
Location: France
Post 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.


Mon Dec 06, 2010 11:02 am
Profile WWW
Regular pChart user
Regular pChart user

Joined: Sun Dec 05, 2010 8:07 pm
Posts: 9
Post 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.


Mon Dec 06, 2010 11:57 pm
Profile
Post 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);


Tue Dec 07, 2010 2:25 pm
Site Admin
Site Admin
User avatar

Joined: Thu Dec 02, 2010 2:31 pm
Posts: 409
Location: France
Post 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.


Tue Dec 07, 2010 3:32 pm
Profile WWW
Post 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


Tue Dec 07, 2010 4:26 pm
Post Re: Upgrading
Update ...

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

thanks again


Tue Dec 07, 2010 4:43 pm
Post 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-)


Wed Jan 12, 2011 2:52 pm
Display posts from previous:  Sort by  
Reply to topic   [ 9 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


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: