Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POST requests in the example do not work #30

Open
GoogleCodeExporter opened this issue Jun 1, 2015 · 3 comments
Open

POST requests in the example do not work #30

GoogleCodeExporter opened this issue Jun 1, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Visit view.html from a default install
2. See the broken images where the charts should be


I am unable to use POST requests with this library.  The images do not render 
when I visit view.html in the examples.

Original issue reported on code.google.com by eva...@gmail.com on 14 Oct 2010 at 5:38

@GoogleCodeExporter
Copy link
Author

I think that I was able to replicate your problem.
Try to substitute the & with & in the <img> call.

Please let me know it this solve your issue.

Original comment by bardellie on 15 Oct 2010 at 12:41

@GoogleCodeExporter
Copy link
Author

I do believe that was the issue.  As a workaround to getting POST requests to 
work, I used the output of getUrl() to create an array.  I then POSTed that 
data.  It did not work unless substituted "&" for "&".  It would be great if 
this were changed in the source so that renderImage would work.

Thanks

Original comment by eva...@gmail.com on 19 Oct 2010 at 12:13

@GoogleCodeExporter
Copy link
Author

I am using this piece of code to use the array of employee number retrieved 
from my oracle database to construct the line chart. However, all I see is a 
horizontal line in at the maximum y-axis value.

<?php
require_once("gChart.php");
$lineChart = new gLineChart(300, 200);
//my query
$query1 = "select o.CUSTOMER_NO, ceil(TOTAL_AMT/100000) hundred_thou
from oes2a.customer join oes2a.orders o on customer.customer_no=o.customer_no
order by total_amt desc";

// I have a database connection, and query execution code here..

while (($row = oci_fetch_array($s, OCI_BOTH))) {
    // Use the uppercase column names for the associative array indices
    $arr1[] = $row[0];
    $arr2[] = $row[1];
}

$lineChart->addDataSet($arr1);
$lineChart->setLegend(array('Total Amount'));
$lineChart->setColors(array('ED237A'));
$lineChart->setVisibleAxes(array('x','y'));
$lineChart->setDataRange(0,100);
$lineChart->setLegendPosition('t');
// axisnr, from, to, step
$lineChart->addAxisRange(0,0,500);
$lineChart->addAxisRange(1,0,100);

$lineChart->setGridLines(25,10);
$lineChart->renderImage(true);
?>

Original comment by pkrl2...@gmail.com on 21 Feb 2011 at 4:29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant