Buzz Brown Report post Posted May 20, 2010 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
Ayan Pal Report post Posted May 21, 2010 (edited) HI Buzz Brown, Change the line of code $datasetParamArray=["renderAs=Line']; to $datasetParamArray= array("renderAs='Line'"); Edited May 21, 2010 by Guest Share this post Link to post Share on other sites