[Phpmyadmin-devel] Realtime charting
Herman van Rink
rink at initfour.nl
Tue May 31 09:44:07 CEST 2011
On 31-05-11 00:12, Tyron Madlener wrote:
> 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 an external service is not an option in my opinion.
> 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.
>
> Please let me know what you think and whether I should continue
> working in this direction. Thanks! :)
Last year other options were also evaluated. The chosen solution had the
advantage that it did not require JS, although that's becoming less of
an argument these days.
Doing 'the 'hard work' on the client seems attractive and looks cool.
I remember that some of the client sided options also required flash,
that would not be good.
As we last year tried to setup an extensible/flexible chart structure I
would be best to improve on that.
Adding an additional chart system in parallel would be just too mush...
--
Met vriendelijke groet / Regards,
Herman van Rink
Initfour websolutions
More information about the Developers
mailing list