achartengine

IllegalArgumentException: radius must be > 0

北战南征 提交于 2019-12-05 00:31:16
I'm designing a bar graph and a pie chart in a view pager using AChartEngine library. When I scroll from bar graph to pie chart, application crashes. The crash report is as following. FATAL EXCEPTION: main java.lang.IllegalArgumentException: radius must be > 0 at android.graphics.RadialGradient.<init>(RadialGradient.java:58) at org.achartengine.chart.PieChart.draw(PieChart.java:112) at org.achartengine.GraphicalView.onDraw(GraphicalView.java:168) at android.view.View.draw(View.java:11120) at android.view.ViewGroup.drawChild(ViewGroup.java:2901) at android.view.ViewGroup.dispatchDraw(ViewGroup

My Android AChartEngine is already working, but how to make it look good?

自古美人都是妖i 提交于 2019-12-04 23:02:33
问题 I guess the title gives away most of my questions, but let's detail and give a bit of background: I have an Android app focused mainly for tablets that will be displaying a few different real-time data in TimeCharts. So I already have a service to communicate with the data source that grabs the data, parse it and add the values to singletons TimeSeries. When the user navigates in and out of fragments the fragment simply adds the correct TimeSeries and keeps calling mChartView.repaint(); every

How to set Image inside of Donut-achartEngine Graph?

蹲街弑〆低调 提交于 2019-12-04 15:32:32
问题 I am using aChartEngine Library to make donut graph.But having problem to add image inside of donut Graph. I can set Background Color only , but not get able to set background image inside of donut. Please check image . 回答1: This could help.. <RelativeLayout android:layout_width="match_parent" android:layout_height="170dp" > <LinearLayout android:id="@+id/left_graph_for_head_injury" //here to draw donut android:layout_width="match_parent" android:layout_height="170dp" > </LinearLayout>

LinearLayout achartengine Chart not displaying in ScrollView

别来无恙 提交于 2019-12-04 12:11:40
问题 I'm trying to create an achartengine chart within a scrollview but it won't display! It just shows a black screen, but doesn't crash or anything. The thing is if I just change my tag to the chart displays just fine. And in my Java code I do have renderer.setInScroll(true); for the charts renderer. Is this an issue with my xml? Here is my xml: <?xml version="1.0" encoding="utf-8"?> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android

achartengine custom zoom buttons

拈花ヽ惹草 提交于 2019-12-04 08:16:11
Is there an easy way to use custom images for Zoom Buttons? I'd like to use default setZoomButtonsVisible functions to manage show/hide buttons. How can I override those buttons? I'd like to use icons from my res/drawable (drawable-hdpi, drawable-ldpi ..) to make sure images will be good looking on all screens. toni You can hide original zoom buttons and enable external zoom: private XYMultipleSeriesRenderer mRenderer; //or any of other renderer mRenderer.setZoomButtonsVisible(false); mRenderer.setExternalZoomEnabled(true); //then add click events tot he imagebuttons on the view //mChartView -

how to fill array list between 2 points?

孤街醉人 提交于 2019-12-04 06:10:40
问题 i have this piece of code. To explain: The user inputs "initcores" data and "ttime" data (the "fcores" is a result). I want to fill the x array with values from 0 to ttime and the y from initcores to fcores and do the scatter plot ,x vs y. I have one problem : If i put " for (double t=0;t<=fcores;t=t+fcores/10.0){ y.add(t); " it gives me a plot but its wrong. if i put " for (double t=initcores ;t<=fcores;..." (which is right because we are starting from initcores) it doesn't appear anything

customizing Piechart displayed by using ChartEngine

无人久伴 提交于 2019-12-04 05:39:34
问题 I am successfully displaying charts by using Chart Engine but I am suffering from below problems: I am unable to reduce the Chart Size. Chart is moving on the screen but I don't want that. I want to display one more image in the bottom of the screen but here chart is displayed in the middle of the screen. I just want to display chart at the top and below image(How to set margins). Please any one can help me.Thanks in advance. Following is my code: public class MainActivity extends Activity {

How to Display AChartEngine bar chart properly

南楼画角 提交于 2019-12-04 05:07:07
I am using achartengine 1.0.1 (latest) and want to demonstrate a bar chart. This is what I want: My Desired Graph What I achieved so far 1:1 view: Zoom-out View: Problems: the left and right portion of graph are lost in 1:1 view. The distance between Bar is so much high. I need to reduce it. The Bar is not appropriately above the text label. The text label color is white. I tried setLabelColor() but not working. The text-size above bar is small. XAxis Text "AC", "WA" etc are overlapping with 1, 2, 3. I want to remove 1, 2, 3 and only show "AC", "WA" etc. Do you know how to fix these problems?

AChartEngine does not display the maximum chart value

别等时光非礼了梦想. 提交于 2019-12-04 04:49:10
问题 I am trying to display horizontal bar chart using AChartEngine. In the bar chart, ChartValues should be displayed. (I am using XYSeriesRenderer.setDisplayChartValues(true) in my code.) Following is the rendered chart. As you can see, the maximum value is not displayed. I think the length of the x-axis (about 140) region is not enough to display the region of maximum chartvalue. Anyway, how can I display the maximum chartvalue in my chart? Here's my code. renderer.setColor(Color.parseColor("

How to set different values for Legend and Labels in piechart While I am using Chart Engine in android

匆匆过客 提交于 2019-12-04 04:20:14
问题 Hi I am using A chart Engine to display pie chart in android.In my code I want to show values on labels and area corresponding to that vale on legend.But I am unable to get that one.Please can any one helps to me.Thanks in advance. I want like below 回答1: Displaying the pie labels with separate values from the legend labels is not possible in AChartEngine. However, you can display the pie slice value (age in your case) in the middle of each slice, using: renderer.setDisplayChartValues(true);