Sign in to follow this  
Ayan Pal

Combination Chart addDatasetsFromDatabase problem

Recommended Posts

I am having 2 problems creating a combination chart. The following code creates the FiscaYear categories twice on the horizontal axis and the square brackets in the parameter array for "render as line" generates an error message: Parse error: syntax error, unexpected '[' in C:Inetpubwwwroottest.php on line 40

 

 

 

# Add a new dataset with dataset parameters

 

$strQuery = "SELECT YEAR__c AS FiscalYear, GENERALFUNDREVENUES__c AS Revenues, GENERALFUNDEXPENDITURES__c AS Expenses

 

FROM sforce_account INNER JOIN sforce_annualdata__c ON sforce_account.Id = sforce_annualdata__c.Municipality_ID__c

 

WHERE sforce_account.Id=0013000000XzMM2AAN'

 

Order By Year__c";

 

$result = mysql_query($strQuery);

 

$FC->addDatasetsFromDatabase($result, "FiscalYear", "Revenues;Expenses");

 

 

 

# Add a new dataset with dataset parameters

 

$datasetParamArray=["renderAs='Line'];

 

$strQuery = "SELECT YEAR__c AS FiscalYear, FUNDBALANCE__c AS FundBalance

 

FROM sforce_account INNER JOIN sforce_annualdata__c ON sforce_account.Id = sforce_annualdata__c.Municipality_ID__c

 

WHERE sforce_account.Id='0013000000XzMM2AAN'

 

Order By Year__c";

 

$result = mysql_query($strQuery);

 

$FC->addDatasetsFromDatabase($result, "FiscalYear", "FundBalance;", $datasetParamArray);

Share this post


Link to post
Share on other sites

HI Buzz Brown,

Change the line of code

$datasetParamArray=["renderAs=Line'];

to

$datasetParamArray= array("renderAs='Line'");
Edited by Guest

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this