achartengine

Graph goes out of view when margin color set to transparent in AchartEngine

别来无恙 提交于 2019-12-25 03:55:09
问题 I am trying to match the line chart background with the whole layout bg. so i tried following to set the background of chart. It matched with the bg but when i dragged the graph it goes out of view. mRenderer.setMarginsColor(Color.argb(0x00, 0xff, 0x00, 0x00)); Here is the screenshot: If needed further information, let me know. Please help guys. Here is the code XYMultipleSeriesDataset mDataset = new XYMultipleSeriesDataset(); XYSeries mSeries = new XYSeries("Weight"); for (int i = 0; i <

How to draw trade line on Scatter Chart in android?

↘锁芯ラ 提交于 2019-12-25 02:22:17
问题 I am developing application which requires scatter chart. For scatter chart I am using Apache aChartEngine library to draw scatter chart but I needto draw Trade line also on that scatter chart. aChartEngine is not supports Trade line functionality.So anyone has Idea how to draw Trade line on scatter chart in android. Edit Here is my code. protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); TrendLine t = new

AchartEngineLine Chart in android - Line disappears while panning

久未见 提交于 2019-12-25 01:56:14
问题 I am facing an issue in AchartEngine Scatter chart in android. The line between each point, disappears when panning after set zoom to a level. I had tried hardwareAcceleration to false and setLayerType to null and all. But, issue remains. Achartengine version 1.1.0. Android device - Galaxy S4, S3. Can you please help me on this ? Screenshot is placed here at, http://i.stack.imgur.com/hq5r4.png Thanks JRH 回答1: After two days of effort, I was able to solve the issue. It was due to Float.NaN for

achartengine chart will not zoom even though zoom is enabled

心不动则不痛 提交于 2019-12-24 17:31:38
问题 I am running a data request from a service on a thread. I cannot seem to get pan or zoom to work for this app. Here is the method where I am setting it to allow zoom . I have also checked that zoom is enabled. private void getRPData2() { final ScadaDataList l = new ScadaDataList(); final long value = new Date().getTime() - 3 * TimeChart.DAY; new Thread(new Runnable() { public void run() { try { //System.out.println("made it"); l.Load(Cookie); final Date d = new Date(); runOnUiThread(new

All chart values do not show in line graph in achartengine

夙愿已清 提交于 2019-12-24 16:07:40
问题 Iam creating a line graph with 2 lines. Everything is displayed properly except when i use renderer.setDisplayChartValues(true) the values are plotted but not all titles of the values are displayed. Can anybody help me with this? Thank you Here is the code renderer1 = new XYSeriesRenderer(); renderer1.setDisplayChartValues(true); renderer1.setColor(Color.parseColor("#FFDC143C")); renderer1.setPointStyle(PointStyle.CIRCLE); renderer1.setFillPoints(true); rRenderer.addSeriesRenderer(renderer1);

Android AChartEngine : Hide tick marks in axes

被刻印的时光 ゝ 提交于 2019-12-24 15:29:53
问题 Am trying out some graphs in an Android App with AChartEngine (version 1.2.0). I want to hide the tick marks in the axes (i.e. the small lines at each label displayed on the axes). I have marked two of them in red-colored-boxes in the screenshot below: how do I do it? Can someone please help? I read here (https://code.google.com/p/achartengine/issues/detail?id=336) that there is a multirenderer.setShowTickMarks(false); method. But am not getting to see that method in the XYMultipleSeries

How to plot real time line graph

杀马特。学长 韩版系。学妹 提交于 2019-12-24 13:49:49
问题 I am creating sound meter app in android I want to show values in line graph on real time anyone please tell me how I can do it? 回答1: For time operations please see android.text.format.Time http://developer.android.com/reference/android/text/format/Time.html This is official sample code from there: Time time = new Time(); time.set(4, 10, 2007); // set the date to Nov 4, 2007, 12am time.normalize(false); // this sets isDst = 1 time.monthDay += 1; // changes the date to Nov 5, 2007, 12am millis

Changing color of bars in different bar charts within same application

本秂侑毒 提交于 2019-12-24 10:54:05
问题 I have 3 buttons displaying 3 different bar charts in the same application. when i click any of the button it displays bar chart with same color as shown by others. Now i want to display these 3 bar charts in 3 different colors. How is it possible? Any help will be appreciated. 回答1: Use the XYSeriesRenderer.setColor function and set it to a different colour for each Barchart . 回答2: In order to do this, you will have to have each bar added to a separate series. 来源: https://stackoverflow.com

customizing Piechart displayed by using ChartEngine

佐手、 提交于 2019-12-24 10:26:59
问题 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 {