How to perform server side manipulation using Plotly.js is a place to start. Some of the comments might be outdated though.