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

::: KNOW HOW ::: Create you own charts with FomCalc

radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
Answered

Hello community,
 
some people here were asking for a way of creating charts within a PDF, me too.
The WWW gives many different answers and causes also many questions.
 
There are many different ways to embed charts in a PDF, like Flex, Flash or PNG-images from the Google Chart API for example.
But for many of us, this ways are unknown terrains and very hard to understand or simply impracticable because these methods always need external ressources or other applications.
 
An other and easy way to build charts is FormCalc.
All you need is a LiveCycle Designer to create a XML-form with a few lines of code.
I designed some examples for you!
 
It contains until now 8 different chart types.
 
1. Horizontal Bar Chart

 
2. Horizontal Stacked Bar Chart


 
3. Vertical Bar Chart --> CHECK OUT NEW VERSION HERE

 
4. Vertical Stacked Bar Chart (UPDATE: The values are now displayed within the chart.)

 
5. Bubble Chart / Scatter Plot --> CHECK OUT NEW VERSION HERE

 
6. Waterfall Chart (NEW)

 
7. Line Chart (NEW)

 
8. Pie Chart (NEW) DETAILS SEE HERE

 
Works with Adobe Reader and Acrobat.
 
You can download the example form here. Editing can be done with the LiveCylce Designer.
 
Example PDF (except pie chart)
 
Example XML data (except pie chart)
 
Your feedback is welcome!

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs

lkassuba
ExpertTeam
Registered: Jun 28 2007
Posts: 3636
Thanks radzmar for posting this. Can you email me (link on left) I wanted to ask you a specific question?

Lori

Lori Kassuba is an AUC Expert and Community Manager for AcrobatUsers.com.

vikash
Registered: Feb 16 2010
Posts: 1
Hi,

Great work and really helpfull.

Could you please provide some information that how to develop PIE Chart using FormCal?

Do you have any sample or something?

Thanks,
Vikash
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
The article has a link to a sample form.
It shows datailed, how to create charts with rectangles, lines and circles.

Update:
But, because of the limited drawing functions for circles in Designer (ES and ES2), it's not that easy to create a pie chart.

I posted a sample on my blog, that creates a pie chart.
Follow this link: [url=http://thelivecycle.blogspot.com/2010/04/formcalc-charts-pie-chart.php]FormCalc Charts - Pie Chart[/url]

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs

jgomez
Registered: Nov 16 2010
Posts: 1
I really like the horizontal bar chart. I want to show the graph width in inches and I’m use decimals for the values.

So for Value1 it would be 2.6 and I want the graphs to only go 2.6”(inches) long.

thanks!

Julio
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
Hi,

to display the bars in inches, use the following syntax:

  1. var bValue = Form1.Page1.Barchart.Value1.rawValue
  2. Form1.Page1.Barchart.Bar1.w = UnitValue(bValue, "in")

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs

RichLorn
Registered: May 19 2008
Posts: 46
The things that you and some of the others come up with are really amazing. Great job.