Skip to content

Instantly share code, notes, and snippets.

@stevedonovan
Last active January 13, 2022 09:36
Show Gist options
  • Star 14 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
  • Save stevedonovan/3338106 to your computer and use it in GitHub Desktop.
Save stevedonovan/3338106 to your computer and use it in GitHub Desktop.
Android Example using AChartEngine to plot JSON data
package com.example.testchart;
import java.util.*;
import java.io.*;
import java.text.DateFormat;
import android.os.Bundle;
import android.app.Activity;
import android.util.Log;
import android.view.*;
import android.widget.*;
import android.content.*;
import android.content.res.AssetManager;
import android.graphics.Color;
import android.graphics.Paint.Align;
import org.achartengine.*;
import org.achartengine.chart.*;
import org.achartengine.model.*;
import org.achartengine.renderer.*;
import org.achartengine.tools.*;
import org.json.*;
public class ChartExample extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
LinearLayout ll = new LinearLayout(this);
ll.setOrientation(LinearLayout.VERTICAL);
final TimeChart lc = new TimeChart(getDataset(), getRenderer());
final GraphicalView graph = new GraphicalView(getApplicationContext(),lc);
ll.addView(graph);
lc.setXAxisSmart(true);
lc.setDateFormat("yy-MM-dd");
setContentView(ll);
}
void log(String msg) {
Log.d("graph",msg);
}
public void onClickMe(View v) {
Intent chart = ChartFactory.getLineChartIntent(getApplicationContext(), getDataset(), getRenderer());
startActivity(chart);
}
private XYMultipleSeriesRenderer getRenderer() {
XYMultipleSeriesRenderer renderer = new XYMultipleSeriesRenderer();
renderer.setApplyBackgroundColor(true);
renderer.setBackgroundColor(Color.BLACK);
renderer.setXLabelsColor(Color.YELLOW);
renderer.setShowGrid(true);
renderer.setYLabelsAlign(Align.LEFT);
renderer.setChartTitle("Closure Profile");
renderer.setXTitle("Date");
renderer.setYTitle("Closure");
XYSeriesRenderer r = new XYSeriesRenderer();
r.setColor(Color.WHITE);
renderer.addSeriesRenderer(r);
renderer.setZoomButtonsVisible(true);
return renderer;
}
private XYMultipleSeriesDataset getDataset() {
XYMultipleSeriesDataset dataset = new XYMultipleSeriesDataset();
TimeSeries series = new TimeSeries("Demo");
AssetManager am = getAssets();
try {
InputStream is = am.open("closure.json");
String json = readStream(is);
is.close();
JSONObject obj = (JSONObject)new JSONTokener(json).nextValue();
JSONArray arr = obj.getJSONArray("data");
double closure = 0.0;
for (int i = 0; i < arr.length(); i++) {
JSONArray point = arr.getJSONArray(i);
Date d = new Date(point.getLong(0));
double val = point.getDouble(1);
closure += val;
series.add(d,closure);
}
} catch (Exception e) {
Log.d("graph",e.getMessage());
}
dataset.addSeries(series);
return dataset;
}
private String readStream(InputStream is) {
ByteArrayOutputStream output = new ByteArrayOutputStream(4096);
byte[] buffer = new byte[4096];
int n = 0;
try {
while (-1 != (n = is.read(buffer))) {
output.write(buffer, 0, n);
}
} catch (IOException e) {
Log.d("graph",e.getMessage());
return null;
}
return output.toString();
}
}
{
"data":[
[
1297932732000,
0.0125
],
[
1297932732000,
0.0125
],
[
1297932732000,
0.0125
],
[
1297932732000,
0.0125
],
[
1297932732000,
0.0125
],
[
1297932732000,
0.0125
],
[
1297932732000,
0.0125
],
[
1297932732000,
0.0125
],
[
1297932732000,
0.0125
],
[
1297932732000,
0.0125
],
[
1297932732000,
0.0125
],
[
1297932732000,
0.0125
],
[
1297932732000,
0.0125
],
[
1297932732000,
0.0125
],
[
1297932732000,
0.0125
],
[
1297933332000,
0.00375
],
[
1297933332000,
0.00375
],
[
1297933332000,
0.00375
],
[
1297933332000,
0.00375
],
[
1297933332000,
0.00375
],
[
1297933332000,
0.00375
],
[
1297933332000,
0.00375
],
[
1297933332000,
0.00375
],
[
1297933332000,
0.00375
],
[
1297933332000,
0.00375
],
[
1297933332000,
0.00375
],
[
1297933332000,
0.00375
],
[
1297933332000,
0.00375
],
[
1297933932000,
0.00375
],
[
1297933932000,
0.00375
],
[
1297933932000,
0.00375
],
[
1297933932000,
0.00375
],
[
1297933932000,
0.00375
],
[
1297933932000,
0.00375
],
[
1297933932000,
0.00375
],
[
1297933932000,
0.00375
],
[
1297933932000,
0.00375
],
[
1297933932000,
0.00375
],
[
1297933932000,
0.00375
],
[
1297933932000,
0.00375
],
[
1297933932000,
0.00375
],
[
1297934532000,
0.00375
],
[
1297934532000,
0.00375
],
[
1297934532000,
0.00375
],
[
1297934532000,
0.00375
],
[
1297934532000,
0.00375
],
[
1297934532000,
0.00375
],
[
1297934532000,
0.00375
],
[
1297934532000,
0.00375
],
[
1297934532000,
0.00375
],
[
1297934532000,
0.00375
],
[
1297934532000,
0.00375
],
[
1297934532000,
0.00375
],
[
1297935132000,
0.00375
],
[
1297935132000,
0.00375
],
[
1297935132000,
0.00375
],
[
1297935132000,
0.00375
],
[
1297935132000,
0.00375
],
[
1297935132000,
0.00375
],
[
1297935132000,
0.00375
],
[
1297935132000,
0.00375
],
[
1297935132000,
0.00375
],
[
1297935132000,
0.00375
],
[
1297935132000,
0.00375
],
[
1297935732000,
0.00375
],
[
1297935732000,
0.00375
],
[
1297935732000,
0.00375
],
[
1297935732000,
0.00375
],
[
1297935732000,
0.00375
],
[
1297935732000,
0.00375
],
[
1297935732000,
0.00375
],
[
1297935732000,
0.00375
],
[
1297935732000,
0.00375
],
[
1297935732000,
0.00375
],
[
1297936332000,
0.00375
],
[
1297936332000,
0.00375
],
[
1297936332000,
0.00375
],
[
1297936332000,
0.00375
],
[
1297936332000,
0.00375
],
[
1297936332000,
0.00375
],
[
1297936332000,
0.00375
],
[
1297936332000,
0.00375
],
[
1297936332000,
0.00375
],
[
1297936332000,
0.00375
],
[
1297936932000,
0.00375
],
[
1297936932000,
0.00375
],
[
1297936932000,
0.00375
],
[
1297936932000,
0.00375
],
[
1297936932000,
0.00375
],
[
1297936932000,
0.00375
],
[
1297936932000,
0.00375
],
[
1297936932000,
0.00375
],
[
1297936932000,
0.00375
],
[
1297936932000,
0.00375
],
[
1297937532000,
0.00375
],
[
1297937532000,
0.00375
],
[
1297937532000,
0.00375
],
[
1297937532000,
0.00375
],
[
1297937532000,
0.00375
],
[
1297937532000,
0.00375
],
[
1297937532000,
0.00375
],
[
1297937532000,
0.00375
],
[
1297938132000,
0.00375
],
[
1297938132000,
0.00375
],
[
1297938132000,
0.00375
],
[
1297938132000,
0.00375
],
[
1297938132000,
0.00375
],
[
1297938132000,
0.00375
],
[
1297938132000,
0.00375
],
[
1297938132000,
0.00375
],
[
1297938732000,
0.00375
],
[
1297938732000,
0.00375
],
[
1297938732000,
0.00375
],
[
1297938732000,
0.00375
],
[
1297938732000,
0.00375
],
[
1297938732000,
0.00375
],
[
1297938732000,
0.00375
],
[
1297938732000,
0.00375
],
[
1297939332000,
0.00375
],
[
1297939332000,
0.00375
],
[
1297939332000,
0.00375
],
[
1297939332000,
0.00375
],
[
1297939332000,
0.00375
],
[
1297939332000,
0.00375
],
[
1297939332000,
0.00375
],
[
1297939332000,
0.00375
],
[
1297939932000,
0.00375
],
[
1297939932000,
0.00375
],
[
1297939932000,
0.00375
],
[
1297939932000,
0.00375
],
[
1297939932000,
0.00375
],
[
1297939932000,
0.00375
],
[
1297939932000,
0.00375
],
[
1297939932000,
0.00375
],
[
1297940532000,
0.00375
],
[
1297940532000,
0.00375
],
[
1297940532000,
0.00375
],
[
1297940532000,
0.00375
],
[
1297940532000,
0.00375
],
[
1297940532000,
0.00375
],
[
1297940532000,
0.00375
],
[
1297940532000,
0.00375
],
[
1297941132000,
0.00375
],
[
1297941132000,
0.00375
],
[
1297941132000,
0.00375
],
[
1297941132000,
0.00375
],
[
1297941132000,
0.00375
],
[
1297941132000,
0.00375
],
[
1297941132000,
0.00375
],
[
1297941132000,
0.00375
],
[
1297941732000,
0.00375
],
[
1297941732000,
0.00375
],
[
1297941732000,
0.00375
],
[
1297941732000,
0.00375
],
[
1297941732000,
0.00375
],
[
1297941732000,
0.00375
],
[
1297941732000,
0.00375
],
[
1297942332000,
0.00375
],
[
1297942332000,
0.00375
],
[
1297942332000,
0.00375
],
[
1297942332000,
0.00375
],
[
1297942332000,
0.00375
],
[
1297942332000,
0.00375
],
[
1297942332000,
0.00375
],
[
1297942932000,
0.00375
],
[
1297942932000,
0.00375
],
[
1297942932000,
0.00375
],
[
1297942932000,
0.00375
],
[
1297942932000,
0.00375
],
[
1297942932000,
0.00375
],
[
1297942932000,
0.00375
],
[
1297943532000,
0.00375
],
[
1297943532000,
0.00375
],
[
1297943532000,
0.00375
],
[
1297943532000,
0.00375
],
[
1297943532000,
0.00375
],
[
1297943532000,
0.00375
],
[
1297943532000,
0.00375
],
[
1297944132000,
0.00375
],
[
1297944132000,
0.00375
],
[
1297944132000,
0.00375
],
[
1297944132000,
0.00375
],
[
1297944132000,
0.00375
],
[
1297944132000,
0.00375
],
[
1297944132000,
0.00375
],
[
1297944732000,
0.00375
],
[
1297944732000,
0.00375
],
[
1297944732000,
0.00375
],
[
1297944732000,
0.00375
],
[
1297944732000,
0.00375
],
[
1297944732000,
0.00375
],
[
1297944732000,
0.00375
],
[
1297945332000,
0.00375
],
[
1297945332000,
0.00375
],
[
1297945332000,
0.00375
],
[
1297945332000,
0.00375
],
[
1297945332000,
0.00375
],
[
1297945332000,
0.00375
],
[
1297945332000,
0.00375
],
[
1297945932000,
0.00375
],
[
1297945932000,
0.00375
],
[
1297945932000,
0.00375
],
[
1297945932000,
0.00375
],
[
1297945932000,
0.00375
],
[
1297945932000,
0.00375
],
[
1297945932000,
0.00375
],
[
1297946532000,
0.00375
],
[
1297946532000,
0.00375
],
[
1297946532000,
0.00375
],
[
1297946532000,
0.00375
],
[
1297946532000,
0.00375
],
[
1297946532000,
0.00375
],
[
1297946532000,
0.00375
],
[
1297947132000,
0.00375
],
[
1297947132000,
0.00375
],
[
1297947132000,
0.00375
],
[
1297947132000,
0.00375
],
[
1297947132000,
0.00375
],
[
1297947132000,
0.00375
],
[
1297947732000,
0.00375
],
[
1297947732000,
0.00375
],
[
1297947732000,
0.00375
],
[
1297947732000,
0.00375
],
[
1297947732000,
0.00375
],
[
1297947732000,
0.00375
],
[
1297948332000,
0.00375
],
[
1297948332000,
0.00375
],
[
1297948332000,
0.00375
],
[
1297948332000,
0.00375
],
[
1297948332000,
0.00375
],
[
1297948932000,
0.00375
],
[
1297948932000,
0.00375
],
[
1297948932000,
0.00375
],
[
1297948932000,
0.00375
],
[
1297948932000,
0.00375
],
[
1297949532000,
0.00375
],
[
1297949532000,
0.00375
],
[
1297949532000,
0.00375
],
[
1297949532000,
0.00375
],
[
1297949532000,
0.00375
],
[
1297950132000,
0.00375
],
[
1297950132000,
0.00375
],
[
1297950132000,
0.00375
],
[
1297950132000,
0.00375
],
[
1297950132000,
0.00375
],
[
1297950732000,
0.00375
],
[
1297950732000,
0.00375
],
[
1297950732000,
0.00375
],
[
1297950732000,
0.00375
],
[
1297950732000,
0.00375
],
[
1297951332000,
0.00375
],
[
1297951332000,
0.00375
],
[
1297951332000,
0.00375
],
[
1297951332000,
0.00375
],
[
1297951332000,
0.00375
],
[
1297951932000,
0.00375
],
[
1297951932000,
0.00375
],
[
1297951932000,
0.00375
],
[
1297951932000,
0.00375
],
[
1297951932000,
0.00375
],
[
1297952532000,
0.00375
],
[
1297952532000,
0.00375
],
[
1297952532000,
0.00375
],
[
1297952532000,
0.00375
],
[
1297952532000,
0.00375
],
[
1297953132000,
0.00375
],
[
1297953132000,
0.00375
],
[
1297953132000,
0.00375
],
[
1297953132000,
0.00375
],
[
1297953132000,
0.00375
],
[
1297953732000,
0.00375
],
[
1297953732000,
0.00375
],
[
1297953732000,
0.00375
],
[
1297953732000,
0.00375
],
[
1297953732000,
0.00375
],
[
1297954332000,
0.00375
],
[
1297954332000,
0.00375
],
[
1297954332000,
0.00375
],
[
1297954332000,
0.00375
],
[
1297954332000,
0.00375
],
[
1297954932000,
0.00375
],
[
1297954932000,
0.00375
],
[
1297954932000,
0.00375
],
[
1297954932000,
0.00375
],
[
1297954932000,
0.00375
],
[
1297955532000,
0.00375
],
[
1297955532000,
0.00375
],
[
1297955532000,
0.00375
],
[
1297955532000,
0.00375
],
[
1297956132000,
0.00375
],
[
1297956132000,
0.00375
],
[
1297956132000,
0.00375
],
[
1297956132000,
0.00375
],
[
1297956732000,
0.00375
],
[
1297956732000,
0.00375
],
[
1297956732000,
0.00375
],
[
1297956732000,
0.00375
],
[
1297957332000,
0.00375
],
[
1297957332000,
0.00375
],
[
1297957332000,
0.00375
],
[
1297957932000,
0.00375
],
[
1297957932000,
0.00375
],
[
1297957932000,
0.00375
],
[
1297958532000,
0.00375
],
[
1297958532000,
0.00375
],
[
1297959132000,
0.00375
],
[
1297959132000,
0.00375
],
[
1297959732000,
0.00375
],
[
1297959732000,
0.00375
],
[
1297960332000,
0.00375
],
[
1297960332000,
0.00375
],
[
1297960932000,
0.00375
],
[
1297960932000,
0.00375
],
[
1297961532000,
0.00375
],
[
1297961532000,
0.00375
],
[
1297962132000,
0.00375
],
[
1297962132000,
0.00375
],
[
1297962732000,
0.00375
],
[
1297962732000,
0.00375
],
[
1297963332000,
0.00375
],
[
1297963332000,
0.00375
],
[
1297963932000,
0.00375
],
[
1297963932000,
0.00375
],
[
1297964532000,
0.00375
],
[
1297964532000,
0.00375
],
[
1297965132000,
0.00375
],
[
1297965132000,
0.00375
],
[
1297965732000,
0.00375
],
[
1297965732000,
0.00375
],
[
1297966332000,
0.00375
],
[
1297966332000,
0.00375
],
[
1297966932000,
0.00375
],
[
1297966932000,
0.00375
],
[
1297967532000,
0.00375
],
[
1297967532000,
0.00375
],
[
1297968132000,
0.00375
],
[
1297968132000,
0.00375
],
[
1297968732000,
0.00375
],
[
1297968732000,
0.00375
],
[
1297969332000,
0.00375
],
[
1297969332000,
0.00375
],
[
1297969932000,
0.00375
],
[
1297969932000,
0.00375
],
[
1297970532000,
0.00375
],
[
1297970532000,
0.00375
],
[
1297971132000,
0.00375
],
[
1297971132000,
0.00375
],
[
1297971732000,
0.00375
],
[
1297971732000,
0.00375
],
[
1297972332000,
0.00375
],
[
1297972332000,
0.00375
],
[
1297972932000,
0.00375
],
[
1297972932000,
0.00375
],
[
1297973532000,
0.00375
],
[
1297973532000,
0.00375
],
[
1297974132000,
0.00375
],
[
1297974132000,
0.00375
],
[
1297974732000,
0.00375
],
[
1297974732000,
0.00375
],
[
1297975332000,
0.00375
],
[
1297975332000,
0.00375
],
[
1297975932000,
0.00375
],
[
1297975932000,
0.00375
],
[
1297976532000,
0.00375
],
[
1297976532000,
0.00375
],
[
1297977132000,
0.00375
],
[
1297977132000,
0.00375
],
[
1297977732000,
0.00375
],
[
1297977732000,
0.00375
],
[
1297978332000,
0.00375
],
[
1297978332000,
0.00375
],
[
1297978932000,
0.00375
],
[
1297978932000,
0.00375
],
[
1297979532000,
0.00375
],
[
1297979532000,
0.00375
],
[
1297980132000,
0.00375
],
[
1297980132000,
0.00375
],
[
1297980732000,
0.00375
],
[
1297980732000,
0.00375
],
[
1297981332000,
0.00375
],
[
1297981332000,
0.00375
],
[
1297981932000,
0.00375
],
[
1297981932000,
0.00375
],
[
1297982532000,
0.00375
],
[
1297983132000,
0.00375
],
[
1297983732000,
0.00375
],
[
1297984332000,
0.00375
],
[
1297984932000,
0.00375
],
[
1297985532000,
0.00375
],
[
1297986132000,
0.00375
],
[
1297986732000,
0.00375
],
[
1297987332000,
0.00375
],
[
1297987932000,
0.00375
],
[
1297988532000,
0.00375
],
[
1297989132000,
0.00375
],
[
1297989732000,
0.00375
],
[
1297990332000,
0.00375
],
[
1297990932000,
0.00375
],
[
1297991532000,
0.00375
],
[
1297992132000,
0.00375
],
[
1297992732000,
0.00375
],
[
1297993332000,
0.00375
],
[
1297993932000,
0.00375
],
[
1297994532000,
0.00375
],
[
1297995132000,
0.00375
],
[
1297995732000,
0.00375
],
[
1297996332000,
0.00375
],
[
1297996932000,
0.00375
],
[
1297997532000,
0.00375
],
[
1297998132000,
0.00375
],
[
1297998732000,
0.00375
],
[
1297999332000,
0.00375
],
[
1297999932000,
0.00375
],
[
1298000532000,
0.00375
],
[
1298001132000,
0.00375
],
[
1298001732000,
0.00375
],
[
1298002332000,
0.00375
],
[
1298002932000,
0.00375
],
[
1298003532000,
0.00375
],
[
1298004132000,
0.00375
],
[
1298004732000,
0.00375
],
[
1298005332000,
0.00375
],
[
1298005932000,
0.00375
],
[
1298006532000,
0.00375
],
[
1298007132000,
0.00375
],
[
1298007732000,
0.00375
],
[
1298008332000,
0.00375
],
[
1298008932000,
0.00375
],
[
1298009532000,
0.00375
],
[
1298010132000,
0.00375
],
[
1298010732000,
0.00375
],
[
1298011332000,
0.00375
],
[
1298011932000,
0.00375
],
[
1298012532000,
0.00375
],
[
1298013132000,
0.00375
],
[
1298013732000,
0.00375
],
[
1298014332000,
0.00375
],
[
1298014932000,
0.00375
],
[
1298015532000,
0.00375
],
[
1298016132000,
0.00375
],
[
1298016732000,
0.00375
],
[
1298017332000,
0.00375
],
[
1298017932000,
0.00375
],
[
1298018532000,
0.00375
],
[
1298019132000,
0.0125
],
[
1298019732000,
0.0033333333333333
],
[
1298020332000,
0.0033333333333333
],
[
1298020932000,
0.0033333333333333
],
[
1298021532000,
0.0033333333333333
],
[
1298022132000,
0.0033333333333333
],
[
1298022732000,
0.0033333333333333
],
[
1298023332000,
0.0033333333333333
],
[
1298023932000,
0.0033333333333333
],
[
1298024532000,
0.0033333333333333
],
[
1298025132000,
0.0033333333333333
],
[
1298025732000,
0.0033333333333333
],
[
1298026332000,
0.0033333333333333
],
[
1298026932000,
0.0033333333333333
],
[
1298027532000,
0.0033333333333333
],
[
1298028132000,
0.0033333333333333
],
[
1298028732000,
0.0033333333333333
],
[
1298029332000,
0.0033333333333333
],
[
1298029932000,
0.0033333333333333
],
[
1298030532000,
0.0033333333333333
],
[
1298031132000,
0.0033333333333333
],
[
1298031732000,
0.0033333333333333
],
[
1298032332000,
0.0033333333333333
],
[
1298032932000,
0.0033333333333333
],
[
1298033532000,
0.0033333333333333
],
[
1298034132000,
0.0033333333333333
],
[
1298034732000,
0.0033333333333333
],
[
1298035332000,
0.0033333333333333
],
[
1298035932000,
0.0033333333333333
],
[
1298036532000,
0.0033333333333333
],
[
1298037132000,
0.0033333333333333
],
[
1298037732000,
0.0033333333333333
],
[
1298038332000,
0.0033333333333333
],
[
1298038932000,
0.0033333333333333
],
[
1298039532000,
0.0033333333333333
],
[
1298040132000,
0.0033333333333333
],
[
1298040732000,
0.0033333333333333
],
[
1298041332000,
0.0033333333333333
],
[
1298041932000,
0.0033333333333333
],
[
1298042532000,
0.0033333333333333
],
[
1298043132000,
0.0033333333333333
],
[
1298043732000,
0.0033333333333333
],
[
1298044332000,
0.0033333333333333
],
[
1298044932000,
0.0033333333333333
],
[
1298045532000,
0.0033333333333333
],
[
1298046132000,
0.0033333333333333
],
[
1298046732000,
0.0033333333333333
],
[
1298047332000,
0.0033333333333333
],
[
1298047932000,
0.0033333333333333
],
[
1298048532000,
0.0033333333333333
],
[
1298049132000,
0.0033333333333333
],
[
1298049732000,
0.0033333333333333
],
[
1298050332000,
0.0033333333333333
],
[
1298050932000,
0.0033333333333333
],
[
1298051532000,
0.0033333333333333
],
[
1298052132000,
0.0033333333333333
],
[
1298052732000,
0.0033333333333333
],
[
1298053332000,
0.0033333333333333
],
[
1298053932000,
0.0033333333333333
],
[
1298054532000,
0.0033333333333333
],
[
1298055132000,
0.0033333333333333
],
[
1298055732000,
0.0033333333333333
],
[
1298056332000,
0.0033333333333333
],
[
1298056932000,
0.0033333333333333
],
[
1298057532000,
0.0033333333333333
],
[
1298058132000,
0.0033333333333333
],
[
1298058732000,
0.0033333333333333
],
[
1298059332000,
0.0033333333333333
],
[
1298059932000,
0.0033333333333333
],
[
1298060532000,
0.0033333333333333
],
[
1298061132000,
0.0033333333333333
],
[
1298061732000,
0.0033333333333333
],
[
1298062332000,
0.0033333333333333
],
[
1298062932000,
0.0033333333333333
],
[
1298063532000,
0.0033333333333333
],
[
1298064132000,
0.0033333333333333
],
[
1298064732000,
0.0033333333333333
],
[
1298065332000,
0.0033333333333333
],
[
1298065932000,
0.0033333333333333
],
[
1298066532000,
0.0033333333333333
],
[
1298067132000,
0.0033333333333333
],
[
1298067732000,
0.0033333333333333
],
[
1298068332000,
0.0033333333333333
],
[
1298068932000,
0.0033333333333333
],
[
1298069532000,
0.0033333333333333
],
[
1298070132000,
0.0033333333333333
],
[
1298070732000,
0.0033333333333333
],
[
1298071332000,
0.0033333333333333
],
[
1298071932000,
0.0033333333333333
],
[
1298072532000,
0.0033333333333333
],
[
1298073132000,
0.0033333333333333
],
[
1298073732000,
0.0033333333333333
],
[
1298074332000,
0.0033333333333333
],
[
1298074932000,
0.0033333333333333
],
[
1298075532000,
0.0033333333333333
],
[
1298076132000,
0.0033333333333333
],
[
1298076732000,
0.0033333333333333
],
[
1298077332000,
0.0033333333333333
],
[
1298077932000,
0.0033333333333333
],
[
1298078532000,
0.0033333333333333
],
[
1298079132000,
0.0033333333333333
],
[
1298079732000,
0.0033333333333333
],
[
1298080332000,
0.0033333333333333
],
[
1298080932000,
0.0033333333333333
],
[
1298081532000,
0.0033333333333333
],
[
1298082132000,
0.0033333333333333
],
[
1298082732000,
0.0033333333333333
],
[
1298083332000,
0.0033333333333333
],
[
1298083932000,
0.0033333333333333
],
[
1298084532000,
0.0033333333333333
],
[
1298085132000,
0.0033333333333333
],
[
1298085732000,
0.0033333333333333
],
[
1298086332000,
0.0033333333333333
],
[
1298086932000,
0.0033333333333333
],
[
1298087532000,
0.0033333333333333
],
[
1298088132000,
0.0033333333333333
],
[
1298088732000,
0.0033333333333333
],
[
1298089332000,
0.0033333333333333
],
[
1298089932000,
0.0033333333333333
],
[
1298090532000,
0.0033333333333333
],
[
1298091132000,
0.0033333333333333
],
[
1298091732000,
0.0033333333333333
],
[
1298092332000,
0.0033333333333333
],
[
1298092932000,
0.0033333333333333
],
[
1298093532000,
0.0033333333333333
],
[
1298094132000,
0.0033333333333333
],
[
1298094732000,
0.0033333333333333
],
[
1298095332000,
0.0033333333333333
],
[
1298095932000,
0.0033333333333333
],
[
1298096532000,
0.0033333333333333
],
[
1298097132000,
0.0033333333333333
],
[
1298097732000,
0.0033333333333333
],
[
1298098332000,
0.0033333333333333
],
[
1298098932000,
0.0033333333333333
],
[
1298099532000,
0.0033333333333333
],
[
1298100132000,
0.0033333333333333
],
[
1298100732000,
0.0033333333333333
],
[
1298101332000,
0.0033333333333333
],
[
1298101932000,
0.0033333333333333
],
[
1298102532000,
0.0033333333333333
],
[
1298103132000,
0.0033333333333333
],
[
1298103732000,
0.0033333333333333
],
[
1298104332000,
0.0033333333333333
],
[
1298104932000,
0.0033333333333333
],
[
1298105532000,
0.0125
],
[
1298106132000,
0.0029166666666667
],
[
1298106732000,
0.0029166666666667
],
[
1298107332000,
0.0029166666666667
],
[
1298107932000,
0.0029166666666667
],
[
1298108532000,
0.0029166666666667
],
[
1298109132000,
0.0029166666666667
],
[
1298109732000,
0.0029166666666667
],
[
1298110332000,
0.0029166666666667
],
[
1298110932000,
0.0029166666666667
],
[
1298111532000,
0.0029166666666667
],
[
1298112132000,
0.0029166666666667
],
[
1298112732000,
0.0029166666666667
],
[
1298113332000,
0.0029166666666667
],
[
1298113932000,
0.0029166666666667
],
[
1298114532000,
0.0029166666666667
],
[
1298115132000,
0.0029166666666667
],
[
1298115732000,
0.0029166666666667
],
[
1298116332000,
0.0029166666666667
],
[
1298116932000,
0.0029166666666667
],
[
1298117532000,
0.0029166666666667
],
[
1298118132000,
0.0029166666666667
],
[
1298118732000,
0.0029166666666667
],
[
1298119332000,
0.0029166666666667
],
[
1298119932000,
0.0029166666666667
],
[
1298120532000,
0.0029166666666667
],
[
1298121132000,
0.0029166666666667
],
[
1298121732000,
0.0029166666666667
],
[
1298122332000,
0.0029166666666667
],
[
1298122932000,
0.0029166666666667
],
[
1298123532000,
0.0029166666666667
],
[
1298124132000,
0.0029166666666667
],
[
1298124732000,
0.0029166666666667
],
[
1298125332000,
0.0029166666666667
],
[
1298125932000,
0.0029166666666667
],
[
1298126532000,
0.0029166666666667
],
[
1298127132000,
0.0029166666666667
],
[
1298127732000,
0.0029166666666667
],
[
1298128332000,
0.0029166666666667
],
[
1298128932000,
0.0029166666666667
],
[
1298129532000,
0.0029166666666667
],
[
1298130132000,
0.0029166666666667
],
[
1298130732000,
0.0029166666666667
],
[
1298131332000,
0.0029166666666667
],
[
1298131932000,
0.0029166666666667
],
[
1298132532000,
0.0029166666666667
],
[
1298133132000,
0.0029166666666667
],
[
1298133732000,
0.0029166666666667
],
[
1298134332000,
0.0029166666666667
],
[
1298134932000,
0.0029166666666667
],
[
1298135532000,
0.0029166666666667
],
[
1298136132000,
0.0029166666666667
],
[
1298136732000,
0.0029166666666667
],
[
1298137332000,
0.0029166666666667
],
[
1298137932000,
0.0029166666666667
],
[
1298138532000,
0.0029166666666667
],
[
1298139132000,
0.0029166666666667
],
[
1298139732000,
0.0029166666666667
],
[
1298140332000,
0.0029166666666667
],
[
1298140932000,
0.0029166666666667
],
[
1298141532000,
0.0029166666666667
],
[
1298142132000,
0.0029166666666667
],
[
1298142732000,
0.0029166666666667
],
[
1298143332000,
0.0029166666666667
],
[
1298143932000,
0.0029166666666667
],
[
1298144532000,
0.0029166666666667
],
[
1298145132000,
0.0029166666666667
],
[
1298145732000,
0.0029166666666667
],
[
1298146332000,
0.0029166666666667
],
[
1298146932000,
0.0029166666666667
],
[
1298147532000,
0.0029166666666667
],
[
1298148132000,
0.0029166666666667
],
[
1298148732000,
0.0029166666666667
],
[
1298149332000,
0.0029166666666667
],
[
1298149932000,
0.0029166666666667
],
[
1298150532000,
0.0029166666666667
],
[
1298151132000,
0.0029166666666667
],
[
1298151732000,
0.0029166666666667
],
[
1298152332000,
0.0029166666666667
],
[
1298152932000,
0.0029166666666667
],
[
1298153532000,
0.0029166666666667
],
[
1298154132000,
0.0029166666666667
],
[
1298154732000,
0.0029166666666667
],
[
1298155332000,
0.0029166666666667
],
[
1298155932000,
0.0029166666666667
],
[
1298156532000,
0.0029166666666667
],
[
1298157132000,
0.0029166666666667
],
[
1298157732000,
0.0029166666666667
],
[
1298158332000,
0.0029166666666667
],
[
1298158932000,
0.0029166666666667
],
[
1298159532000,
0.0029166666666667
],
[
1298160132000,
0.0029166666666667
],
[
1298160732000,
0.0029166666666667
],
[
1298161332000,
0.0029166666666667
],
[
1298161932000,
0.0029166666666667
],
[
1298162532000,
0.0029166666666667
],
[
1298163132000,
0.0029166666666667
],
[
1298163732000,
0.0029166666666667
],
[
1298164332000,
0.0029166666666667
],
[
1298164932000,
0.0029166666666667
],
[
1298165532000,
0.0029166666666667
],
[
1298166132000,
0.0029166666666667
],
[
1298166732000,
0.0029166666666667
],
[
1298167332000,
0.0029166666666667
],
[
1298167932000,
0.0029166666666667
],
[
1298168532000,
0.0029166666666667
],
[
1298169132000,
0.0029166666666667
],
[
1298169732000,
0.0029166666666667
],
[
1298170332000,
0.0029166666666667
],
[
1298170932000,
0.0029166666666667
],
[
1298171532000,
0.0029166666666667
],
[
1298172132000,
0.0029166666666667
],
[
1298172732000,
0.0029166666666667
],
[
1298173332000,
0.0029166666666667
],
[
1298173932000,
0.0029166666666667
],
[
1298174532000,
0.0029166666666667
],
[
1298175132000,
0.0029166666666667
],
[
1298175732000,
0.0029166666666667
],
[
1298176332000,
0.0029166666666667
],
[
1298176932000,
0.0029166666666667
],
[
1298177532000,
0.0029166666666667
],
[
1298178132000,
0.0029166666666667
],
[
1298178732000,
0.0029166666666667
],
[
1298179332000,
0.0029166666666667
],
[
1298179932000,
0.0029166666666667
],
[
1298180532000,
0.0029166666666667
],
[
1298181132000,
0.0029166666666667
],
[
1298181732000,
0.0029166666666667
],
[
1298182332000,
0.0029166666666667
],
[
1298182932000,
0.0029166666666667
],
[
1298183532000,
0.0029166666666667
],
[
1298184132000,
0.0029166666666667
],
[
1298184732000,
0.0029166666666667
],
[
1298185332000,
0.0029166666666667
],
[
1298185932000,
0.0029166666666667
],
[
1298186532000,
0.0029166666666667
],
[
1298187132000,
0.0029166666666667
],
[
1298187732000,
0.0029166666666667
],
[
1298188332000,
0.0029166666666667
],
[
1298188932000,
0.0029166666666667
],
[
1298189532000,
0.0029166666666667
],
[
1298190132000,
0.0029166666666667
],
[
1298190732000,
0.0029166666666667
],
[
1298191332000,
0.0029166666666667
],
[
1298191932000,
0.0125
],
[
1298192532000,
0.0025
],
[
1298193132000,
0.0025
],
[
1298193732000,
0.0025
],
[
1298194332000,
0.0025
],
[
1298194932000,
0.0025
],
[
1298195532000,
0.0025
],
[
1298196132000,
0.0025
],
[
1298196732000,
0.0025
],
[
1298197332000,
0.0025
],
[
1298197932000,
0.0025
],
[
1298198532000,
0.0025
],
[
1298199132000,
0.0025
],
[
1298199732000,
0.0025
],
[
1298200332000,
0.0025
],
[
1298200932000,
0.0025
],
[
1298201532000,
0.0025
],
[
1298202132000,
0.0025
],
[
1298202732000,
0.0025
],
[
1298203332000,
0.0025
],
[
1298203932000,
0.0025
],
[
1298204532000,
0.0025
],
[
1298205132000,
0.0025
],
[
1298205732000,
0.0025
],
[
1298206332000,
0.0025
],
[
1298206932000,
0.0025
],
[
1298207532000,
0.0025
],
[
1298208132000,
0.0025
],
[
1298208732000,
0.0025
],
[
1298209332000,
0.0025
],
[
1298209932000,
0.0025
],
[
1298210532000,
0.0025
],
[
1298211132000,
0.0025
],
[
1298211732000,
0.0025
],
[
1298212332000,
0.0025
],
[
1298212932000,
0.0025
],
[
1298213532000,
0.0025
],
[
1298214132000,
0.0025
],
[
1298214732000,
0.0025
],
[
1298215332000,
0.0025
],
[
1298215932000,
0.0025
],
[
1298216532000,
0.0025
],
[
1298217132000,
0.0025
],
[
1298217732000,
0.0025
],
[
1298218332000,
0.0025
],
[
1298218932000,
0.0025
],
[
1298219532000,
0.0025
],
[
1298220132000,
0.0025
],
[
1298220732000,
0.0025
],
[
1298221332000,
0.0025
],
[
1298221932000,
0.0025
],
[
1298222532000,
0.0025
],
[
1298223132000,
0.0025
],
[
1298223732000,
0.0025
],
[
1298224332000,
0.0025
],
[
1298224932000,
0.0025
],
[
1298225532000,
0.0025
],
[
1298226132000,
0.0025
],
[
1298226732000,
0.0025
],
[
1298227332000,
0.0025
],
[
1298227932000,
0.0025
],
[
1298228532000,
0.0025
],
[
1298229132000,
0.0025
],
[
1298229732000,
0.0025
],
[
1298230332000,
0.0025
],
[
1298230932000,
0.0025
],
[
1298231532000,
0.0025
],
[
1298232132000,
0.0025
],
[
1298232732000,
0.0025
],
[
1298233332000,
0.0025
],
[
1298233932000,
0.0025
],
[
1298234532000,
0.0025
],
[
1298235132000,
0.0025
],
[
1298235732000,
0.0025
],
[
1298236332000,
0.0025
],
[
1298236932000,
0.0025
],
[
1298237532000,
0.0025
],
[
1298238132000,
0.0025
],
[
1298238732000,
0.0025
],
[
1298239332000,
0.0025
],
[
1298239932000,
0.0025
],
[
1298240532000,
0.0025
],
[
1298241132000,
0.0025
],
[
1298241732000,
0.0025
],
[
1298242332000,
0.0025
],
[
1298242932000,
0.0025
],
[
1298243532000,
0.0025
],
[
1298244132000,
0.0025
],
[
1298244732000,
0.0025
],
[
1298245332000,
0.0025
],
[
1298245932000,
0.0025
],
[
1298246532000,
0.0025
],
[
1298247132000,
0.0025
],
[
1298247732000,
0.0025
],
[
1298248332000,
0.0025
],
[
1298248932000,
0.0025
],
[
1298249532000,
0.0025
],
[
1298250132000,
0.0025
],
[
1298250732000,
0.0025
],
[
1298251332000,
0.0025
],
[
1298251932000,
0.0025
],
[
1298252532000,
0.0025
],
[
1298253132000,
0.0025
],
[
1298253732000,
0.0025
],
[
1298254332000,
0.0025
],
[
1298254932000,
0.0025
],
[
1298255532000,
0.0025
],
[
1298256132000,
0.0025
],
[
1298256732000,
0.0025
],
[
1298257332000,
0.0025
],
[
1298257932000,
0.0025
],
[
1298258532000,
0.0025
],
[
1298259132000,
0.0025
],
[
1298259732000,
0.0025
],
[
1298260332000,
0.0025
],
[
1298260932000,
0.0025
],
[
1298261532000,
0.0025
],
[
1298262132000,
0.0025
],
[
1298262732000,
0.0025
],
[
1298263332000,
0.0025
],
[
1298263932000,
0.0025
],
[
1298264532000,
0.0025
],
[
1298265132000,
0.0025
],
[
1298265732000,
0.0025
],
[
1298266332000,
0.0025
],
[
1298266932000,
0.0025
],
[
1298267532000,
0.0025
],
[
1298268132000,
0.0025
],
[
1298268732000,
0.0025
],
[
1298269332000,
0.0025
],
[
1298269932000,
0.0025
],
[
1298270532000,
0.0025
],
[
1298271132000,
0.0025
],
[
1298271732000,
0.0025
],
[
1298272332000,
0.0025
],
[
1298272932000,
0.0025
],
[
1298273532000,
0.0025
],
[
1298274132000,
0.0025
],
[
1298274732000,
0.0025
],
[
1298275332000,
0.0025
],
[
1298275932000,
0.0025
],
[
1298276532000,
0.0025
],
[
1298277132000,
0.0025
],
[
1298277732000,
0.0025
],
[
1298278332000,
0.0125
]
]
}
@eriez
Copy link

