Commit 5ff01d05 authored by Larry Schultheis's avatar Larry Schultheis
Browse files

GRAPHS

Added a random ass graf
parent 29a6ff18
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@
        <div id="top_algorithm">
            <p>Algorithm currently in use: </p><p name="algorithmInUse"></p>
            <br>
            <table class="table table-bordered table-hover" style="width: 25%;">
            <table class="table table-bordered table-hover" style="width: 50%;">
                <thead class="thead-dark">
                    <tr>
                        <th>Algorithm Name</th>
@@ -92,5 +92,8 @@
<!-- Latest compiled JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>

<!-- Visualization import -->
<script src="https://code.highcharts.com/highcharts.js"></script>

<!-- ML Script -->
<script src="js/main.js"></script>
 No newline at end of file
+30 −0
Original line number Diff line number Diff line

document.addEventListener('DOMContentLoaded', loadGraphs())

// todo fix this to actually send the message data
function getPrediction() {
    var url = "http://localhost:8080"
@@ -28,6 +30,8 @@ function getPrediction() {

// todo fix this to actually send the message data
function correctPrediction(correctLabel) {
    

    // debug
    var message = document.getElementById('message').value;
    console.log(message + " is " + correctLabel);
@@ -144,3 +148,29 @@ function initializeIndex() {
function clearIndex() {
    document.getElementById("message").value = "";
}

function loadGraphs(){
    var myChart = Highcharts.chart('other_visualizations', {
        chart: {
            type: 'bar'
        },
        title: {
            text: 'Fruit Consumption'
        },
        xAxis: {
            categories: ['Apples', 'Bananas', 'Oranges']
        },
        yAxis: {
            title: {
                text: 'Fruit eaten'
            }
        },
        series: [{
            name: 'Jane',
            data: [1, 0, 4]
        }, {
            name: 'John',
            data: [5, 7, 3]
        }]
    });
}
 No newline at end of file