Hi community, I have several visualizations running on postgresql and the chartfactor data app is looking great. However, I need to add logic so that some users only see a portion of the data. I could accomplish this through table views but I was wondering if you could provide me with another option using chartfactor?
Hi @free.dev, as I understand what you are needing is to manipulate the data before it is shown to the users, that is to add filters depending on the role of the user or something similar. Chartfactor provides a solution for these cases, which is a downloadable project called ChartFactor Node that you can clone from Aktiun’s GitHub repository.
As it says in the project’s description by running data providers on the server-side you can apply custom logic such as filters before executing the actual queries on the data engine.
Inside the ./etc folder you will find two files,
staticFilters.json, where you can add the necessary restrictions and filters before returning the data, but you can also add some custom logic into the endpoints if necessary.
Hope this can help you.