JSFiddle - React, Tailwind, and code Playground

by stephane_klein

HTML

<script src="//cdnjs.cloudflare.com/ajax/libs/d3/3.4.13/d3.js"></script>
<script src="https://raw.githubusercontent.com/mozilla/metrics-graphics/master/js/metricsgraphics.min.js"></script>
<link rel="stylesheet" href="https://raw.githubusercontent.com/mozilla/metrics-graphics/master/css/metricsgraphics.css">
<body>
<div id="downloads"></div>
</body>

JavaScript

data_graphic({
    title: "Downloads",
    description: "This graphic shows a time-series of downloads.",
    list: true,
    data: [
        [new Date('2014-11-01'), 12],
        [new Date('2014-11-02'), 18]
    ],
    width: 600,
    height: 250,
    target: '#downloads'
})