user1556566
user1556566

Reputation:

How to Draw custom Bar charts in Android

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

Upvotes: 2

Views: 9659

Answers (3)

argenkiwi
argenkiwi

Reputation: 2427

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.

Upvotes: 0

raghav chopra
raghav chopra

Reputation: 837

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

Upvotes: 0

Ram kiran Pachigolla
Ram kiran Pachigolla

Reputation: 21191

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....

Upvotes: 7

Related Questions