Wasn't sure of whether to mail this to Michal or the mailing list, but
I guess a bigger audience also means more feedback :)
I am in the process of replacing pChart in pma and finishing on the
table charting feature. Since the pChart-Version was rather difficult
to use I thought I'd offer the user some choice about which column
data is used for what.
While implementing, I was orienting in the examples given by
http://wiki.phpmyadmin.net/pma/Charts#Data_formats_for_query_results_chart
where I was slightly surprised by the odd data format of the examples.
It doesn't allow any graph with more than 2 series.
So I thought the most logical of way representing table data is by
selecting one column as x-axis and let the other columns be different
series within the graph.
So looking at the examples, the logical continuation of example 2 would be:
SELECT
225 AS 'Value1',
653 AS 'Value2',
'2009-11' AS 'Month' UNION
SELECT 1157, 855, '2009-12' UNION
SELECT 569, 253, '2010-01' UNION
SELECT 282, 455, '2010-02' UNION
SELECT 2960, 3552, '2010-03'
...which will display the date on the X-Axis and 2 series (Value1 and
Value2) in the graph.
However, in order to allow data like in the original example3 I've
added a select list where one can select what the series types should
be. The default selection is to use all columns except the selected
xaxis but you can also select a specific column from where it should
read all possible types (so this column should probably be a ENUM or
similar).
So when charting the original example3 with Type set to Column,
Series=Operator, X-Axis=Month and Stacking on we get the same result
again. I'm not quite sure whether such solution will make sense for
everyone so I'm asking here if it is :-)
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/
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.
Hi there,
I started coding for GSoC yesterday, since I need Monday off for a
college exam. I pushed the changes that I did to my repo [1], and they
are available for you to try on my demo server [2] (There are some
routines and triggers in the sakila db, but you'll have to add your own
events). Well, first of all I'd appreciate any feedback from you guys
regarding what I did. Which was: adding tabs for routines, triggers,
events; moving there the functionality that was already available;
getting export and drop options to work properly. However I have a
problem with the "Drop" option that doesn't redirect the user back to
where he came from after deleting the requested object. I tried adding a
"goto" variable to $urlquery, but by the time that the user is taken to
sql.php, "goto" simply disappears. I'm not sure what I'm missing. Any
clues?
Thanks,
Rouslan
[1]: http://repo.or.cz/w/phpmyadmin/roccivic.git
[2]: http://demo.phpmyadmin.net/gsoc-rouslan/
Hi,
For some time I was curious whether PMA_STR_binarySearchInArr is
needed at all, and my test showed that there are faster (sometimes
much faster) alternatives. Test for 100 000 iterations on PHP 5.3.4
(Windows, i5 2,53 GHz core):
PMA_STR_binarySearchInArr: 2.6606s
array_search: 1.8936s
isset: 0.0102s
array_key_exists: 0.0934s
Isset and array_key_exists require flipped array, but array_search is
a drop-in replacement that works faster, even though it does a linear
search. Code used to perform this test is at [1].
[1] http://pastebin.com/cJmpmCPh
--
Piotr Przybylski
Since I always have a love for details, here's 3 small suggestions
that maybe can be merged into the master branch. They are all pushed
to my fork (http://repo.or.cz/w/phpmyadmin/tyronm.git):
- Commit a0302c666c1bf9f9715364a6301238b474aedac1
Removes timepicker.js. It is already included with the jquery ui. The
file was included only in tbl_change.php and tbl_select.php
- Commit b161f43ec9089e0d2d5fb8a619056e6f9577a380
When reloading (flushing) privileges on the privileges tab you get a 5
second long success message. This commit omits the success message and
removes the loading message as soon as the ajax request is done. This
behavior seems more consistent with my patch in April that removes
messages once the ajax request is completed.
- Commit 99775c9bad552aac8b904996d673f1023821ab13
Removes the initials table on the privileges tab if there is 20 or
less privileges to show. With 1-20 privileges you can easily see all
host names and don't need any filtering by initials imo. I would even
increase that limit to 30 or so.
Thilanka,
I'm not sure where this message will appear exactly but I suggest
replacing it with "Insert in table" with just the "I" of Insert in
uppercase.
By the way, in messages we are trying to avoid using uppercase for all
words.
--
Marc Delisle
http://infomarc.info
I'd like to merge some of the server pages, so that we have a smaller
menu and less links ending up in the 'More' tab.
What I have done already is put the processes table into the status
page as it fits very well into the server traffic (jquery-)tab.
And secondly I would merge together Engines, Charsets, Replication and
Variables into a (jquery-)tab-separated page named "Configuration"
Since an average user rarely requires the information supplied on
those pages I think it is a good idea to free up the space in the menu
bar. Any objections on this? :)
Hi,
Is there any reason for hardcoding array sizes in sqlparser.data.php?
count()'s complexity is O(1), it just reads item count from hash table
which is used internally for storing arrays.
--
Regards,
Piotr Przybylski
Hi Marc,
I started working on improving the "*Add a new user in db-> privileges*" by
providing a dialog such as in "*Add a new user in Server->privilege*"
option.
In that case I'm going to reuse the code in "(#fieldset_add_user).click"
action in server_privileges.js file. The only modification I had to do is
add the class="ajax" to link on db->privileges and now it pops up the dialog
box.
The next part is, after adding a new user we have to add that user to the
list table in db->privileges and then sort it according to the alphabetical
order of user names. In server->privileges, "*appendNewUser() in
server_privileges.js" *method has used and it is sorting the rows be
selecting the first character in the label and then according to that. It is
okay because server->privileges table has same type of rows. But in "*
db->privileges*" table it has used two type of rows where one shows columns
related to "global" privileges and other is to database specific privileges
corresponding to each user. So I cannot use the same "*appendNewUser() in
server_privileges.js"* method to add and sort the table. I came up with some
approaches to overcome this problem.
1. Change the table structure where do not use two rows but use same row
and line break to get them down. In this case I'll be able to reuse the same
method where I think more appropriate in this case.
2. Do a refresh to the "*db->privileges*" page so it reloads the table.
3. Keep the table as it is in current and develop a method to sort it.
I'm confused with what method to use. So please can you clarify me on this
problem. Thank you.
Regards,
Thilanka.
--
L G Thilanka Kaushalya
Computer Science & Engineering,
University of Moratuwa,
Sri Lanka
Connect with me at,
Gmail : lgtkaushalya(a)gmail.com
Twitter : @thilanka_k
Facebook : Thilanka Kaushalya
Yahoo : lgtkaushalya(a)yahoo.com
Blog : http://coders-view.blogspot.com/