3

Is CiviVisualize and the CRM API designed so that when someone wants to create their own visualizations, they only have to create a template in templates/dataviz/? Then, using the CRM API they can call a SQL Search Query in the template.tql file to customize which data they want to represent. Or, is there more files that must be created?

2

for creating a new visualisation, you only need to add a template into template/dataviz indeed.

You will need to fetch some data to display it. They are two ways for that, either you are lucky and what you need can be taken with an existing API, and you simply have to

var data={crmAPI entity="Something" param1="42"}

but more often than not, you will want to aggregate data or do more sql massaging, in that case, you will need to create an extra queries/lizzy.sql

and then you can use it as

var data={crmSQL query=lizzy}

and voila ;)

0

CiviVisualize is an extension that uses the API, the API exists independently of CiviVisualize and will not be set up to work with CiviVisualize. CiviVisualize on the other hand will probably be set up in such a way that it respects what the API does. Your question:

they only have to create a template in templates/dataviz/

really only depends on what is in CiviVisualize. Documentation on CiviVisualize can be found here: https://github.com/TechToThePeople/civisualize. If your question is not clearly answered in the documentation I would probably raise an issue on the GitHub repository so the developers of the extension are aware and can answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.