$this->load->model conflicing with PHPGraphLib |
[eluser]Jona[/eluser]
Hi All, I'm trying to use PHPgraphlib as found here: http://www.ebrueggeman.com/index.php to render some graphs and it works really well with the following code: Code: function test(){ The image xxx could not be displayed, because it contains errors. The model code works fine elsewhere so it shouldn't be throwing a php error. The code for graph.php is as follows: Code: function draw_single_graph($dataArray,$title="Graph",$width=500,$height=450){ Any help on this would be massively appreciated, it seems like it should work!! Cheers Jona
[eluser]mandril[/eluser]
i think the problem is the require after the load model..
[eluser]Jona[/eluser]
Have tried the following: Code: function test(){ Cheers Jona
[eluser]CJL01[/eluser]
Did you ever find out how to do this? I'm also trying to use PHPGraphLib with CI and having the same problem. Thanks
[eluser]Jona[/eluser]
Hi, I never found out how to make this work properly, instead I modified the way I was using the library to save the graph to a file and then load that graph into the page. Not ideal but it worked..... I did also consider using google charts to generate my charts for me.
[eluser]CJL01[/eluser]
Thanks. I'm currently using Google charts, but I've got a lot of data points and I'm finding that accurately labeling the x-axis is getting hard - they seem to simply evenly space labels, and I can't vertically orient the label text. They are definitely very simple to implement though! Do you have some sample code for how you save the PHPGraphLib chart off as a file? That would be a great help for me. Thanks
[eluser]Jona[/eluser]
Hi there, I've attached the modified version of phpgraphlib. Basically you call createGraph passing it a filename, be aware this may have all kinds of bugs and security holes in it, use at your own risk! Cheers Jona
|
Welcome Guest, Not a member yet? Register Sign In |