LineChart issue using MPAndroidChart library - android

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.

Related

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.

Android GraphView plot only points on graph and change X axis position

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

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.

AchartEngine Time Chart shifted to the right

I'm using AChartEngine library for Android and in time charts the x labels do not correspond to points on the graph as you can see in images.
It appears that the graph is slightly shifted to the right.
Any hint?
This can be fixed using this:
renderer.setXRoundedLabels(false);

Android Line chart/graph API

I need to show progressive numeric stats to my Line Graph/Chart. Please share your opinion and advice. Please also make a note that I prefer if there would be a native API.
rohit
AChartEngine is a charting library for Android applications. It currently supports the following chart types:
line chart
area chart
scatter chart
time chart
bar chart
pie chart
bubble chart
doughnut chart
range (high-low) bar chart
dial chart / gauge
combined (any combination of line, cubic line, scatter, bar, range bar, bubble) chart
cubic line chart
You can get more information from this link.
Check out Zeitdata Charts. It is very lean and offers line charts and scatter plots. It also allows you to see what a chart would look like from within a layout editor.

Categories

Resources