moose-en-a-gant Posted February 5, 2015 Share Posted February 5, 2015 I want to plot the positive side of the function 1/x^2 For now I may simply look one up, trace it in GIMP and use it as a background with a varying height div as columns but I'm curious if someone has done graphing whether it is pChart or GD or whatever... I just want bar graphs that react to varying varialbe values <- redundant? I'd appreciate any thoughts. Quote Link to comment Share on other sites More sharing options...
Barand Posted February 5, 2015 Share Posted February 5, 2015 What aspect are you stuck on? Quote Link to comment Share on other sites More sharing options...
moose-en-a-gant Posted February 6, 2015 Author Share Posted February 6, 2015 I'm not stuck on anything, I haven't tried to create graphs yet. I don't even know if I need it actually, although a bar graph I imagine is better / easier than say changing / adding css elements to simulate bars of graphs so maybe I do need to get bar graphs working, the inverse square would have been in the background and the bars are related to that curve however the curve is sharper than I imagined it, it wasn't really supposed to be "to scale" just to show that on the left there is more and towards the right decreases to almost nothing Quote Link to comment Share on other sites More sharing options...
Barand Posted February 6, 2015 Share Posted February 6, 2015 You can do it with GD but I would recommend using SVG so you can scale it as you like with losing resolution. Quote Link to comment Share on other sites More sharing options...
maxxd Posted February 6, 2015 Share Posted February 6, 2015 HighCharts is a very good JavaScript library for doing exactly this. It's not PHP, I know, but it could be worth looking into. Quote Link to comment Share on other sites More sharing options...
moose-en-a-gant Posted February 6, 2015 Author Share Posted February 6, 2015 Thanks for the responses. I will look into it and report my findings. I use javascript actually "sort of heavily" lately It concerns me that it may not be supported for some, but as far as numbers go are we talking like 5% of the total computer users? I don't know. Quote Link to comment Share on other sites More sharing options...
NotionCommotion Posted February 6, 2015 Share Posted February 6, 2015 Thanks for the responses. I will look into it and report my findings. I use javascript actually "sort of heavily" lately It concerns me that it may not be supported for some, but as far as numbers go are we talking like 5% of the total computer users? I don't know. On a past project, I used JavaScript on a PC under my control (or it might have been the server), used PHP to convert it to an image, and had the user's browser view the image. I might have some of the detail wrong as it was a while ago, however, it worked perfect. Or you could just tell non-JavaScript users "no fancy graphs for you!" Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.