mirror of
https://github.com/pi-hole/web.git
synced 2026-04-18 07:56:24 +01: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: {
|
elements: {
|
||||||
arc: {
|
arc: {
|
||||||
borderColor: $(".box").css("background-color"),
|
borderColor: $(".box").css("background-color"),
|
||||||
|
hoverBorderColor: $(".box").css("background-color"),
|
||||||
|
hoverOffset: 10,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
plugins: {
|
plugins: {
|
||||||
@@ -914,6 +916,9 @@ $(() => {
|
|||||||
animation: {
|
animation: {
|
||||||
duration: 750,
|
duration: 750,
|
||||||
},
|
},
|
||||||
|
layout: {
|
||||||
|
padding: 10,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -936,6 +941,8 @@ $(() => {
|
|||||||
elements: {
|
elements: {
|
||||||
arc: {
|
arc: {
|
||||||
borderColor: $(".box").css("background-color"),
|
borderColor: $(".box").css("background-color"),
|
||||||
|
hoverBorderColor: $(".box").css("background-color"),
|
||||||
|
hoverOffset: 10,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
plugins: {
|
plugins: {
|
||||||
@@ -960,6 +967,9 @@ $(() => {
|
|||||||
animation: {
|
animation: {
|
||||||
duration: 750,
|
duration: 750,
|
||||||
},
|
},
|
||||||
|
layout: {
|
||||||
|
padding: 10,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user