android-graphview

android graph view laggy on huge data

℡╲_俬逩灬. 提交于 2019-12-25 02:08:34
问题 I wanted to plot real time data via http://www.android-graphview.org/ for data acquired in a Bluetooth thread. Thread code: InputStream tmpIn = mSocket.getInputStream(); while (true) { try { BufferedReader r = new BufferedReader(new InputStreamReader(tmpIn)); String line; while ((line = r.readLine()) != null) { final String tmp = line; runOnUiThread(new Runnable() { @Override public void run() { addData(Integer.parseInt(tmp)); } }); } } catch (IOException e) { Log.e("BT", "BtConnectionThread

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

GraphView Realtime plot of Sensor Data

点点圈 提交于 2019-12-24 08:38:54
问题 I am using GraphView Android Library to plot the data of Light Sensor of my Smartphone. The Y-values of the resulting Graph are correct but the Graph cannot plot the floating point values of the X-axis which is the time in milliseconds at which it gets the reading. It truncates the fractional part of the valueand plots only agains the values 1,2,3... which doesn't give the realtime look to the graph. Here's my code to get data from the Sensor: @Override public void onSensorChanged(SensorEvent

android graph-view y axis numbers being cut out

做~自己de王妃 提交于 2019-12-23 09:00:34
问题 When trying to create a line graph with the graph-view library in android studio part of the numbers on the vertical line are being cut out.Does anybody know how to fix this? <com.jjoe64.graphview.GraphView android:layout_width="300dp" android:layout_height="200dip" android:id="@+id/graph" android:layout_centerVertical="true" android:layout_alignParentLeft="true" android:layout_alignParentStart="true" android:layout_gravity="center_horizontal" android:nestedScrollingEnabled="false" /> final

Battery graph in android using GraphView library?

我的未来我决定 提交于 2019-12-22 00:38:12
问题 i found i great library to draw graphs. I want to create one that displays in the x axis the time and in y the battery percentage. My goal is create a graph like this: You can see the percentage on the left and the date/time on bottom. Starting from this example code : https://github.com/jjoe64/GraphView-Demos/blob/master/src/com/jjoe64/graphviewdemos/CustomLabelFormatterActivity.java i want insert the correct data but i never used graphs. This is the activity public class

Android GraphView project get freeze with real time updates

一个人想着一个人 提交于 2019-12-20 03:26:12
问题 I am trying to incorporate Android GraphView project into my app and all the time I have some strange problem with it. My app requires drawing graph from real time data. I have thread with all the communication that is providing the data. In main thread I am reading this data and simply use mSeries1.appendData(new DataPoint(counter,data[0]),true,100); where counter is int that is incremented after each update. Unfortunately at some point it freeze. I've tried putting it in synchronized block

How to make Grid Lines invisible in Android GraphView?

落花浮王杯 提交于 2019-12-18 06:13:43
问题 I just want to show only X Y axes and labels on these axes and don't want to show grid lines in Android GraphView . How can I do that? Thanks in advance. 回答1: I believe the following call should do the trick : your_graph.getGridLabelRenderer().setGridStyle( GridLabelRenderer.GridStyle.NONE ); Please do note I haven't tested the above call :) 回答2: If you use this all the grid lines will be Removed your_graph.getGridLabelRenderer().setGridStyle( GridLabelRenderer.GridStyle.NONE ); For Setting

Kotlin - How can a math function be graphically plotted using GraphView?

烂漫一生 提交于 2019-12-13 10:29:30
问题 I have the following function, well it is the formula of the normal distribution and my goal is to graph it using the GraphView library. Well, I have the following: Id -- plot code kotlin class ExampleActivity : AppCompatActivity() { lateinit var series1: LineGraphSeries<DataPoint> override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_example) series1 = LineGraphSeries<DataPoint>() val media = 8.0 val sd = 2.0 fun linspace

while writing data to the graph in a Graphview getting some the extra line. how can i solve it?

不问归期 提交于 2019-12-13 00:53:59
问题 I'm trying to plot the data in a GraphView while plotting I'm getting some extra line starting of the graph. Ihe package I'm using com.jjoe64.graphview.GraphView My code is : public class ABIModeActivity extends AppCompatActivity { private LineGraphSeries<DataPoint> mSeries2; private double graph2LastXValue = 5d; static GraphView graph2; Context context; Button okbutton; CountDownTimer cTimer = null; int i=0; int[] BP_Data=new int[]{115,115,115,115,115,115,115,115,115,115,115,115,115,115,115

Add space between graph and tick labels in GraphView?

六月ゝ 毕业季﹏ 提交于 2019-12-12 03:26:12
问题 I am trying out the GraphView Library for creating charts on Android. It looks quite decent, but I am wondering if there is a way to add some space between the tick labels and the graph itself. As you can see, there is basically none: I use the following code to set up the graph (very similar to the example): GraphView graph = (GraphView)view.findViewById(R.id.graph); LineGraphSeries<DataPoint> series = new LineGraphSeries<DataPoint>(new DataPoint[] { new DataPoint(0, 1), new DataPoint(1, 5),