achartengine

How to draw two Y-axis with different scaling in AChartEngine

拈花ヽ惹草 提交于 2019-12-10 19:09:27
问题 I have problem in drawing two Y-axis (one at right and one at left) with different scaling in AChartEngine: I want left side to be scaled from 0 to 40 which is correct, But the right side scaling is not the desire one, as it should be from 10 to 100. Please help me. My source code look like this public LinearLayout execute(Context context) { String[] titles = new String[] { "Ciggars" }; List<double[]> x = new ArrayList<double[]>(); for (int i = 0; i < titles.length; i++) { x.add(new double[]

AchartEngine simple animation

浪尽此生 提交于 2019-12-10 18:47:13
问题 Would it b possible using the achartengine library to make it so that when a graph is plotted it makes it look like animated like in case of column charts columns are generated from bottom of the screen slowly moving upward? 回答1: You can have dynamic charts meaning that you add data at runtime and then update the chart, but you cannot have animations in AChartEngine as it is out of the box. 来源: https://stackoverflow.com/questions/12453718/achartengine-simple-animation

Achartengine legend location

强颜欢笑 提交于 2019-12-10 15:04:36
问题 Does anyone know how to change the location of the legend? I am trying to expand the graph to make use of all the space. So far I have mRenderer.setMargins(new int[] { 20, 30, -50, 0 }); This expands the graph lower but the legend stays in the same location so it is now above the x axis I tried mRenderer.setLegendHeight(5); with both negative and positive values. I'm not sure what this is supposed to do but it makes my graph go wayyyy low on the the screen (turns it into a scrollable view).

AchartEngine annotations

徘徊边缘 提交于 2019-12-10 10:55:11
问题 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! 回答1: 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:

Error: eglSurfaceAttrib not implemented

陌路散爱 提交于 2019-12-10 10:24:17
问题 I am trying to display a line graph using aChartEngine, however, the page is coming up blank and I am receiving the error "eglSurfaceAttrib not implemented" Code for Progress(display) page: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin"

Label Text size according to the screen size in a chart engine pie chart in android

我怕爱的太早我们不能终老 提交于 2019-12-10 03:28:38
问题 I am successfully displaying pie chart using achart engine.I want to customize my labels text size according to the screen size.Thanks in advance. 回答1: You can set the labels text size this way: renderer.setLabelsTextSize(size); You will have to find the best logic for finding the best proportion between the screen size and the labels size. 回答2: This problem comes down to resolution. achartengine seems to have been designed with raw pixels in mind while display quality and pixel density has

How to make space between bars in bargraph using Achartengine if each bar is different color containing different values

廉价感情. 提交于 2019-12-09 02:49:24
问题 I am displaying 4 values in a bargraph where each bar is different color. when I am displaying the graph each bar overlapping each other. I want to make space between the bars I tried with setBarSpacing() by putting different values still its not working. is there any other idea. package com.example.barchartview; import org.achartengine.ChartFactory; import org.achartengine.GraphicalView; import org.achartengine.chart.BarChart.Type; import org.achartengine.model.CategorySeries; import org

Passing an array with android-intent

Deadly 提交于 2019-12-08 14:03:33
问题 I'm using the achartengine library and I would like to pass an array of graph point through an intent so that when I click on a button it opens up a graph with the data from the main activity. At the moment I am using a hard coded array called x in Activity A and trying to pass it to activity B. Activity A: public void lineGraphHandler (View view) { LineGraph line = new LineGraph(); Intent lineIntent = line.getIntent(this); lineIntent.putExtra("points", x); startActivity(lineIntent); }

How to take the values from a database to plot a bar chart?

回眸只為那壹抹淺笑 提交于 2019-12-08 13:43:42
问题 Hi i am new to android and i am developing an app to display the top 10 travel destinations using achartengine. The problem is that i am using random values generated to plot the graph. What i need is to connect a database created using sqlite data browser to plot the graph. I am following the following tutorial to draw the graph http://www.youtube.com/watch?v=E9fozQ5NlSo. But i am not finding many tutorials on how to connect a database to plot a bar chart. Please post any links for the above

chart no plotting

放肆的年华 提交于 2019-12-08 09:37:07
问题 I have written the following code to plot a graph but it is not plotting and i haven't got any errors. Please tell me what i am doing wrong. I am trying to create a bar chart by taking the values from a database. package flu.solutions.travelsense; import org.achartengine.ChartFactory; import org.achartengine.chart.PointStyle; import org.achartengine.model.TimeSeries; import org.achartengine.model.XYMultipleSeriesDataset; import org.achartengine.renderer.XYMultipleSeriesRenderer; import org