In the past I already developed several kinds of charts with FormCalc that could be used in a XFA-form.
Only a pie chart was missing, because of the very limited capabilities of manipulation of cicles in LiveCycle Designer.
Now I fould a way to do this.
It's very experimental but it works so far.

For the data input I use a table and for the pie several hundred bows.
This bows simulate a multicolored cicle.
The calculation is done by a hidden field "trigger" that uses a for-loop to calculate the positions, legths and colors of every bow.

Depending on the number of values in the table, the script has to calculate thousands of bows so it becomes slower.

Update: Version 2 offers more flexibility.
On the one hand you only need to define one instance of the bow in Designer because the script will determine and add all the rest.
On the other hand you can define the size of the chart, the hole in the middle, the line thickness of the bows and the gaps between them and even the angle by yourself.

Thinner the bows and and gaps will make the chart looking even better.
But, depending on the number of bows the overhead of calculations can be come extremly high.
So be careful.

Based on the example for the Base64 Encryption I developed another example, that uses the Rivest Cipher No. 4 algorithm (RC4).

To work proper in XFA-forms the algorithm needs some final touch.
Otherwise it will produces errors like cuf off text and misinterpreted characters when encrypting oder decrypting the text strings.
Therefore I added the escape() repectively unescape() functions to the algorithm for the enryption and decryption.

For a high ciphering level the form generates a hash-key from the users password which then will be combined with another hash-key (the so-called Salting). From this salted hash-key there will be generated a final hash-key which is used for the en- and decryption.

One of LiveCycle Designers flaws is, that it can't generate chart from the form data such as Excel does.
But with some FormCalc experiences this can be solved.
This example is a new version of a script I posted about a year ago in the Acrobatusers.com community.

It contains a table for the inputs (label, value and color) and a subform with a hidden field that calculates the chart quasi in realtime.

Have you ever seen a PDF form where you could encrypt the contents?
I didn't, but why?
It will be so handy to encrypt the content instead of the whole file.
Because there are so many cracking tools around, that will break the password shell within seconds.

So why don't leave file open and make the contents unreadable?

The example form uses a script to encrypt the data as base64 string, protected by a password query that uses hashes and compares them.