<br><br><div class="gmail_quote">On Tue, May 31, 2011 at 3:15 PM, Tyron Madlener <span dir="ltr"><<a href="mailto:tyronx@gmail.com">tyronx@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Tue, May 31, 2011 at 10:13 AM, Michal Čihař <<a href="mailto:michal@cihar.com">michal@cihar.com</a>> wrote:<br>
> Hi<br>
><br>
> Dne Tue, 31 May 2011 00:12:31 +0200<br>
> Tyron Madlener <<a href="mailto:tyronx@gmail.com">tyronx@gmail.com</a>> napsal(a):<br>
><br>
>> I've added now a first version of my planned realtime charting on the<br>
>> status page in the 'Query statistics'-Tab (click on "Realtime chart").<br>
>> You can check it out at <a href="http://demo.phpmyadmin.net/gsoc-tyron" target="_blank">http://demo.phpmyadmin.net/gsoc-tyron</a><br>
>><br>
>> Currently it aggregates the average queries per second by making an<br>
>> ajax request every 2-2.5 seconds (2 seconds + time for one ajax<br>
>> request). Since it is using the differential of the status var<br>
>> 'questions' it takes some seconds to display a line.<br>
>><br>
>> For the chart I'm currently using Highcharts because it allows<br>
>> realtime data, animates beautifully, is really small (1 file, 77kb<br>
>> minified) and has a export to png/pdf/jpg plugin (6.4kb minified)<br>
>> which however uses a <a href="http://highcharts.com" target="_blank">highcharts.com</a> server for the conversion.<br>
><br>
> Depending on external service is not something I would like to see.<br>
<br>
</div>Thats indeed not very nice. Maybe with some hacking around I could<br>
build my own svg to png/pdf converter for phpmyadmin. There must be a<br>
library for that. The code for converting the charts is availabe from<br>
<a href="http://highcharts.com" target="_blank">highcharts.com</a>, but from what I've seen its partially written in java.<br>
But it cannot be that hard to build our own php-only-solution.<br>
<div class="im"><br>
><br>
>> Some radical suggestion in this regard: What about removing the<br>
>> included pChart and instead using a client-side charting library? I<br>
>> know for some part its bad since a student wrote a whole lot of code<br>
>> for it just last year, but looking at some requirements for phpmyadmin<br>
>> (no file storage, limited possibilities for data recording,<br>
>> panning/zooming, realtime updates) a server-side charting library<br>
>> offers much less possibilities compared to a client side-one. And if<br>
>> we'd use highcharts it would save us like 16 files and 750kb (well<br>
>> most of it is that dejavu font).<br>
>> I think it would be pretty easy to replace actually. Instead of the<br>
>> graph, the server-code would just need to send the already generated<br>
>> chart data hidden in the document and then we add a bit of js code to<br>
>> display the chart. Some code from chart.lib.php is probably reusable.<br>
><br>
> There has been lot of discussion what to use and we stick with sever<br>
> side solution because it did allow saving of the images (what might<br>
> be not that useful for server stats, while is definitely useful when<br>
> drawing chart from query results) and does not require javascript<br>
> (though this is less and less important nowadays).<br>
<br>
</div>Actually the way how pChart is currently implemented it generates the<br>
charts in slices, so at the moment you cannot save them.<br>
<div class="im"><br>
><br>
> However for realtime charts, server side solution will indeed<br>
> perform worse. And there is also need for some client side graphics<br>
> library for spatial extensions, so I'd like to see one client side<br>
> library used for both drawing spatial data and for charting.<br>
><br>
<br>
</div>I basically agree, since adding more and more libraries creates only<br>
more feature creep and inconsistency.<br>
The reason I'm not very fond of using the suggested svg drawing<br>
library (jQuery SVG) is that it has not been specifically built for<br>
charting. The plotting examples on the website look rather clumsy and<br>
I couldn't find any support for real-time data.<br>
<br></blockquote><div>I agree with you on this. The two requirements of the charting and GIS visualization are bit different. While GIS visualization needs to draw basic shapes such as points, lines and polygons, it will be a waste to use these basic shapes to build chats, though it can be done. It will be much easier to use a charting library where you can simple specify the dataset and get it to draw charts for you.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
So, if I'm going to build real-time charting for pma using jQuery SVG,<br>
I will have to write and maintain some sort of<br>
real-time-charting-plugin that likely will consume between a few days<br>
and a week of time.<br>
<br>
It seems more "future-proof" for me to invest that time in replacing<br>
pChart with a client-lib like highcharts and thus still having only 2<br>
graphing libs in pma.<br>
<div class="im"><br>
> Whether it will be possible to replace pChart or not later, that's IMHO<br>
> different question (mostly depending on usable way of exporting charts<br>
> out of client side solution).<br>
<br>
</div>pChart is currently used only in 3 different place, no?<br>
- server status page<br>
- query profiling pie<br>
- query result charting<br>
<br>
When I was looking at the code, it seemed fairly easy to replace it.<br>
<br>
I will do some research on the code of highcharts export, jquery svg<br>
and pchart the next days so I can make a more exact estimation of the<br>
time it would require to add the missing requirements or replace with<br>
another lib in the case of pchart.<br>
<br>
As always thanks for all the feedback and more is always welcome :)<br>
<br>
><br>
> --<br>
<div class="im">>        Michal Čihař | <a href="http://cihar.com" target="_blank">http://cihar.com</a> | <a href="http://blog.cihar.com" target="_blank">http://blog.cihar.com</a><br>
><br>
</div><div class="im">> ------------------------------------------------------------------------------<br>
> Simplify data backup and recovery for your virtual environment with vRanger.<br>
> Installation's a snap, and flexible recovery options mean your data is safe,<br>
> secure and there when you need it. Data protection magic?<br>
> Nope - It's vRanger. Get your free trial download today.<br>
</div>> <a href="http://p.sf.net/sfu/quest-sfdev2dev" target="_blank">http://p.sf.net/sfu/quest-sfdev2dev</a><br>
<div class="im">> _______________________________________________<br>
> Phpmyadmin-devel mailing list<br>
> <a href="mailto:Phpmyadmin-devel@lists.sourceforge.net">Phpmyadmin-devel@lists.sourceforge.net</a><br>
> <a href="https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel</a><br>
><br>
><br>
<br>
</div><div class="im">------------------------------------------------------------------------------<br>
Simplify data backup and recovery for your virtual environment with vRanger.<br>
Installation's a snap, and flexible recovery options mean your data is safe,<br>
secure and there when you need it. Data protection magic?<br>
Nope - It's vRanger. Get your free trial download today.<br>
</div><a href="http://p.sf.net/sfu/quest-sfdev2dev" target="_blank">http://p.sf.net/sfu/quest-sfdev2dev</a><br>
<div><div></div><div class="h5">_______________________________________________<br>
Phpmyadmin-devel mailing list<br>
<a href="mailto:Phpmyadmin-devel@lists.sourceforge.net">Phpmyadmin-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Thanks and Regards,<div><br></div><div>Madhura Jayaratne<br><div><br></div></div><br>