简体   繁体   English

Android中的折线图具有不同的颜色

[英]Line chart in android with different colors

Android折线图图像

I have done a lot of searching on this topic but still couldn't get it working.I want to make line chart in android.how can i make exactly this(in image) type of graph.I have used a chart engine library and graph view but I could not meet my requirement. 我已经在这个主题上进行了很多搜索,但仍然无法正常工作。我想在android中制作折线图。我怎样才能准确地制作这种(图像中)类型的图。我使用了图表引擎库和图形视图,但我不能满足要求。

I think you can use this line for changing the colour :- 我认为您可以使用此行更改颜色:-

  XYSeriesRenderer r = new XYSeriesRenderer();
    r.setColor(Color.BLUE);

setting the pointing style :- 设置指向样式:-

    r = new XYSeriesRenderer();
    r.setPointStyle(PointStyle.CIRCLE);

may be this link will be helpful to you :- http://www.oodlestechnologies.com/blogs/Drawing-graphs-in-Android-using-aChartEngine-charting-library-%28Line-Charts%29 可能此链接对您有所帮助:-http: //www.oodlestechnologies.com/blogs/Drawing-graphs-in-Android-using-aChartEngine-charting-library-%28Line-Charts%29

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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