Thanks, Tim!
I have tested GraphView but found that it was too slow for the high
frequency plotting needed in the app. Instead, I ended up using
achartengine. It also takes its time to repaint but there is no really good
graphing library for android at the moment...
Additionally, I incorporated the tweek from the third answer
here<http://stackoverflow.com/questions/14187716/is-achartengine-ready-for-realtime-graphing>,
which deletes old data after some time. Otherwise, achartengine would
considerably slow down and crash eventually, when it handles some ten or
hundred thousand data points. For the view with each pin in its own graph,
I also created a routine which only updates the graphs that are currently
visible.
For optical customization, see my code snippet below.

Please do not hesitate with additional questions!

Best regards,

Johannes


       plotRenderer = new XYMultipleSeriesRenderer();
       plotRenderer.setAxesColor(Color.BLACK);
       plotRenderer.setMargins(new int[] {(int)Helper.dpToPx(6.7f),
(int)Helper.dpToPx(16.7f), (int)Helper.dpToPx(-5f),
(int)Helper.dpToPx(10)});
        plotRenderer.setMarginsColor(Color.argb(0, 255, 255, 255));
        plotRenderer.setLabelsTextSize(Helper.dpToPx(13.3f));
        plotRenderer.setLabelsColor(Color.BLACK);
        plotRenderer.setXLabelsColor(Color.BLACK);
        plotRenderer.setYLabelsColor(0, Color.BLACK);
        plotRenderer.setYLabelsAlign(Paint.Align.RIGHT);
        plotRenderer.setYLabelsPadding(Helper.dpToPx(7f));
        plotRenderer.setYLabelsVerticalPadding(Helper.dpToPx(-4.8f));
        plotRenderer.setYAxisMin(-0.1);
        plotRenderer.setYAxisMax(3.5);
        plotRenderer.setXAxisMin(0);
        plotRenderer.setXAxisMax(10);
        plotRenderer.setShowLegend(false);
        plot = ChartFactory.getLineChartView(getContext(), dataset,
plotRenderer);


Abstract Class Helper:

public static float dpToPx(float dp) {
        return (dp * Resources.getSystem().getDisplayMetrics().density);
    }




2014-05-13 15:28 GMT+02:00 Tim Frisch <[email protected]>:

> Great app Johannes; just a question for you.
>
> For your graphs did you use Android GraphView<http://android-graphview.org/>?
> It looks like you managed to use that as well as modify it a  bit to add a
> more custom clean feel.
>
>
> On Tuesday, April 29, 2014 11:47:11 AM UTC-5, Johannes Rieke wrote:
>
>> Hello everybody,
>>
>> I have developed an Android app that measures the voltages on your IOIO's
>> analog pins and shows it in colorful graphs.
>> It is now available on Google Play as "IOIO 
>> Meter"<https://play.google.com/store/apps/details?id=com.ioiometer>,
>> just look there for feature details and screenshots. And to stay in the
>> spirit of IOIO, the app is completely free and without ads!
>> Your downloads and especially your feedback are very welcome! Just drop
>> me a line at [email protected] or comment below.
>> I am currently developing a PC version, so stay tuned for updates.
>>
>> Best,
>> Johannes Rieke
>>
>> PS: You have tested my app with IOIO v1 or over bluetooth? Please leave a
>> comment below, as I cannot test these device settings at the moment.
>>
>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "ioio-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/ioio-users/kMoSeGmFHbk/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to