eriez commented Apr 18, 2013

can you publish the project? i want try to run it, thank you

@v3ng3
Copy link

v3ng3 commented Apr 25, 2013

thank you for your well structured and easily understandable code.

@mburumaxwell
Copy link

Good, simple and usable. Thank you!

@manaljaw
Copy link

Thank you!

@priyanikusrini
Copy link

could you send full source code to me ? i want to run you're project for my reference. please send to my email : priyaniuti@gmail.com
thank you

@prestb
Copy link

prestb commented Sep 7, 2016

@stevedonovan Thanks for such a wonderful tutorial. I have a question: can it be possible to load the data directly from an online json link? than a file in a phone?

@manzoorsk
Copy link

Please i want help,send me the source code, sk.manzoor580@gmail.com -->this is my mail ,Thank you

@nagendra25
Copy link

How to i code this data for crating Chart,I Want date as X axis and run_time as Y As Y axis.please Help Me
{
"ResponseCode": "200",
"ResponseMessage": "Success",
"ResponseData": [
{
"date": "2017-07-24",
"distance": 23.045,
"run_time": "01:02:50"
},
{
"date": "2017-07-25",
"distance": 14.561,
"run_time": "01:36:18"
},
{
"date": "2017-07-27",
"distance": 19.666,
"run_time": "02:33:21"
},
{
"date": "2017-07-28",
"distance": 18.691,
"run_time": "03:17:02"
},
{
"date": "2017-07-29",
"distance": 0,
"run_time": "00:00:00"
}
],
"DisplayMessage": null
}

@anupdgavkar
Copy link

thanks you so much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment