From 5f885826840c70806b65aa159799d05b9f8e45aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20=20MENAGER?= <herve.menager@pasteur.fr> Date: Sun, 8 Apr 2018 19:43:01 +0200 Subject: [PATCH] add a better tooltip on LE-LLE biplot hover Former-commit-id: 6378ccdbda7ae16cb76c2d4ce35a96e06cbccf23 --- ippisite/ippidb/templates/base.html | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ippisite/ippidb/templates/base.html b/ippisite/ippidb/templates/base.html index 9b018e45..d6e1f74a 100644 --- a/ippisite/ippidb/templates/base.html +++ b/ippisite/ippidb/templates/base.html @@ -113,7 +113,7 @@ backgroundColor: "rgba(211,211,211, 0.5)", data: otherFamiliesData }, - { label: '{{ compound.best_activity_ppi_name}} family', + { label: compoundFamily, borderColor: "rgba(54, 162, 235, 1)", backgroundColor: "rgba(54, 162, 235, 0.5)", data: currentFamilyData @@ -134,6 +134,14 @@ type: 'linear', position: 'bottom' }] + }, + tooltips: { + callbacks: { + label: function(tooltipItem, data) { + var dataItem = data.datasets[tooltipItem.datasetIndex].data[tooltipItem.index]; + return "compound " + dataItem.id + " on PPI " + dataItem.family_name; + } + } } } }); -- GitLab