Am trying out to plot some values using achartengine in an Android App. The values in y axis are usually negative. This is how the bar chart appears
But I want it to appear from the bottom i.e. I want each bar to start from -100, instead of the current 0. How do I do this? Please help.
I suggest you build a range bar chart instead of the current bar chart. Another suggestion is to use renderer.setBarWidth(widthInPixels) in order to set the width of the bars. This method works best when you have only one item per series.
Related
I'm using achartengine lib and I have problem with displaying of bars value. I want to display multiply bar chart, but when the values are similar, the text is not good for readability.
Does any one provide some ideas for improving this? Or exists another library for bar chart, where it is possible to do this?
Use this library MPAndroidChart
It supports multiple type of charts and also dragging, zooming etc.
I am creating a Bar graph in android using agraphchart library, when I go to negative x Axis and zero point then bar graph just disappear.
Can anyone help my with this?
I have a bar graph with 100+ bars and want to zoom in to a specific range upon displaying the graph. For example, when the graph is displayed on the screen I want only the bars 44-49 to be showing. It is important that the users will be able to zoom out to see all 100+ bars as well.
GraphicalView.zoomIn() would work if it allowed me to specify a point to zoom in to.
Thanks!
You can set the visible range on the X axis:
renderer.setXAxisMin(44);
renderer.setXAxisMax(49);
I have implemented a bar graph using AChartEngine. I have added all the required values to the dataset as an XYSeries.The graph is drawn with the first 10 bars drawn when the app is started.I want to programmatically move the graph to a point further on the X-axis i.e I want to move the graph programmatically to display bars 25-35 or some other bars on X-axis.
Could someone please tell me how this can be achieved?
You first need to modify the visible range for the X axis:
renderer.setXAxisMin(25);
renderer.setXAxisMax(35);
Then, just call repaint() on your chart view:
chartView.repaint();
I have created Horizontal bar chart successfully, but
in which i have 20 items but i want to display 5 items on y-axis and others are display when scroll down..
Is there any function or way to solve this.
I have asked question with image on this url : how to ellipsize label of y-axis with bar chart using achartengine
You can control the visibility of the items by restricting the visible area:
renderer.setXAxisMin(minX);
renderer.setXAxisMax(maxX);
There are similar APIs for the Y axis.