I'm playing with amCharts (within Wordpress) for a small project of mine. In order to use external data, amCharts requires a php script that exports data in JSON format which is called by JS within amCharts. However, that means you can see on the client side the exact php file I'm calling, which any user could copy and paste to get the raw JSON data. Is there a better way to limit the data availability?
The code is very simplistic.
Within the Wordpress amCharts plugin, I'm using the following to call a php file to retrieve JSON data:
// Set up data source
chart.dataSource.url = "http://localhost/data/my_chart_data.php";
But any person can copy that line, plunk it in a web browser, then copy/paste the raw data.
Would it be easier to go to a server-side charting solution if data visibility is a concern? (At this point, the switch would be easy as my project is just starting.) If so, which solutions would you suggest?