$this->load->model conflicing with PHPGraphLib - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: $this->load->model conflicing with PHPGraphLib (/showthread.php?tid=15438) |
$this->load->model conflicing with PHPGraphLib - El Forum - 02-04-2009 [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 $this->load->model conflicing with PHPGraphLib - El Forum - 02-04-2009 [eluser]mandril[/eluser] i think the problem is the require after the load model.. $this->load->model conflicing with PHPGraphLib - El Forum - 02-04-2009 [eluser]Jona[/eluser] Have tried the following: Code: function test(){ Cheers Jona $this->load->model conflicing with PHPGraphLib - El Forum - 07-14-2009 [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 $this->load->model conflicing with PHPGraphLib - El Forum - 07-14-2009 [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. $this->load->model conflicing with PHPGraphLib - El Forum - 07-14-2009 [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 $this->load->model conflicing with PHPGraphLib - El Forum - 07-14-2009 [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 $this->load->model conflicing with PHPGraphLib - El Forum - 07-14-2009 [eluser]CJL01[/eluser] Thanks a lot! |