View unanswered posts | View active topics It is currently Tue May 28, 2024 2:16 pm



Reply to topic  [ 2 posts ] 
import from CSV 
Author Message
pChart user
pChart user

Joined: Fri Jan 21, 2011 2:28 pm
Posts: 4
Post import from CSV
Hi,

Very sorry....
In previous version of Pchart:

$DataSet->ImportFromCSV($file,",",$tab,TRUE,0);
$DataSet->AddAllSeries();

was able to import all my data from a csv file (header as name of the series and first column as X axis labels...), $tab being the list os array

Could you help me for translation in new version of pchart?

AddAllSeries() desapeared
the colum for X axis label in import CVS desapeared.

Best regards


Mon Jan 24, 2011 8:35 am
Profile
Site Admin
Site Admin
User avatar

Joined: Thu Dec 02, 2010 2:31 pm
Posts: 409
Location: France
Post Re: import from CSV
Hi,

This function has bee rewritten but still have the same name : importFromCSV(). You now have to provide its parameters through an array. This would be translated this way :

Code:
$myData->ImportFromCSV($file,array("Delimiter"=>",","GotHeader"=>TRUE));


You can mark all series as drawable using the drawAll() function. By default all imported series will be drawable so this call isn't needed.

To define the X data serie, use the setAbscissa() function giving it the name of your abscissa serie (should be the header value of this column in the CSV file).

Kind regards,
JD.


Mon Jan 24, 2011 8:43 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 2 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:  
cron