Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta charset="utf-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <title>Index</title>
- <!-- BOOTSTRAP STYLES-->
- <link rel="stylesheet" href="{{url_for('static',filename='assets/css/bootstrap.css' )}}">
- <!-- FONTAWESOME STYLES-->
- <link rel="stylesheet" href="{{ url_for('static',filename='assets/css/font-awesome.css' )}}">
- <!-- CUSTOM STYLES-->
- <link rel="stylesheet" href="{{ url_for('static',filename='assets/css/custom.css' )}}">
- <!-- GOOGLE FONTS-->
- <link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css' />
- </head>
- <body>
- <div id="wrapper" >
- <nav class="navbar navbar-default navbar-cls-top " role="navigation" style="margin-bottom: 0">
- <div class="navbar-header" >
- <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".sidebar-collapse">
- <span class="sr-only">Toggle navigation</span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- </button>
- <a class="navbar-brand" href="index.html" style="color: white; padding-right: 40px; font-size: 25px"> ANALISIS SENTIMEN</a>
- </div>
- <div style="color: white;
- padding: 15px 50px 5px 50px;
- text-align: center;
- float: center;
- font-size: 20px;"> K-Nearest Neighbour
- </div>
- </nav>
- <!-- /. NAV TOP -->
- <nav class="navbar-default navbar-side" role="navigation">
- <div class="sidebar-collapse">
- <ul class="nav" id="main-menu">
- <li class="text-center">
- <li>
- <a href="{{url_for('index')}}"><i class="fa fa-square-o fa-3x"></i> Index</a>
- </li>
- <li>
- <a class="active-menu" href="{{url_for('hasil')}}"><i class="fa fa-square-o fa-3x"></i> K-Nearest Neighbour</a>
- </li>
- </li>
- </ul>
- </div>
- </nav>
- <!-- /. NAV SIDE -->
- <div id="page-wrapper" >
- <div id="page-inner">
- <div class="row">
- <div class="col-md-12" >
- <h2> K-Nearest Neighbour</h2>
- <div class="panel panel-primary">
- <div class="panel-heading">
- Chart Js
- </div>
- <div class="panel-body">
- <div class="chart-responsive">
- <canvas id="chart" width="550" height="350"></canvas>
- <script type="text/javascript">var pieData = [
- {% for data, labels, colors in set %}
- {
- value: {{data}},
- label: "{{labels}}",
- color : "{{colors}}"
- },
- {% endfor %}
- ]
- var pieOptions = {
- //Boolean - Whether we should show a stroke on each segment
- segmentShowStroke : true,
- //String - The colour of each segment stroke
- segmentStrokeColor : '#fff',
- //Number - The width of each segment stroke
- segmentStrokeWidth : 2,
- //Number - The percentage of the chart that we cut out of the middle
- percentageInnerCutout: 50, // This is 0 for Pie charts
- //Number - Amount of animation steps
- animationSteps : 100,
- //String - Animation easing effect
- animationEasing : 'easeOutBounce',
- //Boolean - Whether we animate the rotation of the Doughnut
- animateRotate : true,
- //Boolean - Whether we animate scaling the Doughnut from the centre
- animateScale : false,
- //Boolean - whether to make the chart responsive to window resizing
- responsive : true,
- // Boolean - whether to maintain the starting aspect ratio or not when responsive, if set to false, will take up entire container
- maintainAspectRatio : false,
- //String - A legend template
- }
- //Create pie or douhnut chart
- // You can switch between pie and douhnut using the method below.
- // pieChart.Doughnut(PieData, pieOptions)
- ;
- // draw pie chart
- new Chart(document.getElementById("chart").getContext("2d")).Pie(pieData,pieOptions);
- </script>
- </div>
- </div>
- <div class="panel-footer">
- <p> Positif = {{persen_pos}} % </p>
- <p> Negative = {{persen_neg}} %</p>
- </div>
- </div>
- <div class="table-responsive">
- {% for table in tables %}
- {{ table|safe }}
- {% endfor %}
- </div>
- <!--<div class="row">
- <div class="col-md-12">
- <h2> Accuracy</h2>
- <img src="{{url_for('static', filename='Figure_1.png')}}">
- </div>
- </div> -->
- </div>
- </div>
- <!-- /. ROW -->
- <hr />
- </div>
- <!-- /. PAGE INNER -->
- </div>
- <!-- /. PAGE WRAPPER -->
- </div>
- <!-- /. WRAPPER -->
- <!-- SCRIPTS -AT THE BOTOM TO REDUCE THE LOAD TIME-->
- <!-- JQUERY SCRIPTS -->
- <script src="{{ url_for('static',filename='assets/js/jquery-1.10.2.js' )}}"></script>
- <!-- BOOTSTRAP SCRIPTS -->
- <script src="{{ url_for('static',filename='assets/js/bootstrap.min.js' )}}"></script>
- <!-- METISMENU SCRIPTS -->
- <script src="{{ url_for('static',filename='assets/js/jquery.metisMenu.js' )}}"></script>
- <!-- CUSTOM SCRIPTS -->
- <script src="{{ url_for('static',filename='assets/js/custom.js' )}}"></script>
- <script>
- $(document).ready(function() {
- $('#tabel').DataTable({});
- } );
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement