summaryrefslogtreecommitdiffstats
path: root/src/pybind/mgr/dashboard/frontend/src/styles/_chart-tooltip.scss
blob: 29e1f1cc6a890c872f85092fbe1323b18da96b88 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
@use './src/styles/vendor/variables' as vv;

.chart-container {
  cursor: pointer;
  margin: auto;
  overflow: visible;
  position: absolute;
}

canvas {
  user-select: none;
}

.chartjs-tooltip {
  background: rgba(vv.$black, 0.7);
  border-radius: 3px;
  color: vv.$white;
  font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif !important;
  opacity: 0;
  pointer-events: none;
  position: absolute;

  transform: translate(-50%, 0);
  transition: all 0.1s ease;

  &.transform-left {
    transform: translate(-10%, 0);

    &::after {
      left: 10%;
    }
  }

  &.transform-right {
    transform: translate(-90%, 0);

    &::after {
      left: 90%;
    }
  }
}

.chartjs-tooltip::after {
  border-color: vv.$black transparent transparent transparent;
  border-style: solid;
  border-width: 5px;
  content: ' ';
  left: 50%;
  margin-left: -5px;
  position: absolute;
  top: 100%; /* At the bottom of the tooltip */
}

::ng-deep .chartjs-tooltip-key {
  display: inline-block;
  height: 10px;
  margin-right: 10px;
  width: 10px;
}