mirror of
https://github.com/gethomepage/homepage.git
synced 2026-01-11 11:32:09 +08:00
Tweak: again trying to restore chart sizing in 0.10.x (#4479)
This commit is contained in:
@@ -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-10 -left-2 h-[calc(100%+3em)] 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-10 -left-2 h-[calc(100%+3em)] 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"}>
|
||||
|
||||
@@ -18,9 +18,9 @@ export default function Container({ children, widget, error = null, chart = true
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={classNames("service-container", chart ? "chart relative h-[120px]" : "")}>
|
||||
<div className={classNames("service-container", chart ? "chart relative h-[68px]" : "")}>
|
||||
{children}
|
||||
<div className={`absolute top-0 right-0 bottom-0 left-0 overflow-clip pointer-events-none ${className}`} />
|
||||
<div className={`absolute -top-10 right-0 bottom-0 left-0 overflow-clip pointer-events-none ${className}`} />
|
||||
{chart && <div className="h-[68px] overflow-clip" />}
|
||||
{!chart && <div className="h-[16px] overflow-clip" />}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user