Vaadin charts 2.1 ignores barchart axis limits when 2nd axis added

I have a barchart where I place a second (identical axis) on the right of the chart and manually fix the maximum values. In versions up to and including 2.0 this worked, but under 2.1 it seems to determine the maximum value automatically as soon as the second axis is added, ignoring the setmax options on either or both axes. My code is as follows:

YAxis yAxis = new YAxis();
        yAxis.setMin(0);

        if( yTitle == null)
            yAxis.setTitle(new Title(" "));
        else
            yAxis.setTitle(new Title(yTitle));
                yAxis.setMax(100);
                yAxis.setTickInterval(10);
                yAxis.setAlternateGridColor(ChartLib.TRANSPARENT);
        /**/        if( globQuartiles != null){
            PlotLine pl = getYLabels( globQuartiles, HorizontalAlign.LEFT, 4);
            yAxis.setPlotLines(pl);
        }
        conf.addyAxis(yAxis);
        YAxis yAxis2 = null;

        if( regQuartiles != null){
            yAxis2 = new YAxis();
            yAxis.setLabels(new Labels());
            yAxis2.setGridLineWidth(0);
            yAxis2.setMin(0);
            yAxis2.setMax(100);
            yAxis2.setTickInterval(25);
            yAxis2.setTitle(new Title(" "));
            yAxis2.setOpposite(true);
            conf.addyAxis(yAxis2);
            yAxis2.setLinkedTo(yAxis);
        }

It doesn’t matter whether I link the axes or not, the effect is the same. Similarly if the tick interval is set to 25 the axes are autoscaled to a maximum value of 150 ( data is percentiles and has a maximum of 100), if the tickinterval is left blank or set to 10 or 20 the axes are autoscaled to a maximum of 120.

Is there a way to force the axes to have a maximum value of 100?
Thanks
Iain

Hi Iain,

I think this is caused by the calculations done when having multiple axes with aligned ticks, see the javadoc:
http://demo.vaadin.com/javadoc/com.vaadin.addon/vaadin-charts/2.1.0/com/vaadin/addon/charts/model/Axis.html#setMax(java.lang.Number)

Can you try disabling aligned ticks?

        conf.getChart().setAlignTicks(false);

Thanks Gillermo, that worked