achartengine

Different color bars using multiple series

☆樱花仙子☆ 提交于 2019-11-28 09:26:27
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 = 2000; int expense = 2700; System.out.println("Here"); Series1.add(x[0],income); Series2.add(x[1]

achartengine toScreenPoint(double) always returns nullPointerException

爱⌒轻易说出口 提交于 2019-11-28 08:15:06
问题 Every time I call this method it return nullpointerexception: java.lang.NullPointerException at org.achartengine.chart.XYChart.toScreenPoint(XYChart.java:867) I see mScreenR of chart is null Without using this method toScreenPoint(double) the charts works well this is the code: package com.insights.insights.gui; import java.util.ArrayList; import org.achartengine.ChartFactory; import org.achartengine.GraphicalView; import org.achartengine.chart.LineChart; import org.achartengine.chart

AChartEngine transparent background

谁说我不能喝 提交于 2019-11-28 08:13:07
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 properly: As you can see, there is a black box appearing behind the x-labels. What am I doing wrong? Thanks

save user data during a day (the same day -> many user data)

我与影子孤独终老i 提交于 2019-11-28 07:45:53
问题 I have an application where the user enters data in edittext and presses the save button. By pressing 'save' I save in a file the user data (in one column) and the current date (in the other column). Then , I press another button and make the plot (using achartengine) date (x axis) data (y axis). So, entering data during a day ,results in saving for example: "1" (user data) -> 20/4/2013 , "2" -> 20/4/2013 , "3" -> 20/4/2013. And in plot I have 3 points in y axis (ok) and 3 points in x axis

AChartEngine graph using two y axis

耗尽温柔 提交于 2019-11-28 05:23:02
问题 I am currently trying to create a graph using AChartEngine containing two y-axis (one to the left, one to the right). Yet, I cannot seem to figure out how I can actually add the second y-Axis. An XYMultipleSeriesRenderer only has got one setYTitle() method. Has someone ever achieved this and can give me a hint? Thanks, Matthias 回答1: You can do that, indeed. Please see an example for this here. The result looks like . 来源: https://stackoverflow.com/questions/8786435/achartengine-graph-using-two

Bar chart using achartengine

亡梦爱人 提交于 2019-11-28 05:06:41
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, "", "", "", 0,5, 0,100, Color.WHITE, Color.WHITE); renderer.setXLabels(8); renderer.setYLabels(10); renderer

achartengine demo compiling, but runtime error

余生颓废 提交于 2019-11-28 02:51:39
问题 I followed demo instructions on page http://www.achartengine.org/content/goodies.html i successfully imported the demo project, but every chart give throws a NoClassDefFoundError at runtime, similar to this: java.lang.NoClassDefFoundError: org.achartengine.model.XYMultipleSeriesDataset achartengine-1.0.0.jar is on build path, and it is reported under 'Referenced Libraries'. I guess this is a newbie problem, but I decided to report it since I just imported the demo project 'as is' and tried to

how to implement TimeChart in achartengine with android

会有一股神秘感。 提交于 2019-11-27 20:54:05
I'm new in android and I want to use achartengine to implement time chart that represent the daily outgoing call durations from call log. Does any one know how can I do this and what should I do? toni So you need a layout (main.xml): <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <LinearLayout android:id="@+id/chart" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" />

Is achartengine ready for realtime graphing?

筅森魡賤 提交于 2019-11-27 18:06:55
问题 I'm trying to graph some real-time data, "realtime" here means < 10msec data, ideally as low as possible. I've been able to get Android to fetch and process data this fast but ACE just looks like it's not been designed for real-time use in mind. First symptoms are that garbage collector kicks in like there's no tomorrow and totally kills the app. I'm visualizing data on a "sliding window" fashion so it's not like I'm expecting ACE to plot in real time hundreds of thousandths of points. I've

Android charting libraries [closed]

拟墨画扇 提交于 2019-11-27 16:56:49
I am trying to find a fast and reliable charting library. After some searching, I found 4 libraries: AChartEngine , WilliamChart , HelloCharts and AndroidPlot . I need some up to date feedback about the performance and the stability of these libraries because all the information I could find was outdated. You can use MPAndroidChart . It's native, free, easy to use, fast and reliable. Core features , benefits: LineChart, BarChart (vertical, horizontal, stacked, grouped), PieChart, ScatterChart, CandleStickChart (for financial data), RadarChart (spider web chart), BubbleChart Combined Charts (e