Advertisement
Guest User

hasil

a guest
Aug 22nd, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 6.79 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4.       <meta charset="utf-8" />
  5.     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  6.     <title>Index</title>
  7.     <!-- BOOTSTRAP STYLES-->
  8.     <link rel="stylesheet" href="{{url_for('static',filename='assets/css/bootstrap.css' )}}">
  9.      <!-- FONTAWESOME STYLES-->
  10.     <link rel="stylesheet" href="{{ url_for('static',filename='assets/css/font-awesome.css' )}}">
  11.         <!-- CUSTOM STYLES-->
  12.     <link rel="stylesheet" href="{{ url_for('static',filename='assets/css/custom.css' )}}">
  13.      <!-- GOOGLE FONTS-->
  14.    <link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css' />
  15. </head>
  16. <body>
  17.     <div id="wrapper" >
  18.         <nav class="navbar navbar-default navbar-cls-top " role="navigation" style="margin-bottom: 0">
  19.             <div class="navbar-header" >
  20.                 <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".sidebar-collapse">
  21.                     <span class="sr-only">Toggle navigation</span>
  22.                     <span class="icon-bar"></span>
  23.                     <span class="icon-bar"></span>
  24.                     <span class="icon-bar"></span>
  25.                 </button>
  26.                 <a class="navbar-brand" href="index.html" style="color: white; padding-right: 40px; font-size: 25px"> ANALISIS SENTIMEN</a>
  27.             </div>
  28.   <div style="color: white;
  29. padding: 15px 50px 5px 50px;
  30. text-align: center;
  31. float: center;
  32. font-size: 20px;"> K-Nearest Neighbour
  33. </div>
  34.         </nav>  
  35.            <!-- /. NAV TOP  -->
  36.         <nav class="navbar-default navbar-side" role="navigation">
  37.             <div class="sidebar-collapse">
  38.                 <ul class="nav" id="main-menu">
  39.                 <li class="text-center">
  40.                     <li>
  41.                         <a href="{{url_for('index')}}"><i class="fa fa-square-o fa-3x"></i> Index</a>
  42.                     </li>
  43.                      <li>
  44.                         <a class="active-menu" href="{{url_for('hasil')}}"><i class="fa fa-square-o fa-3x"></i> K-Nearest Neighbour</a>
  45.                     </li>
  46.                    
  47.                 </li>      
  48.                 </ul>
  49.             </div>
  50.         </nav>  
  51.         <!-- /. NAV SIDE  -->
  52.  
  53.         <div id="page-wrapper" >
  54.             <div id="page-inner">
  55.                 <div class="row">
  56.                   <div class="col-md-12" >
  57.                      <h2> K-Nearest Neighbour</h2>  
  58.                       <div class="panel panel-primary">
  59.                         <div class="panel-heading">
  60.                             Chart Js
  61.                         </div>
  62.                         <div class="panel-body">
  63.                             <div class="chart-responsive">
  64.               <canvas id="chart" width="550" height="350"></canvas>
  65.               <script type="text/javascript">var pieData = [
  66.                     {% for data, labels, colors in set %}
  67.                       {
  68.                         value: {{data}},
  69.                         label: "{{labels}}",
  70.                         color : "{{colors}}"
  71.                       },
  72.                     {% endfor %}
  73.                   ]
  74.                    var pieOptions     = {
  75.                     //Boolean - Whether we should show a stroke on each segment
  76.                     segmentShowStroke    : true,
  77.                     //String - The colour of each segment stroke
  78.                     segmentStrokeColor   : '#fff',
  79.                     //Number - The width of each segment stroke
  80.                     segmentStrokeWidth   : 2,
  81.                     //Number - The percentage of the chart that we cut out of the middle
  82.                     percentageInnerCutout: 50, // This is 0 for Pie charts
  83.                     //Number - Amount of animation steps
  84.                     animationSteps       : 100,
  85.                     //String - Animation easing effect
  86.                     animationEasing      : 'easeOutBounce',
  87.                     //Boolean - Whether we animate the rotation of the Doughnut
  88.                     animateRotate        : true,
  89.                     //Boolean - Whether we animate scaling the Doughnut from the centre
  90.                     animateScale         : false,
  91.                     //Boolean - whether to make the chart responsive to window resizing
  92.                     responsive           : true,
  93.                     // Boolean - whether to maintain the starting aspect ratio or not when responsive, if set to false, will take up entire container
  94.                     maintainAspectRatio  : false,
  95.                     //String - A legend template
  96.  
  97.                    
  98.                   }
  99.     //Create pie or douhnut chart
  100.     // You can switch between pie and douhnut using the method below.
  101.    // pieChart.Doughnut(PieData, pieOptions)
  102.                   ;
  103.                  
  104.                   // draw pie chart
  105.                   new Chart(document.getElementById("chart").getContext("2d")).Pie(pieData,pieOptions);
  106.               </script>
  107.             </div>
  108.  
  109.                         </div>
  110.                         <div class="panel-footer">
  111.                            
  112.                            <p> Positif  = {{persen_pos}} % </p>
  113.                            <p> Negative = {{persen_neg}} %</p>
  114.                         </div>
  115.                        
  116.                     </div>
  117.                        <div class="table-responsive">
  118.                         {% for table in tables %}
  119.            
  120.                         {{ table|safe }}
  121.                         {% endfor %}          
  122.                      </div>
  123.                      <!--<div class="row">
  124.                      <div class="col-md-12">
  125.                        <h2> Accuracy</h2>
  126.                        <img src="{{url_for('static', filename='Figure_1.png')}}">
  127.                      </div>
  128.                      
  129.                     </div> -->
  130.                     </div>
  131.                 </div>
  132.                  <!-- /. ROW  -->
  133.                  <hr />
  134.                
  135.     </div>
  136.              <!-- /. PAGE INNER  -->
  137.             </div>
  138.          <!-- /. PAGE WRAPPER  -->
  139.         </div>
  140.      <!-- /. WRAPPER  -->
  141.     <!-- SCRIPTS -AT THE BOTOM TO REDUCE THE LOAD TIME-->
  142.     <!-- JQUERY SCRIPTS -->
  143.     <script src="{{ url_for('static',filename='assets/js/jquery-1.10.2.js' )}}"></script>
  144.    
  145.    
  146.       <!-- BOOTSTRAP SCRIPTS -->
  147.     <script src="{{ url_for('static',filename='assets/js/bootstrap.min.js' )}}"></script>
  148.     <!-- METISMENU SCRIPTS -->
  149.     <script src="{{ url_for('static',filename='assets/js/jquery.metisMenu.js' )}}"></script>
  150.       <!-- CUSTOM SCRIPTS -->
  151.     <script src="{{ url_for('static',filename='assets/js/custom.js' )}}"></script>
  152.    
  153.    <script>
  154. $(document).ready(function() {
  155.     $('#tabel').DataTable({});
  156. } );
  157. </script>
  158. </body>
  159. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement