Tweak: remove extra glances chart padding in 0.10.x
This commit is contained in:
parent
2d91b2b748
commit
29ce68204b
@ -8,7 +8,7 @@ class Chart extends PureComponent {
|
||||
const { dataPoints, formatter, label } = this.props;
|
||||
|
||||
return (
|
||||
<div className="absolute -top-1 -left-1 h-[120px] w-[calc(100%+0.5em)] z-0">
|
||||
<div className="absolute -top-2 -left-2 h-[calc(100%+1em)] w-[calc(100%+1em)] z-0">
|
||||
<div className="overflow-clip z-10 w-full h-full">
|
||||
<ResponsiveContainer width="100%" height="100%">
|
||||
<AreaChart data={dataPoints}>
|
||||
|
||||
@ -8,7 +8,7 @@ class ChartDual extends PureComponent {
|
||||
const { dataPoints, formatter, stack, label, stackOffset } = this.props;
|
||||
|
||||
return (
|
||||
<div className="absolute -top-1 -left-1 h-[120px] w-[calc(100%+0.5em)] z-0">
|
||||
<div className="absolute -top-2 -left-2 h-[calc(100%+1em)] w-[calc(100%+1em)] z-0">
|
||||
<div className="overflow-clip z-10 w-full h-full">
|
||||
<ResponsiveContainer width="100%" height="100%">
|
||||
<AreaChart data={dataPoints} stackOffset={stackOffset ?? "none"}>
|
||||
|
||||
@ -43,7 +43,7 @@ export default function Component({ service }) {
|
||||
return (
|
||||
<Container chart={chart}>
|
||||
{chart && (
|
||||
<div className="absolute top-0 left-0 right-0 bottom-0">
|
||||
<div className="absolute -top-2 -left-2 -right-2 -bottom-2">
|
||||
<div
|
||||
style={{
|
||||
height: `${Math.max(20, fsData.size / fsData.free)}%`,
|
||||
|
||||
@ -107,7 +107,11 @@ export default function Component({ service }) {
|
||||
}
|
||||
|
||||
return (
|
||||
<Container chart={chart} className="bg-gradient-to-br from-theme-500/30 via-theme-600/20 to-theme-700/10">
|
||||
<Container chart={chart}>
|
||||
{chart && (
|
||||
<div className="bg-gradient-to-br from-theme-500/30 via-theme-600/20 to-theme-700/10 absolute -top-2 -left-2 -right-2 -bottom-2 h-[calc(100%+1em)] w-[calc(100%+1em)]" />
|
||||
)}
|
||||
|
||||
<Block position="top-3 right-3">
|
||||
{quicklookData && quicklookData.cpu_name && chart && (
|
||||
<div className="text-[0.6rem] opacity-50">{quicklookData.cpu_name}</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user