99 lines
2.1 KiB
CSS
99 lines
2.1 KiB
CSS
/**
|
|
** Filters graph & selection
|
|
**/
|
|
|
|
/* Thematiques */
|
|
|
|
.filters-cats-label {
|
|
font-weight: 500;
|
|
margin-bottom: 0;
|
|
font-size: .8em;
|
|
}
|
|
|
|
.filters-categories select {
|
|
font-size: .6em;
|
|
margin-bottom: 1.5em;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* Pie chart */
|
|
|
|
.pie {
|
|
border-radius: 100%;
|
|
height: calc(var(--size, 250) * 1px);
|
|
overflow: hidden;
|
|
position: relative;
|
|
width: calc(var(--size, 250) * 1px);
|
|
}
|
|
.pie__segment {
|
|
--a: calc(var(--over50, 0) * -100%);
|
|
--b: calc((1 + var(--over50, 0)) * 100%);
|
|
--degrees: calc((var(--offset, 0) / 100) * 360);
|
|
-webkit-clip-path: polygon(var(--a) var(--a), var(--b) var(--a), var(--b) var(--b), var(--a) var(--b));
|
|
clip-path: polygon(var(--a) var(--a), var(--b) var(--a), var(--b) var(--b), var(--a) var(--b));
|
|
height: 100%;
|
|
position: absolute;
|
|
transform: translate(0, -50%) rotate(90deg) rotate(calc(var(--degrees) * 1deg));
|
|
transform-origin: 50% 100%;
|
|
width: 100%;
|
|
z-index: calc(1 + var(--over50));
|
|
}
|
|
.pie__segment:after,
|
|
.pie__segment:before {
|
|
background: var(--bg, #e74c3c);
|
|
content: '';
|
|
height: 100%;
|
|
position: absolute;
|
|
width: 100%;
|
|
}
|
|
.pie__segment:before {
|
|
--degrees: calc((var(--value, 45) / 100) * 360);
|
|
transform: translate(0, 100%) rotate(calc(var(--degrees) * 1deg));
|
|
transform-origin: 50% 0%;
|
|
}
|
|
.pie__segment:after {
|
|
opacity: var(--over50, 0);
|
|
}
|
|
|
|
/* au cas où on en revienne aux labels dans les slices :*/
|
|
|
|
.pie__segment .label {
|
|
position: absolute;
|
|
bottom: -30px;
|
|
color: #fff;
|
|
z-index: 99;
|
|
transform: translate(0, -50%) rotate(-90deg) rotate(calc(var(--degrees) * -1deg));
|
|
left: 8px;
|
|
text-align: center;
|
|
font-size: .8em;
|
|
font-weight: 900;
|
|
}
|
|
|
|
@media only screen and (max-width: 699px ) {
|
|
.pie__segment .label {
|
|
bottom: -22px;
|
|
}
|
|
}
|
|
/*** Legends ***/
|
|
|
|
.home-legend-items {
|
|
margin-top: 1em;
|
|
}
|
|
|
|
.home-legend-item {
|
|
position: relative;
|
|
padding-left: 30px;
|
|
}
|
|
|
|
.home-legend-item .legend-color {
|
|
position: absolute;
|
|
left: 0;
|
|
top: 0;
|
|
bottom: 0;
|
|
margin: auto;
|
|
width: 20px;
|
|
height: 20px;
|
|
} |