adjusted graph to be svg
This commit is contained in:
12
templates/base.html
Normal file
12
templates/base.html
Normal file
@@ -0,0 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Report</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/styles.css') }}" />
|
||||
</head>
|
||||
<body>
|
||||
{% block content %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,29 +1,30 @@
|
||||
<div id="graph"></div>
|
||||
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
|
||||
<script>
|
||||
const data = {{ graph_data | safe }};
|
||||
Plotly.newPlot('graph', data);
|
||||
</script>
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<h1>Report</h1>
|
||||
<img src="{{ graph_image }}" alt="{{ graph_image }}">
|
||||
|
||||
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Header 1</th>
|
||||
<th>Header 2</th>
|
||||
<th>Header 1</th>
|
||||
<th>Header 2</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for row in table_data %}
|
||||
<tr>
|
||||
<td>{{ row[0] }}</td>
|
||||
<td>{{ row[1] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ row[0] }}</td>
|
||||
<td>{{ row[1] }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<form method="POST" action="/submit">
|
||||
<label for="data">Enter Data:</label>
|
||||
<input type="text" id="data" name="data">
|
||||
<button type="submit">Submit</button>
|
||||
</form>
|
||||
<form method="POST" action="/submit">
|
||||
<label for="data">Enter Data:</label>
|
||||
<input type="text" id="data" name="data" />
|
||||
<button type="submit">Submit</button>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user