If you use a client-side library, your data is pretty much out in the open. If the data is secret, I think what you need is a library that generates the plot on the server side and outputs images. JFreechart is one library that does this in Java. I am sure there are others.