I am trying to display the PaintScaleLegend for the chart whose paintscale is the variable paintScale in the below code. What I am doing is this:
Code: Select all
SymbolAxis scaleAxis = new SymbolAxis("", new String[]{"Minimum", "Maximum"});
scaleAxis.setGridBandsVisible(false);
PaintScaleLegend psLegend = new PaintScaleLegend(paintScale, scaleAxis);
psLegend.setPosition(RectangleEdge.RIGHT);
psLegend.setMargin(new RectangleInsets(5, 5, 5, 5));
chart.addSubtitle(psLegend );