//
GSoC 2010 Week #8-#9 report
Comment
Search
Try Notion
GSoC 2010 Week #8-#9 report
Date
July 22, 2010
Tags
gsoc
Hello,
first of all sorry I missed the report of the week #7, but I was ill that week so nothing much happened. This week I have started adding JS to the charts. So this is how it went.
The PHP library that I use (pChart) for chart generation has some ImageMap functionality. What it basically does is return some data to JS where a tooltip must be shown. That data is only coordinates of two points. That script allows to show tooltips only above rectangles. Well, pie charts and radar charts consist of not only rectangles but we want tooltips on them too.
So I started this week by writing some PHP code which calculates the areas where a tooltip should be on a chart and then JS had to be improved to cope with more complicated figures. There was some interesting math involved in this. Now we have tooltips over pie and radar maps too.
Well with JS sometimes comes compatibility issues. So when I started writing JS I also have started testing my work on other browsers. Only now I have noticed that IE 8 (I haven't even tested it on older ones) does not always show base64 encoded images. Some images which have long base64 strings are not shown. This is a little show stopper because I have no idea how to fix this without scrapping base64 images.
Talking about charts (: I was thinking about and looking at flot library for charts. It is not really suitable for this. It does better job while rendering plots than charts. pChart does render really good looking charts and no other library can do it better. I am not sure if PMA needs another implementation (JS) for charts. I think now I will do my best to add some convenience JS functionality and it will be much better than completely different JS charts implementation.
Now I am going back to tinker around with details and some bugs that are still there.
BTW. You can test out the chart functionality here. Just go the the status page and you will see nice looking pie chart. It is harder to test query results charts because you need some data which script does understand.