i use AFreeChart chart(XYPlot) lib for my project. However i want to get xy-dataset values when i touch curve points, do you have any idea is there any onClicklistener for graph points?
I'm not familiar with aFreeChart but based on this answer the solution would seem to be to add a ChartTouchListener to your chart, this will allow you to access the ChartEntity under the touch point if there is one.
Related
I am looking for a way to draw area chart using MPAndroidChart. I am aware , I can use StackedBar Chart but that doesn't quite serve the purpose.
Is there a way to draw Area chart such as shown below using MPAndroidChart and if not what might be the suitable alternate?
sample image souce-wikipedia
you can make chart as you want using MPAndroidChart.
I tested using sample app in google Play Store(try search 'MPAndroidChart').
try multiLineChart and make option Toggle Filled. I think this is what you're looking for.
I'm trying to create a graph on android using the android graphview library.
1)I need to plot points on the graph (Currently, the options are LineGraph and BarGraph) however i wish to only plot the points without drawing a line.
2) Change the positioning of the X axis and it's labels(such that it shows on the top and not the bottom).
I'm looking through the API but cannot find a way to do these things. Would really appreciate if anyone could help out!
it is not possible do to exactly that what you want with android GraphView but should not be hard to modify the library to do so, because the features already exists.
LineGraphView can draw data points.
take a look at the methods
setDrawDataPoints
setDataPointsRadius
BarGraphView can draw the labels on top of the bar
take a look at the method
setDrawValuesOnTop
In my android application i have developed Graph functionality using aChartEngine android.Every thing fine .I need to draw a circle on the two time series colliding point in graph.Below i show the screen hot of the application.Please help me
One thing is sure here: AChartEngine won't provide you APIs for detecting the intersection point between the 2 lines.
If you can compute that yourself then you could add a third series with one single point that would render the intersection point. You will have to set a point style for this series such as you can see it better.
Is there a way to have a View in my XML file which builds graphs, based on different input from the user? All the graphs should be sin/cos waves....I have asked this on here before but the responses I received don't seem to cover Sin/Cos waves, just simple line graphs. I was told about achartengine, and Google Chart Tools.
You can download the AChartEngine demo here and give it a try.
There is this part of the demo that does exactly what you need.
If you already have the function for the data you're trying to display, you can use the Canvas to plot the data points you want:
Canvas Tutorial: http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html
I am using achartengine and i need some way to draw text and annotations on the graph. Additionally when I slide the graph horizontally the annotations move as well. Is there any way to do it or do I have to implement my own drawing method?
I have edited achartengine source code to add annotations capabilities. You can see it here.