Change output when no emotions found
This commit is contained in:
parent
73bfc74340
commit
ac95a59cca
1 changed files with 2 additions and 1 deletions
|
@ -78,7 +78,8 @@ class ColourHandler(tornado.web.RequestHandler):
|
||||||
statHtml = "<aside id='stats'>";
|
statHtml = "<aside id='stats'>";
|
||||||
if not req_emotion:
|
if not req_emotion:
|
||||||
statHtml += "<h4>Emoties</h4>"
|
statHtml += "<h4>Emoties</h4>"
|
||||||
statHtml += charts.createPie(models.getEmotionFractionsFromArtworks(images))
|
emotionScores = models.getEmotionFractionsFromArtworks(images)
|
||||||
|
statHtml += charts.createPie(emotionScores) if len(emotionScores) else "Geen emoties opgegeven"
|
||||||
else:
|
else:
|
||||||
statHtml += "<h4>Groep</h4>"
|
statHtml += "<h4>Groep</h4>"
|
||||||
statHtml += charts.createPie(models.getGroupFractionsFromArtworks(images))
|
statHtml += charts.createPie(models.getGroupFractionsFromArtworks(images))
|
||||||
|
|
Loading…
Reference in a new issue