cloud-ui.vusion
Version:
Vusion Cloud UI
227 lines (196 loc) • 4.19 kB
CSS
$axis-y_width: 40px;
$axis-x_height: 30px;
$axis_border: #ccc;
$axis-y_offset: 10px;
$axis-x_offset: 6px;
$line_border: #eee;
$line_width: 2px;
$line_offset: 6px;
$bar_width: 60px;
.root {
}
.grid {
position: absolute;
bottom: $axis-x_height;
top: 15px;
left: 100px;
right: 20px;
font-size: 0;
}
.layer {
position: absolute;
bottom: $axis-x_height;
top: 15px;
left: 100px;
right: 20px;
font-size: 0;
z-index: 10;
}
.line {
position: absolute;
}
.line[role='line-x'] {
left: 0;
right: -1px;
border-top: 1px solid $line_border;
}
.line[role='line-y'] {
top: -1px;
bottom: -$line_offset;
border-left: 1px solid $line_border;
}
.axis {
position: absolute;
z-index: 2;
}
.axis[role='axis-x'] {
left: 100px;
right: 19px;
bottom: 0;
height: $axis-x_height;
border-top: 1px solid $axis_border;
}
.axis[role='axis-y'] {
left: 0;
top: 14px;
bottom: $axis-x_height;
width: 100px;
border-right: 1px solid $axis_border;
}
.xlabel {
position: relative;
left: -50%;
text-align: center;
}
.ylabel {
display: block;
position: relative;
top: 50%;
transform: translateY(-50%);
}
.label {
position: absolute;
font-size: 12px;
}
.label[role='label-x'] {
top: $axis-x_offset;
bottom: 0;
text-align: left;
width: 40px;
}
.label[role='label-y'] {
left: 0;
right: $axis-y_offset;
text-align: right;
}
.label[role='label-xName'] {
right: -50px;
top: 6px;
bottom: 0;
}
.label[role='label-yName'] {
right: 10px;
top: -30px;
text-align: right;
}
.piece {
position: absolute;
top: 0;
bottom: 0;
}
.bar {
position: absolute;
box-sizing: border-box;
bottom: 0;
width: $bar_width;
left: 0;
margin-left: 0;
background: rgba(91,161,242,0.3);
border: $line_width solid rgba(91,161,242,0.6);
border-left: none;
top: 50%;
transform: translateY(-50%);
}
.tooltip {
display: none;
position: absolute;
z-index: 10;
left: 100%;
top: 0;
margin-left: 5px;
white-space: nowrap;
box-sizing: border-box;
max-width: 200px;
padding: 4px 8px;
font-size: 12px;
background: #333;
color: #eee;
}
.tooltip::after {
content: '';
display: block;
position: absolute;
border: 5px solid #333;
}
.tooltip[role='tooltip-right-top'] {
margin-left: 5px;
}
.tooltip[role='tooltip-right-top']::after {
top: 10px;
left: -5px;
border-left: none;
border-top-color: transparent;
border-bottom-color: transparent;
}
.bar:hover .tooltip {
display: block;
}
.bar[role='bar-stack'] {
border: none;
background: none;
}
.bar[role='bar-static'] {
position: absolute;
margin: 0;
display: inline-block;
}
.bar[role='bar-static']:nth-of-type(1) {
border-color: $theme-dark-chart-color1;
background: $theme-dark-chart-rgba-color1;
}
.bar[role='bar-static']:nth-of-type(2) {
border-color: $theme-dark-chart-color2;
background: $theme-dark-chart-rgba-color2;
}
.bar[role='bar-static']:nth-of-type(3) {
border-color: $theme-dark-chart-color3;
background: $theme-dark-chart-rgba-color3;
}
.bar[role='bar-static']:nth-of-type(4) {
border-color: $theme-dark-chart-color4;
background: $theme-dark-chart-rgba-color4;
}
.bar[role='bar-static']:nth-of-type(5) {
border-color: $theme-dark-chart-color5;
background: $theme-dark-chart-rgba-color5;
}
.bar[role='bar-static']:nth-of-type(6) {
border-color: $theme-dark-chart-color6;
background: $theme-dark-chart-rgba-color6;
}
.bar[role='bar-static']:nth-of-type(7) {
border-color: $theme-dark-chart-color7;
background: $theme-dark-chart-rgba-color7;
}
.bar[role='bar-static']:nth-of-type(8) {
border-color: $theme-dark-chart-color8;
background: $theme-dark-chart-rgba-color8;
}
.bar[role='bar-static']:nth-of-type(9) {
border-color: $theme-dark-chart-color9;
background: $theme-dark-chart-rgba-color9;
}
.bar[role='bar-static']:nth-of-type(10) {
border-color: $theme-dark-chart-color10;
background: $theme-dark-chart-rgba-color10;
}