[Phpmyadmin-devel] Table charting pChart replacement

Tyron Madlener tyronx at gmail.com
Mon Jun 13 18:33:59 CEST 2011


On Mon, Jun 13, 2011 at 3:39 PM, Rouslan Placella <rouslan at placella.com> wrote:
> On Mon, 2011-06-13 at 14:52 +0200, Michal Čihař wrote:
>> Hi
>>
>> Dne Thu, 9 Jun 2011 17:04:30 +0200
>> Tyron Madlener <tyronx at gmail.com> napsal(a):
>>
>> > Current differences over the pChart implementation:
>> > - Everything updates as you type/select. No more Redraw button is required
>> > - New charting types: (Horizontal-)Bar and Spline
>> > - No editable Area/Legend Margins (who needs that?)
>> > - Have as many Series (=Columns-1) as you want, not only 3
>> > - Select the column you want to be the x-axis, so you don't need to
>> > know by heart where in your query result the x-axis column is supposed
>> > to be.
>> > - If a column contains the word date or time it will be pre-selected as xaxis
>> > - No width/height selection, instead just mouse-drag the chart to the
>> > right size.
>> >
>> > Please check it out at http://demo.phpmyadmin.net/gsoc-tyron/
>>
>> Looks nice, thanks!
>>
>> I'd like to merge your changes back to master, any opinions about that?
>>
>
> I found a bug (I think). To reproduce:
>
> * go to demo server
> * go to sakila db
> * go to actor table
> * click profiling checkbox
> * do some action that is handled via AJAX E.g.:
>    (sort by column, show 30 rows starting at row X, go to page X, etc)
> * you get a warning:
>    "Notice in ./sql.php#904 Undefined variable: url_query"
> * the chart disappears

Ok, I've fixed both now.

On ajax request, server.common.inc.php is not included, where
$url_query is defined.
So if it is not defined it will use 'PMA_generate_common_url($db);' now

As for the second, the only nice way I can think of to fix that is to
add a inline-js function call to create the chart. Previously I
generated the chart on $(document).ready(), which of course doesn't
get called when an ajax request updates the page. Wasn't there some
jQuery event feature that fires every time the DOM Tree updates?

I should actually unload the chart when it gets overwritten in the
DOM, at least according to what the highcharts docs say about
chart.destroy(): "Removes the chart and purges memory. This method
should be called before writing a new chart into the same container.
It is called internally on window unload to prevent leaks."

Maybe we should implement some universal beforeAjaxLoad, afterAjaxLoad
event to which I can bind to for reloading/destroying the chart each
time.

>
> Regards, Rouslan
>
>> > P.S.: There seems to be a problem when using the sql statements given
>> > on the wiki within the db links SQL page. Once the query is executed
>> > and you click on display chart or export it just redirects you to the
>> > main page again.
>>
>> I've just fixed this in git.
>>
>> ------------------------------------------------------------------------------
>> EditLive Enterprise is the world's most technically advanced content
>> authoring tool. Experience the power of Track Changes, Inline Image
>> Editing and ensure content is compliant with Accessibility Checking.
>> http://p.sf.net/sfu/ephox-dev2dev
>> _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
>
>
>
> ------------------------------------------------------------------------------
> EditLive Enterprise is the world's most technically advanced content
> authoring tool. Experience the power of Track Changes, Inline Image
> Editing and ensure content is compliant with Accessibility Checking.
> http://p.sf.net/sfu/ephox-dev2dev
> _______________________________________________
> Phpmyadmin-devel mailing list
> Phpmyadmin-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
>




More information about the Developers mailing list