Thanks for using mapd and checkout out some of our examples. While your use case is certainly possible, it will require some non-trivial changes to the charting library.
The gist of how the raster (backend rendered) charts work is that they generate a JSON object that is then sent to the backend via the mapd-connector’s
renderVega method. It is at this line where the actual call is made.
As I see it you have two options:
Stub out mapd-connector library replacing the methods which issue sql to the backend with methods that issue requests to your node proxy server. These methods would most likely be
Replace the line in the raster-chart file that makes the
.con().renderVega call with a call to your backend. This should be the simplest approach, however I’m not sure if that is the only call required to get the raster charts to render, there may be additional
query calls required earlier on in the setup process. Additionally crossfilter is instantiated with an instance of mapd-connector so you may also have to make some changes there.
Once you’ve done this you would use the node version of the mapd-connector library to issue requests to the mapd backend via your node proxy.
While all this is possible, and seemingly straight forward, I cannot guarantee that it will be as simple as it appears.
Best of luck and let us know how it goes!