[Phpmyadmin-devel] Realtime charting
Madhura Jayaratne
madhura.cj at gmail.com
Tue May 31 12:23:13 CEST 2011
On Tue, May 31, 2011 at 1:43 PM, Michal Čihař <michal at cihar.com> wrote:
> Hi
>
> Dne Tue, 31 May 2011 00:12:31 +0200
> Tyron Madlener <tyronx at gmail.com> napsal(a):
>
> > I've added now a first version of my planned realtime charting on the
> > status page in the 'Query statistics'-Tab (click on "Realtime chart").
> > You can check it out at http://demo.phpmyadmin.net/gsoc-tyron
> >
> > Currently it aggregates the average queries per second by making an
> > ajax request every 2-2.5 seconds (2 seconds + time for one ajax
> > request). Since it is using the differential of the status var
> > 'questions' it takes some seconds to display a line.
> >
> > For the chart I'm currently using Highcharts because it allows
> > realtime data, animates beautifully, is really small (1 file, 77kb
> > minified) and has a export to png/pdf/jpg plugin (6.4kb minified)
> > which however uses a highcharts.com server for the conversion.
>
> Depending on external service is not something I would like to see.
>
> > Some radical suggestion in this regard: What about removing the
> > included pChart and instead using a client-side charting library? I
> > know for some part its bad since a student wrote a whole lot of code
> > for it just last year, but looking at some requirements for phpmyadmin
> > (no file storage, limited possibilities for data recording,
> > panning/zooming, realtime updates) a server-side charting library
> > offers much less possibilities compared to a client side-one. And if
> > we'd use highcharts it would save us like 16 files and 750kb (well
> > most of it is that dejavu font).
> > I think it would be pretty easy to replace actually. Instead of the
> > graph, the server-code would just need to send the already generated
> > chart data hidden in the document and then we add a bit of js code to
> > display the chart. Some code from chart.lib.php is probably reusable.
>
> There has been lot of discussion what to use and we stick with sever
> side solution because it did allow saving of the images (what might
> be not that useful for server stats, while is definitely useful when
> drawing chart from query results) and does not require javascript
> (though this is less and less important nowadays).
>
Indeed. Since gis visualizations need to be saved I moved on to generate
them on the server side. I'm writing the SVG tags accordingly and for the
browser that does not support SVG (IE version <9) I am using the GD library
to generate PNG images. On the client side I use jQuery SVG for zooming and
panning, to give a better user experience. So with this solution, even
without the JS support one can view the SVG image, while someone with JS
support gets better user experience.
>
> However for realtime charts, server side solution will indeed
> perform worse. And there is also need for some client side graphics
> library for spatial extensions, so I'd like to see one client side
> library used for both drawing spatial data and for charting.
>
> Whether it will be possible to replace pChart or not later, that's IMHO
> different question (mostly depending on usable way of exporting charts
> out of client side solution).
>
> --
> Michal Čihař | http://cihar.com | http://blog.cihar.com
>
>
> ------------------------------------------------------------------------------
> Simplify data backup and recovery for your virtual environment with
> vRanger.
> Installation's a snap, and flexible recovery options mean your data is
> safe,
> secure and there when you need it. Data protection magic?
> Nope - It's vRanger. Get your free trial download today.
> http://p.sf.net/sfu/quest-sfdev2dev
> _______________________________________________
> Phpmyadmin-devel mailing list
> Phpmyadmin-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
>
>
--
Thanks and Regards,
Madhura Jayaratne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.phpmyadmin.net/pipermail/developers/attachments/20110531/c73005ee/attachment.html>
More information about the Developers
mailing list