androidplot

AndroidPlot - Make graph scrollable along with x-axis labels

£可爱£侵袭症+ 提交于 2019-12-10 21:34:54
问题 I created a line graph with AndroidPlot. Since I have got pleanty of Domain values(x-axis labels), I need to implement a scroll. With this example given http://androidplot.com/docs/how-to-pan-zoom-and-scale/ , the graph scrolls, but the x-axis labels changes dynamically according to the scroll. But I just need the entire x-axis values to get scrolled along with the graph. Is this possible with HorizontalScrollview or any other help is appreciated.... 回答1: The gridlines are calculated and

androidplot background image shift

邮差的信 提交于 2019-12-10 20:06:40
问题 I'm trying to separate the background of the graph grid in 3 areas using this code: int[] data = {0xff000000, 0x80008000, 0xff000000}; bgBitmap = Bitmap.createBitmap(data, 1, 3, Bitmap.Config.ARGB_8888); RectF rect = plot.getGraphWidget().getGridRect(); BitmapShader myShader = new BitmapShader( Bitmap.createScaledBitmap(bgBitmap, 1, (int) rect.height(), false), Shader.TileMode.REPEAT, Shader.TileMode.REPEAT); plot.getGraphWidget().getGridBackgroundPaint().setShader(myShader); So scaling a 3

how to display graph in android using MySQL database

孤街浪徒 提交于 2019-12-09 01:55:44
问题 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

Androidplot legend overlapping

旧城冷巷雨未停 提交于 2019-12-08 09:41:52
问题 What can I do to fix the legend overlapping in androidplot? Can I manipulate the legend placement? 回答1: You can use this to enlarge the legend: myPlot.getLegendWidget().setSize(new SizeMetrics(15, SizeLayoutType.ABSOLUTE, 200, SizeLayoutType.ABSOLUTE)); 15 is the height and 200 the width. Change the legend position: myPlot.position( myPlot.getLegendWidget(), 0, XLayoutStyle.ABSOLUTE_FROM_RIGHT, 0, YLayoutStyle.ABSOLUTE_FROM_BOTTOM, AnchorPosition.RIGHT_BOTTOM); And reposition the domain label

Remove series indicator/plot legend AndroidPlot

喜夏-厌秋 提交于 2019-12-07 04:10:08
问题 I realise AndroidPlot has a forum but it isn't the most active so i'll chance my arm here... I'm trying to remove the series indicator or plot legend from my XY plot using the AndroidPlot library. I don't want to remove the series from the plot itself, just the legend. I've seen it done on AndroidPlot examples but with the limited documentation it's difficult to find methods to do the stuff like remove the legen 回答1: OK I have the following code to do this. This is not tested on the very

androidPlot black border

纵然是瞬间 提交于 2019-12-07 02:05:23
问题 When i execute the code bellow and add in mySimpleXYPlot.getGraphWidget().getBorderPaint().setColor(Color.WHITE); the app crashes when i launch it on my device. what i'm trying to accomplish is getting rid of the black border around the entire graph. it is about 2cm thick on located on the top, left and bottom sides of the chart. Is there any way i can get rid of this black border? public class MainActivity extends Activity { private XYPlot mySimpleXYPlot; @Override public void onCreate

AndroidPlot - Labels and text

旧时模样 提交于 2019-12-06 16:49:28
问题 I am a non-developer product manager for an application built in both Android and iOS. We have a bar graph in iOS that provides text for the content of the graph. It displays Totals for each bar, and percentages for each segment of each bar. In Android, using AndroidPlot (so I understand) we just display the bars with different color segments and no percent totals or totals. I am told by the developer that we can't show more. I would display the images here, but stackoverflow tells me I don't

Remove series indicator/plot legend AndroidPlot

点点圈 提交于 2019-12-05 11:40:46
I realise AndroidPlot has a forum but it isn't the most active so i'll chance my arm here... I'm trying to remove the series indicator or plot legend from my XY plot using the AndroidPlot library. I don't want to remove the series from the plot itself, just the legend. I've seen it done on AndroidPlot examples but with the limited documentation it's difficult to find methods to do the stuff like remove the legen OK I have the following code to do this. This is not tested on the very latest version but hopefully is still good. if (!mKeyOn) mDynamicPlot.getLayoutManager() .remove(mDynamicPlot

Dynamic graph rendering in Android

时间秒杀一切 提交于 2019-12-05 00:43:35
问题 I need to draw a graph in Android which continuously gets data from the server. Based on one data item the graph needs to be displayed in various colors. The graph should keep moving from right to left like a ECG graph. Its something like continuous moving graph. Will I be able to achieve this using Android 2D graphics library? Do I need to use tween animation? Do I have to use interpolators also? 回答1: This sounds like a two part problem. Part 1 is figuring out how to get the raw data from

AndroidPlot - Labels and text

别等时光非礼了梦想. 提交于 2019-12-04 23:08:39
I am a non-developer product manager for an application built in both Android and iOS. We have a bar graph in iOS that provides text for the content of the graph. It displays Totals for each bar, and percentages for each segment of each bar. In Android, using AndroidPlot (so I understand) we just display the bars with different color segments and no percent totals or totals. I am told by the developer that we can't show more. I would display the images here, but stackoverflow tells me I don't have enough reputation points to do this. I have created a link to my dropbox with the images https:/