achartengine

setcontent view not working

荒凉一梦 提交于 2019-12-22 20:43:11
问题 button.setOnClickListener(new View.OnClickListener(){ public void onClick(View v){ setContentView(R.layout.activity_chart); } }); Hi i have the above code wherein upon clicking a button i am trying to display them activity activity_chart. In that activity i want to display a graph. Here i am calling a method createIntent(). But my problem is that the graph is not getting plotted. Please help i am new to android. protected void onCreate(Bundle savedInstanceState) { super.onCreate

Android achartEngine how to highlight particular chart element

旧巷老猫 提交于 2019-12-22 10:06:46
问题 Hi i am using achartengine's pie-chart to represent my actual sales, now as my app starts one of the chart element in the piechart should get highlighted, like when we do the onclick on pie chart. Below is the code for my piechart final DefaultRenderer renderer = buildCategoryRenderer(colors); renderer.setPanEnabled(false);// Disable User Interaction renderer.setLabelsColor(Color.BLACK); renderer.setShowLegend(true); renderer.setLegendTextSize(20); renderer.setInScroll(true); renderer

Changing the legend size in AChartEngine

有些话、适合烂在心里 提交于 2019-12-22 08:38:18
问题 I would like to specifically change only the legend size outputting for a Pie Chart. I've tried all methods I can find for AChartEngine, but none of them only change the legend text size. Do I have to override the onDraw function? If so, how? 回答1: For setting the legend height use: renderer.setLegendHeight(height); You can also have the legend take only the exact space it needs: renderer.setFitLegend(true); To change the legend text size: renderer.setLegendTextSize(textSize); 回答2: To change

Highlighting Pie Chart Slice When Clicked in AChartEngine

懵懂的女人 提交于 2019-12-22 08:29:31
问题 I want to highlight (change color) of a pie graph specific slice when clicked by the user. I can find in the samples (the code below) that it is possible to show the index of the slice and the exact point. but what about recoloring the slice ? mChartView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { SeriesSelection seriesSelection = mChartView.getCurrentSeriesAndPoint(); if (seriesSelection == null) { Toast .makeText(PieChartBuilder.this, "No chart

Make x-axis in vertical center using AChartEngine

情到浓时终转凉″ 提交于 2019-12-21 22:30:22
问题 I am am going to make a app where i want to create a xy graph. AchartEngine API looks very attractive to me. I have seen all their examples and demos, Searched their forum but cant figure it out that if it can able to match my requirements. So here is my question: I want a xy graph where: Make the graph non scrollable. (Pending) Make the x-axis vertically center as shown in image. (Pending) Show labels only on x-axis. (Pending) The Second Question is most important to me. Can some holly sole

achartengine custom zoom buttons

偶尔善良 提交于 2019-12-21 17:06:29
问题 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. 回答1: You can hide original zoom buttons and enable external zoom: private XYMultipleSeriesRenderer mRenderer; //or any of other renderer mRenderer.setZoomButtonsVisible(false);

achartengine x-axis labels shift compared to values

守給你的承諾、 提交于 2019-12-20 14:23:27
问题 I noticed that the Xlabels of my Timechart are out of sync with the X- values. The points should be right above the labels. On the left side it OK, but it shifts towards the right. I don't know how to solve this What i get: http://tinypic.com/r/2uqj905/7 How it should be like: http://www.achartengine.org/dimages/average_temperature.png I tried a line chart or converted the date to a double but that had no effect. Any help would be be nice. regards, Christian This is some of my code:

dataset and renderer should not be null and should have same number of series in AChartEngine

丶灬走出姿态 提交于 2019-12-20 06:34:41
问题 I'm using Multiple Y axis Graph for plotting points I have 1)X-axis 2)Y1-axis 3)Y2-axis a)Initially I used to draw 5 series of lines on Y1 axes(Height) and Same 5 series of lines(Weight) on Y2 axes both with respect to x-axis,,,,No problem exists here,,,these series of lines are standard lines and used for every calculation,, b)Now If user enters both his height and weight I draw two extra Lines ,so there are 12 series of lines including standard lines,, c)Supppose if the user enters alone

dates in x axis are superimposed - plot shows the last entered data 2 times (when not using setXAxisMax)

佐手、 提交于 2019-12-20 05:59:12
问题 (I fixed some issues with saving and loading regarding my previous posts) I am saving some data (mydata) and the date as strings (dates_Strings). In graph activity I load data and dates.And I convert dates_Strings to dates in order to use them in the plot. Now , while entering some data for example "1","2","3" in 10/05/13 I am getting the following image. All good until now. If I try to enter some more data ("3,4,7") in another date (13/05/13) I am getting this image. The dates are

Android: Broadcastreceiver with Achartengine ,don't display updates

风流意气都作罢 提交于 2019-12-20 04:23:45
问题 I'm trying to display information got from wifi scan with broadcast receiver ,into a bar chart using achartengine. Well i want to have a real time chart ,every time i receive data from onReceive() method ,i update the chart. To achaeive that ,i create the chart objects in the onReceive() method .But i just get a chart with the first result ,there is no update ,although i can see the changes on the wifi scan. I would like to know what is the problem. This is the code that i'm using: public