So, I’ve ben working on my thesis, and I determined that using Cairo Graphics + GWT was really ineffecient, and way too much work. This is largely in part due to my discovery of the Google Chart Tools and, more specifically, the Google Visualization API. Both do pretty much the same thing, they create neat-looking graphs with very little demands on the user. The difference between the two is that Chart Tools create 2D images that you can stick on your website, rendered in less than a second. The Visualization API creates interactive graphs, which is, for me, 50 times better.Programming-wise, getting an interactive bar chart is as easy as pie. Barring a little bit of html, all you have to do is say BarChart chart = new BarChart(
My only deal with it is that while it makes less demands on the user, there’s no wiggle room for the user to make demands either. If you know about my project, I’m trying to make a bar chart that is a cross between the current BLAST output graph (a piece of crap) and Artemis’s graphical display, so you can see you proteins(or whatever you BLASTed for) across the length of the gene/protein you’re BLASTing.
BarChart looked absolutely perfect for the job, you know? Have a bunch of bars hanging in space along the X axis, and the BarChart code even auto-stacks them for me. It seemed like my thesis project just got a whole lot easier. Enter disaster: The BarChart visualization’s bars MUST start at 0 and go to some place. I cannot specify a start point and and end point. The sound I made was horrific and probably was heard in your nightmares.
My only hope lies in stacking. For a data column, if you specify two values, what you will get is two bars, kinda next to each other. I don’t really know how to describe it. But instead of having them be side by side, you can tell the BarChart to stack them. Then you get two bars, stacked horizontally. So if I want a bar to appear from 20-30, I can make the first bar go from 0-20, and then stack a second bar of size 10 on top of it. If I can make the first bar transparent or colorless somehow, then I’m in business! If not I’ll have to abandon the BarChart for something else.