mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: progress chart to show ideal line only when data is present (#1384)
This commit is contained in:
parent
ccbe773ce1
commit
ddaa8df1c5
@ -93,16 +93,19 @@ const ProgressChart: React.FC<Props> = ({ distribution, startDate, endDate, tota
|
||||
id: "ideal",
|
||||
color: "#a9bbd0",
|
||||
fill: "transparent",
|
||||
data: [
|
||||
{
|
||||
x: chartData[0].currentDate,
|
||||
y: totalIssues,
|
||||
},
|
||||
{
|
||||
x: chartData[chartData.length - 1].currentDate,
|
||||
y: 0,
|
||||
},
|
||||
],
|
||||
data:
|
||||
chartData.length > 0
|
||||
? [
|
||||
{
|
||||
x: chartData[0].currentDate,
|
||||
y: totalIssues,
|
||||
},
|
||||
{
|
||||
x: chartData[chartData.length - 1].currentDate,
|
||||
y: 0,
|
||||
},
|
||||
]
|
||||
: [],
|
||||
},
|
||||
]}
|
||||
layers={["grid", "markers", "areas", DashedLine, "slices", "points", "axes", "legends"]}
|
||||
|
Loading…
Reference in New Issue
Block a user