androidplot

Get the correct position of a point in AndroidPlot

这一生的挚爱 提交于 2019-12-01 09:19:25
I am trying to get the pixel position of a values in my AndroidPlot, but I can't get it to work. The idea is to place the cursor at the exact point showed on the plot, at specific terms. Did any of you encounter/solve a similar problem? Regards Jesper I don't know if there's a better built-in solution, but here's a manual approach. The following code places the cursor at the X coordinate where the user touched the screen and the corresponding Y coordinate of the first data series of the plot. //NOTE about XYPlotZoomPan: when an OnTouchListener is set, zooming is disabled. Subclass to avoid it.

Get the correct position of a point in AndroidPlot

最后都变了- 提交于 2019-12-01 07:42:34
问题 I am trying to get the pixel position of a values in my AndroidPlot, but I can't get it to work. The idea is to place the cursor at the exact point showed on the plot, at specific terms. Did any of you encounter/solve a similar problem? Regards Jesper 回答1: I don't know if there's a better built-in solution, but here's a manual approach. The following code places the cursor at the X coordinate where the user touched the screen and the corresponding Y coordinate of the first data series of the

how to display graph in android using MySQL database

余生颓废 提交于 2019-12-01 02:23:47
I can't get data from MySQL database for graphics. I found an example code for create graph but I want to put x axis data and y axis data from database My example codes are: public class Graph extends Activity { private XYPlot xyPlot; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.graph); // initialize our XYPlot reference: xyPlot = (XYPlot) findViewById(R.id.xyplot); Number[] income = {2000, 2500, 2700, 3000, 2800, 3500, 3700, 3800 }; Number[] expense = {2200, 2700, 2900, 2800, 2600, 3000, 3300, 3400 }; final String[]

Android charts: achartengine or AndroidPlot?

邮差的信 提交于 2019-11-30 06:27:15
I want to develope an activity to display sensor data in a plot. I've been looking around and I have found that the more interesting options for me are achartengine and AndroidPlot . I need the following requirements: Line plot with 3 or more series Dynamic plots Integration witha layout with other gui Integration with database I think that both lybraries are ok with my requirements, but could someone tell me from his experience wich one is better? Which one is easier to integrate with an app? I haven't look at AChartEngine but have used AndroidPlot and can relay my experience here. I've

Only one number does not show anything in AndroidPlot

旧城冷巷雨未停 提交于 2019-11-29 14:41:15
I want to display line and bar graph for question/answer session attempted by user. I am using AndroidPlot 0.6.0 . Session date time is domain and Range is count of questions answered with Yes or No . Issue: List with single item does not show anything in the graph. For example, user first session: List with at least two items show graph correctly. Graph correctly shows two sessions with date as domain and count of yes/no as range: My Code for Line Graph is as follows: XYSeries answeredYesSeries = new SimpleXYSeries(answeredYesList, SimpleXYSeries.ArrayFormat.Y_VALS_ONLY, // Y_VALS_ONLY means

How do I remove all space around a chart in AndroidPlot?

一笑奈何 提交于 2019-11-29 11:06:09
I've got a minimalist chart using androidPlot in an application, and have been trying to remove extraneous visual elements. I've got everything done, except that I cannot get rid of some empty spaces around the chart itself within the view. Here's what it looks like with markup turned on, just sitting in the root view of an Activity: How can I eliminate the black space between the inner chart boundaries and the outer view boundary? Here's my code: mDynamicPlot = (XYPlot) findViewById(R.id.dynamicPlot); mDynamicPlot.getGraphWidget().setDomainValueFormat(new DecimalFormat("0")); mDynamicPlot

Android charts: achartengine or AndroidPlot?

十年热恋 提交于 2019-11-29 06:10:49
问题 I want to develope an activity to display sensor data in a plot. I've been looking around and I have found that the more interesting options for me are achartengine and AndroidPlot . I need the following requirements: Line plot with 3 or more series Dynamic plots Integration witha layout with other gui Integration with database I think that both lybraries are ok with my requirements, but could someone tell me from his experience wich one is better? Which one is easier to integrate with an app

Androidplot - X-Axis labels cut off

大兔子大兔子 提交于 2019-11-28 09:02:11
问题 I'm creating a bar chart but have run into an issue with the x-axis labels being cut off on a tablet. Attached is the correct layout on a phone and the incorrect layout on a tablet. Does any one know why this issue occurs on a tablet and how to fix it? Phone layout https://drive.google.com/file/d/0B4CxFPSlLEYpdGZCMm8xdGZHTlk/edit?usp=sharing Tablet layout https://drive.google.com/file/d/0B4CxFPSlLEYpakx1WFo3cGhNSTg/edit?usp=sharing This is my code to create the bar chart. Layout file

Only one number does not show anything in AndroidPlot

ぃ、小莉子 提交于 2019-11-28 08:32:57
问题 I want to display line and bar graph for question/answer session attempted by user. I am using AndroidPlot 0.6.0 . Session date time is domain and Range is count of questions answered with Yes or No . Issue: List with single item does not show anything in the graph. For example, user first session: List with at least two items show graph correctly. Graph correctly shows two sessions with date as domain and count of yes/no as range: My Code for Line Graph is as follows: XYSeries

How do I remove all space around a chart in AndroidPlot?

元气小坏坏 提交于 2019-11-28 04:34:45
问题 I've got a minimalist chart using androidPlot in an application, and have been trying to remove extraneous visual elements. I've got everything done, except that I cannot get rid of some empty spaces around the chart itself within the view. Here's what it looks like with markup turned on, just sitting in the root view of an Activity: How can I eliminate the black space between the inner chart boundaries and the outer view boundary? Here's my code: mDynamicPlot = (XYPlot) findViewById(R.id