Graphs for Android:GraphLine
| Jazyk EN SK | Navigácia | Android projekty -> Graphs for Android -> Graphs for Android:GraphLine -> GraphDemo | 
Opis
- Názov triedy
 - eu.sensys.GraphLine
 
Čiarový graf je graf, v ktorom stačí definovať hodnoty pre os y. Na osi x sa hodnoty začínajú na 1 zväčšujú sa o 1.
Prednastavené hodnoty komponentu
- na osi x sa zobrazujú číselné hodnoty (nie textové ekvivalenty)
 - názov grafu je "Graf Line"
 - Os x začína hodnotou 1, krok je 1.
 
Príklad použitia
...
    <eu.sensys.graphlib.GraphLine
        android:id="@+id/graphXY1"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_margin="8dp" />
...
public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setContentView(R.layout.activity_xygraf);
   GraphLine graf;
   DataTable dt;
   graf = (GraphLine) findViewById(R.id.graphXY1);
   dt=new DataTable();
   dt.addDataSet("Postupnosť");
   for(int x=0;x<=20;x++){
       xx0=1+xx0/1.25;
       datatable.addDataY(0, xx0);       
   }
   this.graf.addDataTable(dt);
   this.graf.setStyle(GraphStyle.THEME_DARK);
   this.graf.setLegendPosition(BaseGraph.LEGEND_TOP_LEFT);
   this.graf.setXlabel("Postupnost 1");
   this.graf.setTitle("Aritmetická postupnosť");
}

