package tv.tvquetzachapin.graphfunctions.Activites;

import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;

import com.jjoe64.graphview.GraphView;
import com.jjoe64.graphview.series.DataPoint;
import com.jjoe64.graphview.series.LineGraphSeries;

import tv.tvquetzachapin.graphfunctions.R;

public class GraphActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_graph);
        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);

        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
        getSupportActionBar().setDisplayShowHomeEnabled(true);

        toolbar.setNavigationOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent backHome = new Intent(GraphActivity.this, MainActivity.class);
                startActivity(backHome);
            }
        });

        GraphView graph = (GraphView) findViewById(R.id.graph);
        LineGraphSeries<DataPoint> series = new LineGraphSeries<DataPoint>(new DataPoint[] {
                new DataPoint(-2, 1),
                new DataPoint(2, 5),
                new DataPoint(3, 8),
                new DataPoint(3, 2),
                new DataPoint(4, -6)
        });
        graph.addSeries(series);
    }

}

@@ -73,24 +73,55 @@
 ent.Intent;%0A
+import android.graphics.Color;%0A
 import andro
@@ -1669,21 +1669,660 @@
 es(series);%0A
+%0A        LineGraphSeries%3CDataPoint%3E series2 = new LineGraphSeries%3CDataPoint%3E(new DataPoint%5B%5D %7B%0A                new DataPoint(0, 1),%0A                new DataPoint(1, 4),%0A                new DataPoint(2, 3),%0A                new DataPoint(3, 7),%0A                new DataPoint(4, 4)%0A        %7D);%0A%0A        // set second scale%0A        graph.getSecondScale().addSeries(series2);%0A        // the y bounds are always manual for second scale%0A        graph.getSecondScale().setMinY(0);%0A        graph.getSecondScale().setMaxY(100);%0A        series2.setColor(Color.RED);%0A        graph.getGridLabelRenderer().setVerticalLabelsSecondScaleColor(Color.RED);%0A%0A
     %7D%0A%0A%7D%0A

Add second graphic