Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x axis label is being cut off at end #690

Open
PanagiotisJunMobileDev opened this issue Feb 23, 2023 · 0 comments
Open

x axis label is being cut off at end #690

PanagiotisJunMobileDev opened this issue Feb 23, 2023 · 0 comments

Comments

@PanagiotisJunMobileDev
Copy link

PanagiotisJunMobileDev commented Feb 23, 2023

GraphView graph1 = (GraphView) view.findViewById(R.id.graph01);
seriesAccLx = new LineGraphSeries<>();
seriesAccLy = new LineGraphSeries<>();
seriesAccLz = new LineGraphSeries<>();
graph1.addSeries(seriesAccLx);
graph1.addSeries(seriesAccLy);
graph1.addSeries(seriesAccLz);

        graph1.getLegendRenderer().setVisible(true);//more edit
        graph1.getLegendRenderer().setTextSize(40);
        graph1.getLegendRenderer().setAlign(LegendRenderer.LegendAlign.TOP);
        seriesAccLx.setColor(Color.RED);
        seriesAccLx.setTitle("AccLx");
        seriesAccLy.setColor(Color.GREEN);
        seriesAccLy.setTitle("AccLy");
        seriesAccLz.setColor(Color.BLUE);
        seriesAccLz.setTitle("AccLz");
        graph1.setTitle("accLx(Red) accLy(Green) accLz(Blue)");
        graph1.setTitleTextSize(30);
        graph1.getGridLabelRenderer().setHorizontalAxisTitle("timestamp");
        graph1.getGridLabelRenderer().setVerticalAxisTitle("AccL");

... and of course similar code for other graphs
----------------------------------------------------------------------XML Code

<FrameLayout
    android:id="@+id/line"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_margin="3dp"
    android:background="#FFFFFF"
    android:gravity="center">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="3dp"
        android:background="#FFFFFF"
        android:orientation="vertical">

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:layout_margin="16dp"
            android:text=""
            android:textSize="26sp"
            android:textStyle="bold" />


        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="Displa Graphs"
            android:textAlignment="center"
            android:textAllCaps="false"
            android:textColor="#00BCD4"
            android:textSize="24sp"
            android:textStyle="bold|italic" />

        <com.jjoe64.graphview.GraphView
            android:id="@+id/graph01"
            android:layout_width="match_parent"
            android:layout_height="350dp"
            android:layout_marginEnd="3dp" />

        <com.jjoe64.graphview.GraphView
            android:id="@+id/graph02"
            android:layout_width="match_parent"
            android:layout_height="350dp"
            android:layout_marginEnd="3dp" />

        <com.jjoe64.graphview.GraphView
            android:id="@+id/graph03"
            android:layout_width="match_parent"
            android:layout_height="350dp"
            android:layout_marginEnd="3dp" />

        <com.jjoe64.graphview.GraphView
            android:id="@+id/graph04"
            android:layout_width="match_parent"
            android:layout_height="350dp"
            android:layout_marginEnd="3dp" />




</FrameLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant