displaying charts in browser while keeping data safe

后端 未结 2 1931
小蘑菇
小蘑菇 2021-01-28 00:40

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 an

相关标签:
2条回答
  • 2021-01-28 00:56

    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.

    0 讨论(0)
  • 2021-01-28 01:05

    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.

    0 讨论(0)
提交回复
热议问题