2

I am developing an application, in which there is a requirement for showing results in a Bar charts. I have tried developing charts using AChartEngine and Google api and many other apis. But my Requirement is to draw multiple charts in one Activity. I followed this.Its working fine. But when i try to set the background image for the whole screen, Its not working

Can Anybody help me please

Community
  • 1
  • 1

3 Answers3

7

Just check this Bar Chart in Android With out any Built in jars. Here you can draw charts without any built in jars. Its just simple Graph creation using the concept of setting the height for the textview in a ListView.

I implemented this by using the Horizontal ListView. Here you have the two double arrays with equal size of elements. And the graph will adjust according to the orientation(Portrait and landscape).

If you want more charts in one activity, you can implement another Horizontal Listview in the layout.

I hope this will help you....

Ram kiran Pachigolla
  • 20,897
  • 15
  • 57
  • 78
  • 1
    I look at your blog. I am getting errors at the horizontal listview.. can you help me.. –  Oct 15 '12 at 04:50
  • Just download the code from the [link](https://sites.google.com/site/ramkiranworks/customization/My%20Chart.zip?attredirects=0) – Ram kiran Pachigolla Oct 15 '12 at 04:54
0

i can help you with paid Library which is nice is called aiCharts (Bar Charts)

or you should refer GraphViewDemo it is also anice and free libraray to make bar graph

GraphViewDemo

raghav chopra
  • 827
  • 3
  • 9
  • 25
  • 1
    I have tried these already. I get two charts in one activity, but my problem is that the background of the screen is not setting when i am using these api's. Can you help me pls –  Oct 15 '12 at 04:49
  • Well you can any day have 1 chart instead of 2 – raghav chopra Oct 15 '12 at 04:54
0

I am writing a blog post on the subject. For one of my clients I created a compound view with an embedded bar chart. I did not find a simple and flexible library to achieve this, so I decided to go with custom views. To my surprise, it was simpler than I had expected: create a custom view that takes a colour and a percentage as attributes and use linear layouts to contain its instances, using layout_weight or a fixed layout_width to maintain proportions. I am very happy with the results.

argenkiwi
  • 2,134
  • 1
  • 23
  • 26