Jump to content

hai, how to plotting data from Firebase into Chart.js ?

this is my code to read json file from firebase.

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>Baca JSON</title>
    </head>
    <body>
        <ul></ul>
        <script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
        <script>
                'use strict';
                $.getJSON('https://skripsi-adeguntoro.firebaseio.com/sensor1.json', function (data) {
                     $.each(data, function (key, value) {
                         $('ul').append("<li>"+value.temp+" : "+value.time+"</li>");
                     });
                    console.log(data);
                });
        </script>
    </body>
</html>

 

Link to comment
https://linustechtips.com/topic/805330-firebase-and-chartjs/
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×