in a chart the line can hide with a button. Unfortunately, legend will hide, but blue legend with Sum(cost) should be visible.
HI, Try some thing like below
Write one dummy expression and check the box "INVISIBLE "
Then it will show legend.
Please see the attached.
See the expression in background colour (For Sales expression)
Retrieving data ...