I have recently been exploring the different options for displaying charts in a browser.
I have tried using the d3js
library, google charts, java applets and actionscript(Flash).
My research shows that people are moving away from flash and java. This makes d3js
an attractive option. Though I see the value in using d3js
I have an issue:
Simply right click and 'view source' and one can see the raw data going in to the chart.
This is why I considered flash and java since the source can not be seen.
On the other hand I am hearing people say that flash has security exploits.
Am I missing something?
So my question is:
How do I use d3.js
while keeping my data safe?
I am relatively new to data visualization and I will appreciate any responses.
Thank You.
You could look for a method of encoding the data so it is not plain text. However, an experienced JavaScript programmer can decode the data without issue. The same goes for flash and java also. Anything on the front end exposes your data. There are backend libraries for displaying charts I know for a fact php has lots of them, Other languages should have them too. A backend solution would make it so the only way to get your data is to pull it from the image either manually or with line detection.
The simple answer is that you can't. The code is run directly by the browser, so the user can see it, and the same for the data.
The slightly more complicated answer is that you could try to encrypt/obfuscate your data, but even then the user will be able to get to it with some effort, as the same comment I've made above still applies.
In short, if you don't want the user to see it, don't send it to the browser. You could, for example, generate visualisations as images on the server and have the browser download only the image.