achartengine

Android Layout issue: Unable to add two layouts of two charts using addView (logcat error included)

℡╲_俬逩灬. 提交于 2019-12-11 16:03:48
问题 I am trying to add two dynamic line charts in vertical using AChartEngine. However I am getting some problem with the layout. Added below are the related java files, xml file and logcat(I have other java files like Ubidots.java , Point.java and Context.java but I don't think these are required here). LineGraph.java: public class LineGraph { private GraphicalView view; private TimeSeries dataset = new TimeSeries("LDR Values"); private XYMultipleSeriesDataset mDataset = new

Real-time graph with AChartEngine: Chart plotting last retrieved value from cloud database even when no value is sent to cloud

不羁的心 提交于 2019-12-11 16:03:30
问题 I am using AChartEngine to plot values obtained from Ubidots in real-time. The graph is retrieving values in real-time however when no value is being sent on Ubidots, the last retrieved value sent on Ubidots is being plotted again as shown in the screenshot. Here are my codes: LineGraph.java: public class LineGraph { private GraphicalView view; private TimeSeries dataset = new TimeSeries("LDR Values"); private XYMultipleSeriesDataset mDataset = new XYMultipleSeriesDataset(); private

AChartEngine Time Chart with multiple Y scales and axis

巧了我就是萌 提交于 2019-12-11 14:29:18
问题 How can I create a Time Chart with multiple Y scales and axis with AChartEngine? Thanks 回答1: You will have to build a CombinedXYChart of line charts and use custom labels instead of the default ones. TimeChart is not supported in the CombinedXYChart . Update : See this example and just create a time chart instead of a cubic line chart. 来源: https://stackoverflow.com/questions/15623752/achartengine-time-chart-with-multiple-y-scales-and-axis

AChartEngine And Android Studio

[亡魂溺海] 提交于 2019-12-11 12:17:39
问题 I have to create an application that makes extensive use of charts. Reading the web I chose achartengine that seems to have everything I need. I downloaded the jar file, I plugged in the libs folder, I selected "add to library" and I lunch the gradlew clean. Result in the sources where I do the import of org.achartengine.xxxx I always returned the error that fails to resolve symbols . Do you have suggestions? Thank you Andrea 回答1: I am able to use this library in my Android Studio project,

Achart Engine Line chart - Display pop up on click of point

点点圈 提交于 2019-12-11 11:39:48
问题 I am using Achart Engine Line chart to display values, i am using point style CIRCLE. I am trying to implementing the below : 1) Increase the point style width - i mean the circle should be bit bigger. 2) On click of each point i want a popup to be displayed on top of that which will display the values of X and Y. I have done some research on this but was not able to find the solution. I found this code but how to display the small popup with values ? final LineChart chart = new LineChart

Create AChartEngine TimeChart using Time in Y-Axis

孤街醉人 提交于 2019-12-11 10:11:53
问题 I have some data representing answered questions in particular time e.g. Question 1 answered in 00:00:20. I am trying to use AChartEngine to represent this but with no luck. First of all I can't have Y values as this format for a reason, guess it's not supported or needs customization which couldn't find a way till now to achieve. My chart should have in the end the X-Axis with values 1, 2, 3, 4, 5.... and Y-Axis with 00:00:20, 00:00:15, 00:00:05, 00:00:10.... The time achieved in each

Displaying time chart in achartengine based on months and years

给你一囗甜甜゛ 提交于 2019-12-11 08:48:49
问题 I have a line graph based on my database values where y axis has values and x axis has dates. As of now the chart is displayed date wise. But i want to display it different time periods like monthly and yearly. Can anyone give me any ideas for this? Thank you Here is my code:- FuelStoredInfo reportInfo =new FuelStoredInfo(context); reportInfo.open(); fPrice=reportInfo.getReportData(this); fMileage = reportInfo.getReportMileage(this); fDates =reportInfo.getReportDates(this); reportInfo.close()

Cross-Device Compatibility Issue of AChartEngine Bar Graph

穿精又带淫゛_ 提交于 2019-12-11 07:48:36
问题 I am able to develop a Bar Graph with the help of Dan in a 7" tablet emulator and to make it fitted in this screen I used setXAxisMax() and setXAxisMin() . Here is the graph I obtained on that emulator: But when I installed it my phone with different screen, it looked like this: Portrait Landscape This is my code: ........................ XYMultipleSeriesRenderer mRenderer = new XYMultipleSeriesRenderer(); mRenderer.setChartTitle("Submission Statistics"); // mRenderer.setXTitle("Verdict Code"

AchartEngine get position of touched point

孤者浪人 提交于 2019-12-11 07:38:14
问题 I use achartengine to draw a line chart. I use this code to get current point sellected `view.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { // handle the click event on the chart quickAction.show(v); SeriesSelection seriesSelection = view.getCurrentSeriesAndPoint(); if (seriesSelection != null) { if(mToast == null){ Toast.makeText( mContext , "" , Toast.LENGTH_SHORT ); } mToast.setText( "" + seriesSelection.getValue() + "mg/dL"); mToast.setGravity(Gravity.TOP

Hide/show series in Achartengine

笑着哭i 提交于 2019-12-11 07:25:55
问题 I have a dataset with 10 series in a Linechart. I need to hide a serie when user click a button, and show it when user clicks again. Is this possible with Achartengine. Thanks. A sample of the code: XYSeriesRenderer r01 = new XYSeriesRenderer(); r01.setColor(Color.YELLOW); r01.setPointStyle(PointStyle.CIRCLE); r01.setFillBelowLine(true); r01.setFillBelowLineColor(Color.YELLOW); r01.setFillPoints(true); r01.setLineWidth(4); mRenderer.addSeriesRenderer(r01); 回答1: One simple way is that you can