Skip to main content
Participant
February 8, 2024
Question

On/Off buttons for line in a chart - interactive PDF

  • February 8, 2024
  • 2 replies
  • 369 views

I have a line chart with various coloured lines. I am trying to make the chart interactive so you can toggle on/off the vaious coloured lines. In my head this should be really simple but I am struggling.

 

I can make a button turn a line off, but not back on. I could create two sepeare buttons for every line for both on and off but that feels overkill.

 

I thought the radio button may work but in a similar way I can make it do one action, but not the second. So I can click to hide the line but not turn it back on.

 

This needs to remain as a PDF so would appreciate any help people can offer.

 

 

This topic has been closed for replies.

2 replies

Robert at ID-Tasker
Legend
February 9, 2024

You would have to inject custom JavaScript - but as @BobLevine pointed out - it might not work in other readers.

 

Participant
February 9, 2024

I just created a test where there were two separte buttons for on and off and they turned them selves off whilst turning the other on. All worked as expected and did the job in Acrobat but tested on my phone and didnt work so I think I just need cancel this idea.

Thank you. 

BobLevine
Community Expert
Community Expert
February 9, 2024

It is an exercise in futility. You are making the correct decision.

BobLevine
Community Expert
Community Expert
February 8, 2024

If it has to be a PDF my advice is to forget it. You could try it with show/hide fields but it probably won't work outside of Acrobat.

Participant
February 9, 2024

That was my concern unfortunately. Oh well.

Thank you