The application is a simple fitness tracker online for smartphones. It is necessary to display statistics - to build beautiful graphics in the browser on the user's page.
The first option is to build a graph on the server and then send the finished picture. The second option is to send values ​​and build a graph on the client’s side.
The second option is like for the following reasons:
the amount of data to send is quite small and they will go faster than a beautiful picture
although the build function does not require a lot of resources - I would like to see it on the client side, at least a little, but unload the server
a variety of libraries with a bunch of settings for js more than php
Of course there is a security issue - the transfer of customer data, but I doubt that someone will want to steal fitness data from a novice developer.
In general, I tend to work on JS, but I would like to know if there are any points that could incline PHP in my case.
From the found theory I know that the processing of images on the server occurs only when it is impossible to show the processing code (so that they do not steal it), or when the processing requires high power.