Search in sources :

Example 6 with ValueLinePoint

use of org.eazegraph.lib.models.ValueLinePoint in project EazeGraph by blackfizz.

the class ValueLineChartFragment method loadData.

private void loadData() {
    ValueLineSeries series = new ValueLineSeries();
    series.setColor(0xFF63CBB0);
    //        series.addPoint(new ValueLinePoint(163.4f));
    //        series.addPoint(new ValueLinePoint(162.f));
    //        series.addPoint(new ValueLinePoint(161.4f));
    //        series.addPoint(new ValueLinePoint(160.4f));
    //        series.addPoint(new ValueLinePoint(159.4f));
    //        series.addPoint(new ValueLinePoint(160.4f));
    //        series.addPoint(new ValueLinePoint(158.4f));
    //        series.addPoint(new ValueLinePoint(158.f));
    //        series.addPoint(new ValueLinePoint(144.f));
    //        series.addPoint(new ValueLinePoint(134.f));
    //        series.addPoint(new ValueLinePoint(120.f));
    //        series.addPoint(new ValueLinePoint(180.f));
    series.addPoint(new ValueLinePoint(4.4f));
    series.addPoint(new ValueLinePoint(2.4f));
    series.addPoint(new ValueLinePoint(3.2f));
    series.addPoint(new ValueLinePoint(2.6f));
    series.addPoint(new ValueLinePoint(5.0f));
    series.addPoint(new ValueLinePoint(3.5f));
    series.addPoint(new ValueLinePoint(2.4f));
    series.addPoint(new ValueLinePoint(0.4f));
    series.addPoint(new ValueLinePoint(3.4f));
    series.addPoint(new ValueLinePoint(2.5f));
    series.addPoint(new ValueLinePoint(1.4f));
    series.addPoint(new ValueLinePoint(4.4f));
    series.addPoint(new ValueLinePoint(2.4f));
    series.addPoint(new ValueLinePoint(3.2f));
    series.addPoint(new ValueLinePoint(2.6f));
    series.addPoint(new ValueLinePoint(5.0f));
    series.addPoint(new ValueLinePoint(3.5f));
    series.addPoint(new ValueLinePoint(2.4f));
    series.addPoint(new ValueLinePoint(0.4f));
    series.addPoint(new ValueLinePoint(3.4f));
    series.addPoint(new ValueLinePoint(2.5f));
    series.addPoint(new ValueLinePoint(1.0f));
    series.addPoint(new ValueLinePoint(4.4f));
    series.addPoint(new ValueLinePoint(2.4f));
    series.addPoint(new ValueLinePoint(3.2f));
    series.addPoint(new ValueLinePoint(2.6f));
    series.addPoint(new ValueLinePoint(5.0f));
    series.addPoint(new ValueLinePoint(3.5f));
    series.addPoint(new ValueLinePoint(2.4f));
    series.addPoint(new ValueLinePoint(0.4f));
    series.addPoint(new ValueLinePoint(3.4f));
    series.addPoint(new ValueLinePoint(2.5f));
    series.addPoint(new ValueLinePoint(1.0f));
    series.addPoint(new ValueLinePoint(4.2f));
    series.addPoint(new ValueLinePoint(2.4f));
    series.addPoint(new ValueLinePoint(3.6f));
    series.addPoint(new ValueLinePoint(1.0f));
    series.addPoint(new ValueLinePoint(2.5f));
    series.addPoint(new ValueLinePoint(2.0f));
    series.addPoint(new ValueLinePoint(1.4f));
    //        mValueLineChart.addStandardValue(new StandardValue(140f));
    //        mValueLineChart.addStandardValue(new StandardValue(163.4f));
    mValueLineChart.addSeries(series);
    mValueLineChart.setOnPointFocusedListener(new IOnPointFocusedListener() {

        @Override
        public void onPointFocused(int _PointPos) {
            Log.d("Test", "Pos: " + _PointPos);
        }
    });
}
Also used : ValueLineSeries(org.eazegraph.lib.models.ValueLineSeries) IOnPointFocusedListener(org.eazegraph.lib.communication.IOnPointFocusedListener) ValueLinePoint(org.eazegraph.lib.models.ValueLinePoint) ValueLinePoint(org.eazegraph.lib.models.ValueLinePoint)

Aggregations

ValueLinePoint (org.eazegraph.lib.models.ValueLinePoint)6 Paint (android.graphics.Paint)4 ValueLineSeries (org.eazegraph.lib.models.ValueLineSeries)4 IOnPointFocusedListener (org.eazegraph.lib.communication.IOnPointFocusedListener)2 Path (android.graphics.Path)1 RectF (android.graphics.RectF)1 GestureDetector (android.view.GestureDetector)1 ScaleGestureDetector (android.view.ScaleGestureDetector)1 Scroller (android.widget.Scroller)1 Animator (com.nineoldandroids.animation.Animator)1 ValueAnimator (com.nineoldandroids.animation.ValueAnimator)1 LegendModel (org.eazegraph.lib.models.LegendModel)1 Point2D (org.eazegraph.lib.models.Point2D)1 StandardValue (org.eazegraph.lib.models.StandardValue)1