changed to agg backend for heroku

This commit is contained in:
Walker Waylon Scott 2017-05-21 11:02:50 -05:00
parent 5e243cdc61
commit 57af966ebe
4 changed files with 43 additions and 4 deletions

Binary file not shown.

View file

@ -6,6 +6,8 @@ from flask import Flask, render_template, g, jsonify, request, redirect
import pandas as pd import pandas as pd
import settings import settings
from random import choice from random import choice
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
from matplotlib.pyplot import rcParams from matplotlib.pyplot import rcParams

View file

@ -0,0 +1,34 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Simple chart with C3 - in 5 minutes! </title>
<!-- Here are all the javascripts and css that you need, you can download them or linked them like here -->
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/d3/3.4.11/d3.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/c3/0.1.29/c3.js"></script>
<link href="//cdnjs.cloudflare.com/ajax/libs/c3/0.1.29/c3.css" rel="stylesheet" type="text/css">
</head>
<body>
<!-- You need an element with an id called "chart" to set a place where your chart will render-->
<div id="chart"></div>
<script type="text/javascript">
var chart = c3.generate({
data: {
columns: [
['Lulu', 50],
['Olaf', 50],
],
type : 'donut'
},
donut: {
title: "Dogs love:",
}
});
</script>
</body>
</html>

View file

@ -1,17 +1,20 @@
# Requirements automatically generated by pigar. # Requirements automatically generated by pigar.
# https://github.com/Damnever/pigar # https://github.com/Damnever/pigar
# app.py: 2 Python == 3.6.1
# app.py: 5
Flask == 0.12 Flask == 0.12
# app.py: 7 # app.py: 12
Flask_WTF == 0.14.2 Flask_WTF == 0.14.2
# app.py: 8 # app.py: 13
WTForms == 2.1 WTForms == 2.1
# app.py: 9,10
# settings.py: 4 # settings.py: 4
matplotlib == 2.0.2 matplotlib == 2.0.2
# app.py: 3 # app.py: 6
pandas == 0.20.1 pandas == 0.20.1