How do I create a bar chart using the Java prefuse library?
I've currently got prefuse to plot a scatter graph, where the X axis is the computer name and the Y axis is its temperature. How do I get it to draw bars showing the values instead of discrete points?
I'm currently using the following code to render the points:
ShapeAction shape = new ShapeAction(group, Constants.SHAPE_RECTANGLE); ColorAction strokeColor = new DataColorAction(group, dataType, Constants.NUMERICAL, VisualItem.STROKECOLOR, colorPalette); ActionList draw = new ActionList(); draw.add(shape); draw.add(strokeColor); draw.add(new ColorAction(group, VisualItem.FILLCOLOR, 0)); draw.add(new RepaintAction()); m_vis.putAction("draw", draw);
How would I adapt this code to get, instead of a small square at each point, a thick bar going from th bottom of the graph to the point?