Android: How to make a chart with a slider in Android? - android

I want to make a time series chart with a slider below that can help me select a segment from the chart. Basically I want the slider to allow me to get the chart values of its two ends.
An example for reference is the chart in Settings->Data Usage in Android 4.0 and above. (I'm adding a link to the image as I lack the required reputation http://i.stack.imgur.com/negbB.png )
Is there any library or method to achieve the same result?

I have 2 chart libraries for you. Hope for help.MPAndroidChartAndroid Charts

Related

How to draw area chart in Android using MPAndroidChart?

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.

Is it possible to pick and choose which y-label values inside a linechart of mpandroidchart are displayed?

Below is the chart I am trying to create using MPAndroidChart library:
required_graph
To create this graph, I need some way to tell the linechart to only show two y-values "Average" and "You". I also need a way to draw a vertical grid-line that only goes up to the circle/y-value. I have searched for tutorials, SO articles, issues on MPAndroidChart github as well as the wiki, but I'm still uncertain how to create the graph above. Is there a way to create this graph with MPAndroidChart? Any help is much appreciated.
Try creating multiple data sets and style them differently. The 1st one should contain all the values, including "Average" and "You", enable fill color and disable drawing the circles.
Then, create a new set with a single value (average) and give it a different style. Do the same with the "you" value.
Good luck !

stacked bar and line chart in same graph with any android library?

Its been almost two days m struggling to use compound graph with following features:-
graph with stacked bar and line chart together.
Two y-axis (one at right and other at left) with differnt data set.
Tooltip that display current touched coordinates of graph.
I had tried following android graph libraries:-
MPAndroidchart
This library doesnt supports compound graphs. But i love this library, since rest features are up to the mark.(wish this would had supported Compond graphs.)
AndroidPlot
It does support Compound graph but no tooltip and multiple y-axis.
AchartEngine
Supports compound graphs. Look and feel is not that good. No tooltip support. Support Heap bar(stacked) but you cannot use this along with any other chart type in same graph.
So, is there any other library that can match my requirement ?
or
how could i implement this using libraries that i mentioned.
I'm fairly sure that HelloCharts can do all of this. The demo app shows a "Combo Line/Column Chart" to satisfy point 1 and a "Speed Chart" to satisfy requirement 2. Point 3 works in all their charts from what I can tell.
The only thing I'm not 100% sure about is if the ComboLineColumnChartView also supports two Y-axis like the LineChartView, but I don't see why not. Let me know if it works.

LineChart issue using MPAndroidChart library

I am trying to make a simple smooth line chart which show the X axis as date-time on bottom and Y axis as normal left side. I just started using MPAndroidChart API and its example app in Git. In the example Line chart I am not able to find option to change X axis labels to show on bottom instead of top as show currently.
Just like:
Also is there a way to handle date-time data for X axis values ?
Also I tried my hand on Androidplot API but to make the line smooth there I need to make changes in library code which is not compiling at all in my Eclipse and giving errors. Also in Androidplot I did not find an option to show popup with data once I click on line chart.
So if anyone know how to make a smooth line chart using Androidplot API without modifying its library code and how to bring small popup with data in Androidplot API please reply.
// XAxis settings
graph.getXAxis().setPosition(XAxis.XAxisPosition.BOTTOM);
graph.getXAxis().setLabelsToSkip(0);
// and
// make the line smooth
graph.getLineData().getDataSets().get(0).lineDataSet.setDrawCubic(true);
Refer this:
http://wptrafficanalyzer.in/blog/android-drawing-line-chart-using-achartengine/
for smooth curve lines please refer this:
How to make line with rounded (smooth) corners with AndroidPlot
Hope this may help you.
AChartEngine is a charting library for Android applications. Using AChartEngine library, we can plot various charts like line chart, area chart, pie chart, time chart, bubble chart etc.

AchartEngine Android Special Pie Chart

I'm using the AchartEngine libraries to make a pie chart app. But I want to display two dimensional data like this
I can get nice standard pie charts but I know how to do the second dimension. Can anyone please help? The guys on the achartengine-google-support group say it's possible but I was redirected here for tech questions.
Many Thanks
If you take a look at the Budget Pie chart demo it shows you how to highlight a section of your pie chart (https://code.google.com/p/achartengine/source/browse/trunk/achartengine/demo/org/achartengine/chartdemo/demo/chart/BudgetPieChart.java). Take a look at "Project 1" below to see how this looks.
However there is no way to change the radius like you want to in your screenshot above. If you want to achieve this the easiest way would be to extend PieChart and copy over the draw method. In the draw method where it renders highlighted sections (if (seriesRenderer.isHighlighted()) ...) use a different radius instead of translating to an offset.

Categories

Resources