final String group = "by_state";
// filter to show only candidates receiving more than $100,000
Predicate p = (Predicate)
ExpressionParser.parse("["+TOTAL_RECEIPTS+"] >= 100000");
VisualTable vt = vis.addTable(group, t, p);
// add a new column containing a label string showing
// candidate name, party, state, year, and total receipts
vt.addColumn("label", "CONCAT(CAP(Candidate), ' (', "
+ "CAP([Party Designation]), '-', [State Code], "
+ "') ', Year, ': $', FORMAT([Total Receipts],2))");
// add calculation for senators
vt.addColumn("Senate", "District <= 0");
vis.setRendererFactory(new RendererFactory() {
AbstractShapeRenderer sr = new ShapeRenderer();
Renderer arY = new AxisRenderer(Constants.RIGHT, Constants.TOP);
Renderer arX = new AxisRenderer(Constants.CENTER, Constants.FAR_BOTTOM);