I just sent a HTML, CSS, Javascript implementation of Pie, Bar, and Line charts to Hiram. It is designed to be used with data retrieved from a server, or self generated, as JSON. It uses the canvas tag to do the drawing and draws itself to fit within a div that you have sized and placed using CSS.
I've tried to make it as easy as I can to use. I have wanted to add other chart types but have not had time due to the development of other parts of the QuickConnect framework. I'd love feedback and even code change submissions. Would you like a copy? If so email me at [email protected] Lee Here is how you create a pie chart. var pieDisplay = document.getElementById('pieDisplay'); if(!pieDisplay.chart){ //create the chart pieDisplay.chart = new QCPieChart(pieDisplay, 'Animals', true); //draw the values pieDisplay.chart.setValues([['cats',15], ['hippos',-2], ['fish',7], ['dogs',4] , ['bears',20], ['mice',3], ['elephants',7], ['dogs',10], ['kangaroo',18]]); } Here is how you create a bar chart. var barDisplay = document.getElementById('barDisplay'); if(!barDisplay.chart){ barDisplay.chart = new QCBarChart(barDisplay, 'Animals', true); barDisplay.chart.addSeries('Some Animals',[['cats',15], ['hippos', 2], ['fish',7], ['dogs',4] , ['bears',20], ['mice',3], ['elephants',7], ['dogs', 10], ['kangaroo',18]]); barDisplay.chart.addSeries('Other Animals',[['gorillas',10], ['snakes',5], ['robins',3], ['rats',4] , ['moose',15], ['deer',14], ['tigers',-2], ['jaguar',9], ['emu',9]]); /* barDisplay.chart.addSeries('Animals', [['cats',15], ['hipos',2], ['fish',7]]); barDisplay.chart.addSeries('Other Animals', [['gorillas',10], ['snakes',5], ['robins',3]]); barDisplay.chart.addSeries('More Animals',[['rats',4], ['moose', 15]]); */ barDisplay.chart.display(); } Now for the line chart. var lineDisplay = document.getElementById('lineDisplay'); if(!lineDisplay.chart){ var fill = true; var shadow = true; lineDisplay.chart = new QCLineChart(lineDisplay, 'Animals', shadow, fill); lineDisplay.chart.addSeries('Some Animals',[['cats',15], ['hippos', 2], ['fish',7], ['dogs',4] , ['bears',20], ['mice',3], ['elephants',7], ['dogs',10], ['kangaroo',18]]); lineDisplay.chart.addSeries('Other Animals',[['gorillas',10], ['snakes',5], ['robins',3], ['rats',4] , ['moose',15], ['deer',14], ['tigers',0 ], ['jaguar', 9], ['emu',9]]); lineDisplay.chart.display(); } On Apr 22, 11:04 am, Derek Williams <[email protected]> wrote: > Agreed, I'm a big fan of separation of concerns, I would rather not have a > tightly integrated end to end solution. It can simplify development but the > costs of change are high. > > On Wed, Apr 21, 2010 at 5:04 PM, Remi Grumeau <[email protected]>wrote: > > > > > > > to me, it's definitely important to keep in mind that iUI is an HTML > > framework … HTML, not PHP+MySQL+HTML. Just HTML. > > So the more we can provide extensions (charts, APIs connections, …) that > > can run on plain HTML server configuration provides a real portability on > > Windows/*NIX/Java/ROR/TCL/WTF… servers as copy/paste installation. > > > The more we don't rely to a specific server-side tech, the mayor … to me. > > That's the reason why i'm more a client-side enthusiast for this kind of > > project > > > R. > > > Le 21 avr. 2010 à 23:12, Victor Hudson a écrit : > > > > Also just noticed you need to be running a non windows *nix > > > environment to install the GDChart extension. If your good with php it > > > may be possible to raid the source and rewrite the extension as a php > > > include for windows environments, but I don't really have time to > > > explore that right now. Sorry if I just wasted your time. > > > > :-( > > > > Vic Hudson > > > > On Apr 21, 2010, at 16:42, Vic Hudson <[email protected]> wrote: > > > >> If you are using PHP and have access and the ability to add PHP > > >> library extensions, a quick google search led me to this. > > >>http://devzone.zend.com/article/3774 > > >> Just a quick browse of article looked like this to me > > > >> Pros: > > >> Server side Chart rendering-- less overhead on clientside resources. > > >> Many available chart options > > >> Keep all your data in house > > >> The instructions looked fairly simle to follow after you have the > > >> neccassary libraries installed > > > >> Cons > > >> if you don't have these libraries installed it wont help much unless > > >> you can install them. > > >> it sends the chart as an image, so the download may negate the > > >> recourse saved by not using some of the clientside js/css/canvas > > >> solutions. > > > >> Hope this helps and good luck! > > >> ;-) > > >> Vic > > > >> -- > > >> You received this message because you are subscribed to the Google > > >> Groups "iPhoneWebDev" group. > > >> To post to this group, send email to [email protected]. > > >> To unsubscribe from this group, send email to > > [email protected]<iphonewebdev%2bunsubscr...@google > > groups.com> > > >> . > > >> For more options, visit this group at > >http://groups.google.com/group/iphonewebdev?hl=en > > >> . > > > > -- > > > You received this message because you are subscribed to the Google Groups > > "iPhoneWebDev" group. > > > To post to this group, send email to [email protected]. > > > To unsubscribe from this group, send email to > > [email protected]<iphonewebdev%2bunsubscr...@google > > groups.com> > > . > > > For more options, visit this group at > >http://groups.google.com/group/iphonewebdev?hl=en. > > > -- > > You received this message because you are subscribed to the Google Groups > > "iPhoneWebDev" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]<iphonewebdev%2bunsubscr...@google > > groups.com> > > . > > For more options, visit this group at > >http://groups.google.com/group/iphonewebdev?hl=en. > > -- > Derek Williams > Cell: 970.214.8928 > Home Office: 970.416.8996 > > -- > You received this message because you are subscribed to the Google Groups > "iPhoneWebDev" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group > athttp://groups.google.com/group/iphonewebdev?hl=en. -- You received this message because you are subscribed to the Google Groups "iPhoneWebDev" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/iphonewebdev?hl=en.
