Forums

Full Version: ScatterPlot with labelled axes
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Here is a version of ScatterPlot with x/y axes shown. The axes labels change appropriately as the user chooses different fields to plot on the x and y axes.

One thing that felt kludgy to me was that to get the axes labels to redraw, I had to set the rangeModel to null. From axisUpdateAction:
if( isNumeric ) {
// need to set range model to null to force recalculation
labels.setRangeModel(null);
axis.setDataType(Constants.NUMERICAL);
} else { // completely untested with derived columns
axis.setDataType(Constants.ORDINAL);
labels.setRangeModel(null);
}
vis.run("draw");

Is there a different way I should be forcing a redraw, or is setting to null the Right Way To Do It?
Hi Kaitlin Duck Sherwood,

thank you very much for this contribution to pap, the labels come in very handy.

Concerning your question, sorry I don't know.
Up to you of course, but maybe it would be good to post the question in the source forge forum with a link to your demo here. I don't know how many people are actively visiting this forum, I guess much less than the source forge forum. In addition this would also help people to find your excellent demo.

Once more thank you very much for sharing the fruits of your efforts, hope you inspire some other to do so too.

martin

Guest

34all --

I think I did post something in the forums about my demo, but it was a while ago... and there are SO MANY posts in there with no way to search, that I despaired of it beign useful.

I did write about it on my blog
http://www.webfoot.com/blog/2007/07/22/p...on-graphs/
hoping that the search engines would notice it there -- which they appear to have done! Searching for

Quote:prefuse scatter plot labels
finds both my blog posting and this thread. :-)

NOTE TO PEOPLE WHO FIND THIS THREAD: I found a few really minor, non-functional issues with the scatterplot demo that I fixed in the version on my web site. You might want to go there first:
http://webfoot.com/code/
Great,

thanks Kaitlin - I am just disappointed that google search displays your blog before pap Wink

cheers

martin
Reference URL's