achartengine

Android achartengine simple pie chart

廉价感情. 提交于 2019-12-19 08:06:14
问题 I'm following an example in this link and created a class as below public class aChartExample { public Intent execute(Context context) { int[] colors = new int[] { Color.RED, Color.YELLOW, Color.BLUE }; DefaultRenderer renderer = buildCategoryRenderer(colors); CategorySeries categorySeries = new CategorySeries("Vehicles Chart"); categorySeries.add("cars ", 30); categorySeries.add("trucks", 20); categorySeries.add("bikes ", 60); return ChartFactory.getPieChartIntent(context, categorySeries,

Achartengine XYMultipleSeriesRenderer renderes chart for null values and shows undesired spacing b/.w bars

ぐ巨炮叔叔 提交于 2019-12-19 04:54:16
问题 I have developed a bar chart using a chart engine, and I have used multiple series showing different colored bars on the basis of customisation done on the data. But when there is null value for one bar , XYmultiseriesrenderer still renders the chart and creates undesired spaces between the bars. private void openChart(){ //int[] x = { 0,1,2,3,4,5,6,7,8,9}; int[] income = { 230,220,230,250,270,300,280,350,370,400}; int[] expense = {220, 270, 290, 280, 260, 300, 330, 340}; int[] colors =

Different color bars using multiple series

时光怂恿深爱的人放手 提交于 2019-12-17 19:07:25
问题 I am totally new to Android and i am trying to create a bar chart using AChartEngine, it has 3 bars and each bar should be different color. I tried using multiple series but can't make my x-axis values align with bars protected void onResume() { super.onResume(); layout = (LinearLayout) findViewById(R.id.chart); if (mChartView == null) { PeakSeries = new XYSeries("Income"); ForecastPeakSeries = new XYSeries("Expense"); ForecastSeries = new XYSeries("Expense"); int[] x = { 1,2,3}; int income =

AChartEngine transparent background

别等时光非礼了梦想. 提交于 2019-12-17 18:36:33
问题 I have a problem. I'm making a graph with AChartEngine and I would like to have the background of the whole graph to be transparent: XYMultipleSeriesRenderer renderer = new XYMultipleSeriesRenderer(); (...) renderer.setMargins(new int[]{0,0,0,0}); renderer.setApplyBackgroundColor(true); renderer.setMarginsColor(Color.TRANSPARENT); renderer.setBackgroundColor(Color.TRANSPARENT); (...) GraphicalView g = ChartFactory.getTimeChartView(this, dataset, renderer, "dd/MM"); But it isn't working

Bar chart using achartengine

风流意气都作罢 提交于 2019-12-17 17:46:13
问题 I want to draw a bar chart which contains five individual bars - I have used Achartengine. I am able to display all five bars in the same color but I want to differentiate one bar with a different color, but I cant display more than one color. Please show me how to display different colors. My code... values.add(new double[] {21,56,33,10,20}); int[] colors = new int[] { Color.rgb(227, 121, 15) }; XYMultipleSeriesRenderer renderer = buildBarRenderer(colors); setChartSettings(renderer, "", "",

The application AChartengine has stopped unexpectedly. Please try again

浪尽此生 提交于 2019-12-17 12:21:22
问题 I just tried to use achartengine demo, but every time I click on something to show the chart appears an error saying "The application AChartengine has stopped unexpectedly. Please try again". Someone knows to tell me how can I do? I followed the instructions suggested in this page http://www.achartengine.org/content/goodies.html and I use an emulator standard with api level 7. I have these errors: 04-15 09:08:43.285: E/dalvikvm(333): Could not find class '[Lorg.achartengine.chart.PointStyle;'

The application AChartengine has stopped unexpectedly. Please try again

﹥>﹥吖頭↗ 提交于 2019-12-17 12:21:02
问题 I just tried to use achartengine demo, but every time I click on something to show the chart appears an error saying "The application AChartengine has stopped unexpectedly. Please try again". Someone knows to tell me how can I do? I followed the instructions suggested in this page http://www.achartengine.org/content/goodies.html and I use an emulator standard with api level 7. I have these errors: 04-15 09:08:43.285: E/dalvikvm(333): Could not find class '[Lorg.achartengine.chart.PointStyle;'

aChartEngine: getting coordinates of any point on the graph area

风流意气都作罢 提交于 2019-12-14 02:42:51
问题 I am using achartengine to display line graphs.And i am stuck at trying to get the coordinates of a point on touch (not the coordinates on the line graph but anywhere in the graph area). so i think getSeriesAndPointForScreenCoordinate(...) wont help in this case. Any suggestions? 回答1: try using this code : myXYPlot.setOnTouchListener(new OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { // TODO Auto-generated method stub switch (event.getAction()) { case

how to prevent the graph from overwriting the previous plot using achartengine

 ̄綄美尐妖づ 提交于 2019-12-13 18:18:45
问题 I have made the plot to repaint the graph from the first once it reaches end. Now my problem is the graph gets overwritten. The previous plot remains as such. So, how should i repaint after clearing the previous plot? And by clearing i should not loose the previous data. It should remain as such when i scroll.Can someone help me with this pls? 回答1: I will try to answer the questions I understood: You can clear data from the previous series, by removing it You can control the visible area by

Achart Engine - Piechart 2nd color starts from off - center is it a bug?

流过昼夜 提交于 2019-12-13 06:27:28
问题 i am working on a pie chart: below is the screen shot of that. when we enter these values double[] values = new double[] { 2, 12, 5 }; the result looks like this. As we can see the green color line is starting from off - center. Is this a bug? 来源: https://stackoverflow.com/questions/14730376/achart-engine-piechart-2nd-color-starts-from-off-center-is-it-a-bug