achartengine

How to interval between values of x-axis and y-axis using achartEngine

 ̄綄美尐妖づ 提交于 2019-12-08 07:24:48
问题 I am using aChartEngine for graphs in android everything is fine till now...Now i wanna set the time interval between the axes values like x-axis values time interval should be 1.5 so x-axis values will be 0, 1.5, 3, 4.5 etc... Can anybody tell me how to set the time interval.... public class LineGraphDemo extends Activity { XYMultipleSeriesDataset mDataSet; XYMultipleSeriesRenderer mRenderer; private GraphicalView mView; List<double[]> values=new ArrayList<double[]>(); List<Date[]> dates=new

need help in integrating achart-engine with database for android

橙三吉。 提交于 2019-12-08 03:25:09
问题 Can u please help me in creating a simple bar chart (for android) where the values are got from sqlite database. for eg consider the following table year Units Sold 2001 2000 2002 2100 2003 1900 I need to create a bar graph with x-axis as year and y-axis as units sold . Can u Plz consider this as a request . I dont know how to import data from database . 回答1: first you have to fetch the values from the data base and stored into array with corresponding data type . Do like this..... List<int[]

Android - aChartEngine getCurrentSeriesAndPoint() not working for disconnected graph

北城以北 提交于 2019-12-08 01:26:25
问题 I am plotting the wind direction as a xyseries in a TimeChartView using aChartEngine along with windspeed (windspeed is a timeseries using left y-axis, winddir is XYSeries using right y-axis). The problem I am facing is that as the windirection passes north, my values shift between 0 and 360, creating an ugly vertical line in my graph. I would prefer that if the values increased above 360 the graph just got clipped and resumed at 0. By filtering the values and inserting MathHelper.NULL_VALUE

Achartengine - different Bar Color for BarChart in android

六眼飞鱼酱① 提交于 2019-12-07 13:02:31
问题 I have created one graph in android using AchartEngine library. I want to display every Bar with different color. What can i do, please give me some suggestion..? Thanks in Advance 回答1: Just look at answer given here. In this he is giving different color to only one bar. Take idea of it and try to make it custom according to your requirements. 来源: https://stackoverflow.com/questions/15631408/achartengine-different-bar-color-for-barchart-in-android

How to plot a bar chart in android?

孤街浪徒 提交于 2019-12-07 12:33:56
问题 I have created a bar chart using achartengine but the values plotted in the graph is static. Now i have created a database using sqlite and i want to draw the bar chart using the values from the database and refresh it every 1 min so that it plots new values if any. I am posting my code below. Please guide me on how to modify the code so that i can do the above. I tried many tutorials online but it didnt help much. package flu.solutions.travelsense; import java.util.ArrayList; import java

How to set the background image for achartengine line chart in android?

99封情书 提交于 2019-12-07 02:44:54
问题 I am using achartengine to dispaly the line chart in my application.I need to add the bg image for the chart , but when I set the bg image in xml , its not working. Have anyone tried this? Thanks in advance. 回答1: Firstly, you need to add chart into your activity, and set preferred image as background in activity layout. (Take a look at XYChartBuilder in AChartEngineneDemo to see how to do that) Secondly, set transparent background for chart and chart margin: mRenderer.setApplyBackgroundColor

need help in integrating achart-engine with database for android

不想你离开。 提交于 2019-12-06 16:40:17
Can u please help me in creating a simple bar chart (for android) where the values are got from sqlite database. for eg consider the following table year Units Sold 2001 2000 2002 2100 2003 1900 I need to create a bar graph with x-axis as year and y-axis as units sold . Can u Plz consider this as a request . I dont know how to import data from database . first you have to fetch the values from the data base and stored into array with corresponding data type . Do like this..... List<int[]> initial; int[] my_year; int[] my_units_sold; public void onCreate() { int Column1 = net_db_cur

How can I draw a sparkline with achartengine without a border?

别等时光非礼了梦想. 提交于 2019-12-06 13:55:03
问题 I have written a simple app widget that tries to display a time chart as a sparkline using the achartengine library. My renderer is: final XYMultipleSeriesRenderer multipleRenderer = new XYMultipleSeriesRenderer(); final XYSeriesRenderer renderer = new XYSeriesRenderer(); multipleRenderer.addSeriesRenderer(renderer); multipleRenderer.setShowAxes(false); multipleRenderer.setShowLabels(false); multipleRenderer.setShowLegend(false); multipleRenderer.setShowGrid(false); and after creating a

Android AchartEngine :superposable bar in the same X-axis coordinate

本秂侑毒 提交于 2019-12-06 10:41:31
I'm using achartEngine library ,and i'm drawing a bar graphe .I would like to have a superposable bars for example if they have the same X coordinates. This is what i wont to obtaine : This is what i'm actualy obtaining : If two bars hve the same x ,they are just neighbors.And this is not clear to undertand and specialy if i have more then two bars with the same x. And this is the code i'm using : public class TruitonAChartEngineActivity extends ActionBarActivity { private static int SERIES_NR ; //the number of columns to display, List<int[]> values = new ArrayList<int[]>(); @Override

AchartEngine annotations

旧时模样 提交于 2019-12-06 07:23:59
everywhere i look, the only information I can find says to add them via the following code series.addAnnotation("Hello!!", 1, 1); However, When I try it in my code (with the proper series name) I get an error message that says addAnnotation is not supported. Can someone please clear this up for me? thanks! You must download a recent version of the library. For example, get the night build from here . In your code, replace the last line (the one where you return the chart view) with: XYMultipleSeriesDataset dataset = buildBarDataset(titles, values); XYSeries series = dataset.getSeriesAt(0);