From 248f7baaab5ed7dd84189429b66f1cf83f39b975 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0est=C3=A1k=20V=C3=ADt?= Date: Fri, 31 Mar 2017 16:48:30 +0200 Subject: [PATCH] Show values in legend --- app/views/statistics/vulnerableLibraries.scala.html | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/views/statistics/vulnerableLibraries.scala.html b/app/views/statistics/vulnerableLibraries.scala.html index 208c654..e3b8aa6 100644 --- a/app/views/statistics/vulnerableLibraries.scala.html +++ b/app/views/statistics/vulnerableLibraries.scala.html @@ -26,6 +26,7 @@ $(document).ready(function(){ seriesDefaults: { // Make this a pie chart. renderer: jQuery.jqplot.PieRenderer, + pointLabels: true, rendererOptions: { // Put data labels on the pie slices. // By default, labels show the percentage of the slice. @@ -38,7 +39,13 @@ $(document).ready(function(){ } } }, - legend: { show:true, location: 'e' } + legend: { + show:true, + location: 'e', + labels: $(data).map(function (i, item) { + return item[0]+" ("+item[1]+")"; + }) + } }); });