This topic is locked

Displaying multiple charts

9/29/2007 8:13:49 AM
PHPRunner General questions
R
Redshift author

I am using line charts to display 7 parameters over 3 charts I have followed the instructions to show multiple charts on one page which works perfectly.
The problem is that when I use the search page to refine the chart data only the first chart is modified the other two continue to display all the values in the table.
Is there a way I can make the search page for "Readings_Chart" affect Readings_Chart 1&2"

<TD align=middle><BR>{doevent name="ChartOnLoad"}
{show_chart name="_Readings_Chart" width=970 height=530}<BR>

{show_chart name="_Readings_Chart1" width=970 height=530}<BR>

{show_chart name="_Readings_Chart2" width=970 height=530}<BR><BR></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></BODY></HTML>


Thanks

Alexey admin 10/1/2007

Hi,
here is what you can do.

Open generated ..._chart.php file with a text editor, find this code snippet:

if(@$_REQUEST["a"]=="advsearch")

{

$_SESSION[$strTableName."_asearchnot"]=array();

...........

$_SESSION[$strTableName."_pagenumber"]=1;

}



and copy it to clipboard.
Proceed to Events tab in PHPRunner and add this code to Chart - Before display event.

$strTableName="_Readings_Chart1";

if(@$_REQUEST["a"]=="advsearch")

{

...

}

$strTableName="_Readings_Chart2";

if(@$_REQUEST["a"]=="advsearch")

{

...

}


where

if(@$_REQUEST["a"]=="advsearch")

{

...

}

is a code you copied from ..._chart.php file
Please note that chart names should be spelled exactly the same way as they appear on Datasource tables tab in PHPRunner.

R
Redshift author 10/6/2007

Alexy, sorry for the delay replying, but I was away on business for the week.

But thanks very much this worked perfectly:)