Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Interactive graph in Adobe LiveCycle Forms

Avatar

Former Community Member
Can we have a form that can change dynamic ally a graph base on user input.



example: drawing a line using 2 points coordinate.



Regards

Jean-Marc Flamand

Mass property engineer specialist

Bombardier Aerospace
6 Replies

Avatar

Former Community Member
le_beluet@adobeforums.com wrote:

> Can we have a form that can change dynamic ally a graph base on user input.

>

> example: drawing a line using 2 points coordinate.

>

> Regards

> Jean-Marc Flamand

> Mass property engineer specialist

> Bombardier Aerospace



You should be able to change the size of a line fairly easily. You

can't really "draw" on the form...it doesn't allow you to add new lines

to the form with javascript...you can only manipulate properties of

objects that already exist on the form. So in your case, you would have

to put all the lines you think you might possibly need on your form (and

perhaps make them hidden to start) and then change the coordinates and

lengths of those lines as needed.



I have an example of a bar chart. You can access it at the following URL:

http://geocities.com/cinci_buckeye/examples/barchart.pdf



Justin Klei

Cardinal Solutions Group

www.cardinalsolutions.com

Avatar

Former Community Member
Tanks for the tips but that was not exactly what I expect. I recognized that I was not enough clear.



Ok

here my new question



I have an equation y = mx+b. I would like to generate a graph showing that line and the x and Y axis with marks and label.



is there a control like "excel chart activex"(xy scatter, pie,bar...) that can be used in the PDF form.

Avatar

Former Community Member
le_beluet@adobeforums.com wrote:

> Tanks for the tips but that was not exactly what I expect. I recognized that I was not enough clear.

>

> Ok

> here my new question

>

> I have an equation y = mx+b. I would like to generate a graph showing that line and the x and Y axis with marks and label.

>

> is there a control like "excel chart activex"(xy scatter, pie,bar...) that can be used in the PDF form.



No, I did understand your question. I was just showing you an example

of how you might do a bar chart by changing line lengths. I also

mentioned in my previous post that you can't really "draw" things with

javascript in a PDF form...you can only manipulate properties. So, if

you wanted to do a graph, you would have to do the following:



- Create the x and y axes using the line object in designer

- Create your labels for your axes using text objects

- Create a line to represent your equation. Make it hidden and place

it anywhere you want to start.

- When the values for the equation are entered, you can then make the

line visible and set the x, y, w, and h properties of that line object

to get the correct slope and orientation.



The last step above could take a lot of trial and error until you get it

right. Designer forms are not really ideal for doing this type of

thing. There is no graphics package or control for doing charts.



Justin

Avatar

Former Community Member
Justin,



I know this topic is quite old but where do you set the x, y, w & h properties for the bar graph? I've used your example but I can't seem to find where I adjust those properties so I can make the bars go the height I want them to (your example is set at 2 inches I believe).



Thanks,



Keola

Avatar

Level 3
I'm not sure exactly how to do this, but it's a suggestion anyhow. You could use an image field on your form, and have a SOAP Web Service draw your graph and save it on your server. Then when you update the data, you can make a call to the SOAP and just change the image field to be your new image.

Avatar

Former Community Member
Robert,



Thank you for that great suggestion... I have figured out how to get the first example working about 2 weeks ago (sorry for no reply) but I have also tried your example as well and it works too. :)



Thanks,



Keola