обновление бизнес логики
This commit is contained in:
@@ -17,7 +17,7 @@ interface AreaChartProps {
|
||||
const AreaChart: React.FC<AreaChartProps> = ({ className = '', data }) => {
|
||||
const width = 635
|
||||
const height = 280
|
||||
const margin = { top: 20, right: 30, bottom: 50, left: 60 }
|
||||
const margin = { top: 40, right: 30, bottom: 50, left: 60 }
|
||||
const plotWidth = width - margin.left - margin.right
|
||||
const plotHeight = height - margin.top - margin.bottom
|
||||
const baselineY = margin.top + plotHeight
|
||||
@@ -222,15 +222,15 @@ const AreaChart: React.FC<AreaChartProps> = ({ className = '', data }) => {
|
||||
/>
|
||||
))}
|
||||
|
||||
{/* Легенда */}
|
||||
<g transform={`translate(${width - margin.right - 120}, ${margin.top})`}>
|
||||
{/* Легенда - горизонтально над графиком */}
|
||||
<g transform={`translate(${margin.left + plotWidth / 2 - 120}, 10)`}>
|
||||
<circle cx="6" cy="6" r="4" fill="#ef4444" stroke="rgb(15, 23, 42)" strokeWidth="2" />
|
||||
<text x="18" y="10" fontSize="11" fill="rgb(148, 163, 184)" fontFamily="Arial, sans-serif">
|
||||
Критические
|
||||
</text>
|
||||
|
||||
<circle cx="6" cy="24" r="4" fill="#fb923c" stroke="rgb(15, 23, 42)" strokeWidth="2" />
|
||||
<text x="18" y="28" fontSize="11" fill="rgb(148, 163, 184)" fontFamily="Arial, sans-serif">
|
||||
<circle cx="126" cy="6" r="4" fill="#fb923c" stroke="rgb(15, 23, 42)" strokeWidth="2" />
|
||||
<text x="138" y="10" fontSize="11" fill="rgb(148, 163, 184)" fontFamily="Arial, sans-serif">
|
||||
Предупреждения
|
||||
</text>
|
||||
</g>
|
||||
|
||||
@@ -16,7 +16,7 @@ interface BarChartProps {
|
||||
const BarChart: React.FC<BarChartProps> = ({ className = '', data }) => {
|
||||
const width = 635
|
||||
const height = 280
|
||||
const margin = { top: 20, right: 30, bottom: 50, left: 60 }
|
||||
const margin = { top: 40, right: 30, bottom: 50, left: 60 }
|
||||
const plotWidth = width - margin.left - margin.right
|
||||
const plotHeight = height - margin.top - margin.bottom
|
||||
const baselineY = margin.top + plotHeight
|
||||
@@ -240,15 +240,15 @@ const BarChart: React.FC<BarChartProps> = ({ className = '', data }) => {
|
||||
)
|
||||
})}
|
||||
|
||||
{/* Легенда */}
|
||||
<g transform={`translate(${width - margin.right - 120}, ${margin.top})`}>
|
||||
{/* Легенда - горизонтально над графиком */}
|
||||
<g transform={`translate(${margin.left + plotWidth / 2 - 120}, 10)`}>
|
||||
<rect x="0" y="0" width="12" height="12" fill="#ef4444" rx="2" />
|
||||
<text x="18" y="10" fontSize="11" fill="rgb(148, 163, 184)" fontFamily="Arial, sans-serif">
|
||||
Критические
|
||||
</text>
|
||||
|
||||
<rect x="0" y="18" width="12" height="12" fill="#fb923c" rx="2" />
|
||||
<text x="18" y="28" fontSize="11" fill="rgb(148, 163, 184)" fontFamily="Arial, sans-serif">
|
||||
<rect x="120" y="0" width="12" height="12" fill="#fb923c" rx="2" />
|
||||
<text x="138" y="10" fontSize="11" fill="rgb(148, 163, 184)" fontFamily="Arial, sans-serif">
|
||||
Предупреждения
|
||||
</text>
|
||||
</g>
|
||||
|
||||
Reference in New Issue
Block a user