Androidplot从.6.0到1.5.6的迁移

问题描述 投票:0回答:1

[我正在将androidplot项目从.6.0迁移到1.5.6,似乎无法弄清楚以下新方法是什么。

什么是新的类

import com.androidplot.xy.BarRenderer.BarWidthStyle;

此外,以下是什么新方法

    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;   

任何帮助将不胜感激。

android android-studio-3.0 androidplot
1个回答
0
投票

我感觉你在这堂课之后:

com.androidplot.xy.BarRenderer.BarGroupWidthMode

我在这里找到它:https://javadoc.io/doc/com.androidplot/androidplot-core/1.5.7

我希望这对您来说是正确的。

我今天才刚刚从该版本迁移到1.5.7。

此外,格式化所需的呼叫如下:

plot.getGraph().getLineLabelStyle(XYGraphWidget.Edge.BOTTOM).setFormat(new SatelliteNameFormat());

祝一切顺利!

© www.soinside.com 2019 - 2024. All rights reserved.