Search in sources :

Example 1 with IOnPointFocusedListener

use of org.eazegraph.lib.communication.IOnPointFocusedListener in project EazeGraph by blackfizz.

the class CubicValueLineChartFragment method loadData.

private void loadData() {
    ValueLineSeries series = new ValueLineSeries();
    series.setColor(0xFF56B7F1);
    series.addPoint(new ValueLinePoint("Jan", 2.4f));
    series.addPoint(new ValueLinePoint("Feb", 3.4f));
    series.addPoint(new ValueLinePoint("Mar", .4f));
    series.addPoint(new ValueLinePoint("Apr", 1.2f));
    series.addPoint(new ValueLinePoint("Mai", 2.6f));
    series.addPoint(new ValueLinePoint("Jun", -1.0f));
    series.addPoint(new ValueLinePoint("Jul", 3.5f));
    series.addPoint(new ValueLinePoint("Aug", 2.4f));
    series.addPoint(new ValueLinePoint("Sep", 2.4f));
    series.addPoint(new ValueLinePoint("Oct", 3.4f));
    series.addPoint(new ValueLinePoint("Nov", -.4f));
    series.addPoint(new ValueLinePoint("Dec", -1.0f));
    series.addPoint(new ValueLinePoint("Jan", 1.2f));
    series.addPoint(new ValueLinePoint("Feb", 3.4f));
    series.addPoint(new ValueLinePoint("Mar", -2.0f));
    series.addPoint(new ValueLinePoint("Apr", -1.0f));
    series.addPoint(new ValueLinePoint("Mai", 3.5f));
    series.addPoint(new ValueLinePoint("Jun", 2.4f));
    series.addPoint(new ValueLinePoint("Jan", 2.4f));
    series.addPoint(new ValueLinePoint("Feb", 3.4f));
    ValueLineSeries series1 = new ValueLineSeries();
    series1.setColor(0xFFB3F7B1);
    series1.addPoint(new ValueLinePoint("Jan", 1.4f));
    series1.addPoint(new ValueLinePoint("Feb", 4.4f));
    series1.addPoint(new ValueLinePoint("Mar", 2.4f));
    series1.addPoint(new ValueLinePoint("Apr", 5.2f));
    series1.addPoint(new ValueLinePoint("Mai", 2.6f));
    series1.addPoint(new ValueLinePoint("Jun", 5.0f));
    series1.addPoint(new ValueLinePoint("Jul", 7.5f));
    series1.addPoint(new ValueLinePoint("Aug", 1.4f));
    series1.addPoint(new ValueLinePoint("Sep", 5.4f));
    series1.addPoint(new ValueLinePoint("Oct", 2.4f));
    series1.addPoint(new ValueLinePoint("Nov", 7.4f));
    series1.addPoint(new ValueLinePoint("Dec", 5.0f));
    series1.addPoint(new ValueLinePoint("Jan", 2.2f));
    series1.addPoint(new ValueLinePoint("Feb", 6.4f));
    series1.addPoint(new ValueLinePoint("Mar", 3.6f));
    series1.addPoint(new ValueLinePoint("Apr", 6.0f));
    series1.addPoint(new ValueLinePoint("Mai", 1.5f));
    series1.addPoint(new ValueLinePoint("Jun", 7.4f));
    //        mCubicValueLineChart.addSeries(series1);
    mCubicValueLineChart.addSeries(series);
    mCubicValueLineChart.addStandardValue(2.3f);
    mCubicValueLineChart.addStandardValue(-1.3f);
    mCubicValueLineChart.addStandardValue(4.3f);
    mCubicValueLineChart.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)

Example 2 with IOnPointFocusedListener

use of org.eazegraph.lib.communication.IOnPointFocusedListener 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

IOnPointFocusedListener (org.eazegraph.lib.communication.IOnPointFocusedListener)2 ValueLinePoint (org.eazegraph.lib.models.ValueLinePoint)2 ValueLineSeries (org.eazegraph.lib.models.ValueLineSeries)2