I want to visualize a scatter plot using Prefuse. The difference from typical scatter plot is here I want to use rectangle instead of circle or point. And the reason is I want to visualize the time and duration at the same time. Does anyone know how to set rectangle's length or width according to data in the table? I haven't got the right answer after searching the web.
I initially wants to draw rectangle using this parameter.
ShapeAction shape = new ShapeAction(group, Constants.SHAPE_RECTANGLE);
But I didn't find the way to change only the length of it but to change the whole size. Could anyone give me some instructions? Thanks.
Assuming you want to create a visualization similar to LifeLines or a GANTT chart.
To achive this, prefuse has to be extended prefuse on several points. Here is an outline:
VisualTable
to store the x coordinate at the end of the rectangleAxisLayout
to determine the additionally the end of the rectangle.AbstractShapeRenderer
draw a rectangle using the end coordinate