android-graphview

GraphView, how to show x-axis label?

帅比萌擦擦* 提交于 2019-12-05 18:24:32
I'm trying to plot graph using GraphView library. My problem is, the x-axis does not show up but the y-axis can. Besides, the value at the x-axis label also not showing up. Here is my xml file: <com.jjoe64.graphview.GraphView android:id="@+id/graph" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_alignParentBottom="true" android:layout_alignParentTop="true" android:background="#FAFA82" /> and the java code: double graph1LastXValue = 5d; GraphView graph = (GraphView) findViewById(R.id.graph); graph.getGridLabelRenderer().setVerticalAxisTitle("Match Value"

Android graph view

情到浓时终转凉″ 提交于 2019-12-05 02:24:20
问题 I have used jjoe64's graphview library to implement graph in my app. It has pretty good samples inside the box and started right away to include it in my app. Wat i have got so far is as shown below. But what i actually need is as shown below, I dont want that dark vertical lines to come inside the graph. Any idea how to remove these vertical lines. Also i wanted to add the markers at each graph points. The markers are usually png's. And the last, i wanted the change the vertical label sizes.

Battery graph in android using GraphView library?

一个人想着一个人 提交于 2019-12-04 19:38:31
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 CustomLabelFormatterActivity extends Activity { /** Called when the activity is first created. */ @SuppressLint(

How to plot a graph with Time in x-axis and value on the other in android?

▼魔方 西西 提交于 2019-12-04 14:57:08
I want to plot a Time vs value graph where time (in hours) is on the x-axis and the Values should be on the y-axis. Is there any library to do this? I tried using achartengine http://wptrafficanalyzer.in/blog/android-drawing-time-chart-with-timeseries-in-achartengine/ but not much helpful. you can use GraphView for doing this. http://www.jjoe64.com/p/graphview-library.html https://github.com/jjoe64/GraphView you have to use a Custom label formatter . There's an example where the X-values are displayed as DateTime. GraphView graphView = new LineGraphView(this, "example") { @Override protected

Android graph view

房东的猫 提交于 2019-12-03 17:32:14
I have used jjoe64's graphview library to implement graph in my app. It has pretty good samples inside the box and started right away to include it in my app. Wat i have got so far is as shown below. But what i actually need is as shown below, I dont want that dark vertical lines to come inside the graph. Any idea how to remove these vertical lines. Also i wanted to add the markers at each graph points. The markers are usually png's. And the last, i wanted the change the vertical label sizes. Can somebody help me out with this. Thanks. You can use achartengine for more effective customization.

GraphView and resetData

▼魔方 西西 提交于 2019-12-02 01:39:01
please help me, I use the GraphView library ( http://www.jjoe64.com/p/graphview-library.html ), it works. But i don't understand how to reset previous data. Method redrawAll() does not work. IT'S MY CODE: public class MainActivity extends Activity implements OnClickListener{ private final static int DIALOG_ID=0; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Button btnDialog=(Button)findViewById(R.id.btnDialog); btnDialog.setOnClickListener(this); } @Override public boolean onCreateOptionsMenu(Menu menu

How to make Grid Lines invisible in Android GraphView?

橙三吉。 提交于 2019-11-29 11:04:41
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. 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 :) Christos Themelis If you use this all the grid lines will be Removed your_graph.getGridLabelRenderer().setGridStyle( GridLabelRenderer.GridStyle.NONE ); For Setting Horizontal Line visible your_graph.getGridLabelRenderer().setGridStyle(GridLabelRenderer

GraphView is not updated when new data is added

喜你入骨 提交于 2019-11-28 06:44:27
问题 I have a GraphView that is not updated when new data is added, it changes the Y value to accommodate for the new data, but it doesn't draw them, here is the code: public class MainActivity extends Activity { double data = 1; double xgraph = 5; GraphViewSeries sensorSeries; GraphView graphView; ... @Override public void onCreate(Bundle savedInstanceState) { ... sensorSeries = new GraphViewSeries(new GraphViewData[] { new GraphViewData(1, 2.0d), new GraphViewData(2, 1.5d), new GraphViewData(3,