Androidplot migration from .6.0 to 1.5.6

103 Views Asked by At

I am migrating an androidplot project from .6.0 to 1.5.6 and can't seem to figure out what the new methods are for the following.

What is the new class for

import com.androidplot.xy.BarRenderer.BarWidthStyle;

In addition, what are the new methods for the following

    public View onCreateView(LayoutInflater inflater, ViewGroup container,
      Bundle savedInstanceState) {
    View barChartView = inflater.inflate(R.layout.barchart, null);
    plot = (XYPlot)barChartView.findViewById(R.id.mySimpleXYPlot);
    plot.getGraph().setGridPadding(30, 30, 30, 0);
    plot.setTicksPerDomainLabel(1);

    plot.setDomainValueFormat(RANGE_DOMAIN_VALUE_FORMAT);
    plot.setRangeValueFormat(new DecimalFormat("#"));
    plot.getLegend().setVisible(false);
    plot.getGraph().setDomainLabelOrientation(90);
    return barChartView;   

Any help would be greatly appreciated.

1

There are 1 best solutions below

0
Grant Davis On

I have a feeling that you are after this class:

com.androidplot.xy.BarRenderer.BarGroupWidthMode

I found it here: https://javadoc.io/doc/com.androidplot/androidplot-core/1.5.7

I hope that is the correct equivalent for you.

I have only just started migrating from that version to 1.5.7 today myself.

Also, calls you need for formatting are like these:


plot.getGraph().getLineLabelStyle(XYGraphWidget.Edge.BOTTOM).setFormat(new SatelliteNameFormat());
plot.getGraph().setPadding(30, 10, 30, 0);

All the best!