feat: AreaChart, LineChart, BarChart SVG composites
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
143
src/design-system/composites/BarChart/BarChart.module.css
Normal file
143
src/design-system/composites/BarChart/BarChart.module.css
Normal file
@@ -0,0 +1,143 @@
|
||||
.wrapper {
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.svg {
|
||||
display: block;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.empty {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: var(--text-muted);
|
||||
font-size: 12px;
|
||||
height: 120px;
|
||||
}
|
||||
|
||||
.gridLine {
|
||||
stroke: var(--border-subtle);
|
||||
stroke-width: 1;
|
||||
stroke-dasharray: 3 3;
|
||||
}
|
||||
|
||||
.axisLabel {
|
||||
font-family: var(--font-mono);
|
||||
font-size: 9px;
|
||||
fill: var(--text-faint);
|
||||
}
|
||||
|
||||
.catLabel {
|
||||
font-family: var(--font-mono);
|
||||
font-size: 9px;
|
||||
fill: var(--text-faint);
|
||||
}
|
||||
|
||||
.bar {
|
||||
cursor: pointer;
|
||||
transition: opacity 0.1s;
|
||||
}
|
||||
|
||||
.bar:hover {
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.tooltip {
|
||||
position: absolute;
|
||||
background: var(--bg-surface);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius-sm);
|
||||
box-shadow: var(--shadow-md);
|
||||
padding: 6px 10px;
|
||||
font-size: 11px;
|
||||
pointer-events: none;
|
||||
z-index: 10;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.tooltipTitle {
|
||||
font-weight: 600;
|
||||
color: var(--text-primary);
|
||||
margin-bottom: 4px;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.tooltipRow {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
.tooltipRow:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.tooltipDot {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
border-radius: 50%;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.tooltipLabel {
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.tooltipValue {
|
||||
font-family: var(--font-mono);
|
||||
font-weight: 600;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.legend {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 12px;
|
||||
padding-left: 48px;
|
||||
}
|
||||
|
||||
.legendItem {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
font-size: 11px;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.legendDot {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.legendLabel {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.yLabel {
|
||||
font-size: 10px;
|
||||
color: var(--text-muted);
|
||||
writing-mode: vertical-lr;
|
||||
transform: rotate(180deg);
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
left: 4px;
|
||||
top: 0;
|
||||
bottom: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.xLabel {
|
||||
text-align: center;
|
||||
font-size: 10px;
|
||||
color: var(--text-muted);
|
||||
padding-left: 48px;
|
||||
}
|
||||
Reference in New Issue
Block a user