Display JSON-data as line

Display Bitcoin-Data from this API: https://api.blockchain.info/charts/transactions-per-second?timespan=5weeks&rollingAverage=8hours&format=json

You want to know how this is done? This is the way:
  • Install the Plugin “IPU-Chart
  • Buy the PRO-Version of the JSON Content Importer
  • Put this in the JCI-Plugin Template-Manager:
    {% set anz = 1000 %}
    {% set diff = 5 %}
    [{%for v in values %}
    {% set ni = (loop.index/diff) | round %}
    {% set nw = (loop.index/diff) %}
      {% if loop.index<anz  %}
      {% if ni==nw  %}
        {"x": "{{loop.index}}", "y": {{v.y}}},
      {% endif %}
      {% endif %}
    {% endfor %}]
    
  • This is the Code for the page:
    <div id="bc" style="width:60%; font-size:0.8em"></div>
    [ip4]{
        "template": ip4.lineChart(),
    	"parentElement": "#bc",
         "data": {
            "reader":
     ip4.dataReader().data(
    [jsoncontentimporterpro url=https://api.blockchain.info/charts/transactions-per-second?timespan=5weeks&rollingAverage=8hours&format=json method=rawget parser=twig id=20]
    )
        },
        "d3": {
    		"yLabel": "BC", 
    		"xLabel": "Minutes"
    }
    }[/ip4]
    
Any comments? Drop me a line…