简体   繁体   中英

Achartengine on Android

I am using Achartengine to create graph in my app. I want that my X axes would be a string, for now I am here:

public class LineGraph {
    public Intent getIntent(Context context){
        String[] x = { "a", "b" };
        int[] y = { 1 , 2 };

        TimeSeries series = new TimeSeries("Line");
        for(int i = 0; i < x.length; i++){
            series.add(x, y);
        }

        ...
    }
}

您可以通过以下方式在X轴上添加自定义文本标签:

renderer.addXTextLabel(x, "text");

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM