mirror of
https://github.com/pi-hole/web.git
synced 2025-12-24 20:55:28 +00:00
Add offset effect on hover to the doughnut charts
We need to add a small padding to avoid "clipping" the arc/slice. This happens because when an arc/slice expands, it grows beyond the canvas limits and get clipped. Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
This commit is contained in:
@@ -890,6 +890,8 @@ $(() => {
|
||||
elements: {
|
||||
arc: {
|
||||
borderColor: $(".box").css("background-color"),
|
||||
hoverBorderColor: $(".box").css("background-color"),
|
||||
hoverOffset: 10,
|
||||
},
|
||||
},
|
||||
plugins: {
|
||||
@@ -914,6 +916,9 @@ $(() => {
|
||||
animation: {
|
||||
duration: 750,
|
||||
},
|
||||
layout: {
|
||||
padding: 10,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
@@ -936,6 +941,8 @@ $(() => {
|
||||
elements: {
|
||||
arc: {
|
||||
borderColor: $(".box").css("background-color"),
|
||||
hoverBorderColor: $(".box").css("background-color"),
|
||||
hoverOffset: 10,
|
||||
},
|
||||
},
|
||||
plugins: {
|
||||
@@ -960,6 +967,9 @@ $(() => {
|
||||
animation: {
|
||||
duration: 750,
|
||||
},
|
||||
layout: {
|
||||
padding: 10,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user