Hi skunk,
thx for the fast reply.
I´m sorry that I have needle you.
I tired your suggestions but it don´t work
First with the overridden Method.
- Code: Select all
public class CustomAxis extends ValueAxis{
protected CustomAxis(String label, TickUnitSource standardTickUnits) {
super(label, standardTickUnits);
// TODO Auto-generated constructor stub
}
/**
*
*/
private static final long serialVersionUID = 7497989746183508906L;
@Override
protected void autoAdjustRange() {
// TODO Auto-generated method stub
}
@Override
public double java2DToValue(double arg0, Rectangle2D arg1,
RectangleEdge arg2) {
// TODO Auto-generated method stub
return 0;
}
@Override
public double valueToJava2D(double arg0, Rectangle2D arg1,
RectangleEdge arg2) {
// TODO Auto-generated method stub
return 0;
}
@Override
public void configure() {[img][/img]
// TODO Auto-generated method stub
}
@Override
public AxisState draw(Graphics2D arg0, double arg1, Rectangle2D arg2,
Rectangle2D arg3, RectangleEdge arg4, PlotRenderingInfo arg5) {
// TODO Auto-generated method stub
return null;
}
@Override
public List refreshTicks(Graphics2D arg0, AxisState arg1, Rectangle2D arg2,
RectangleEdge arg3) {
List<String> test=new ArrayList<String>();
test.add("test");
return test;
}
}
but I get only a white Chart.
And then I tried the Formatter.
But Formatter used only to formating the ouput and don´t manipulate
- Code: Select all
NumberAxis xAxis = new NumberAxis();
xAxis.setTickUnit(new NumberTickUnit(150));
DecimalFormat format = (DecimalFormat)DecimalFormat.getNumberInstance(Locale.ENGLISH);
format.applyPattern("#");
xAxis.setNumberFormatOverride(format);
plot.setDomainAxis(xAxis);
Here I have a Screenshot.
The red labels show how I want it.
