These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Using button fields as plot points in charts

rhunter100
Registered: Dec 7 2009
Posts: 9
Answered

Is it possible to create a matrix of button fields representing an X, Y chart area, each button field hidden. Then, when a specific condition is met (if (Q1 >= X && Q1 <= X), a specific button field is triggered to visible?

This would allow for a more colorful and interesting chart, using .jpg"s instead of text or a numbered value.

Rich

thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Yes, Form fields all have a Display property that can be set with JavaScript.
For example:

this.getField("MyButton").display = (Q1 >= X && Q1 <= X)?display.hidden:display.visible;Look it up in the Acrobat JavaScript Reference.

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script