Answers.Body: <p>for creating a new visualisation, you only need to add a template into template/dataviz indeed.</p>
  
  <p>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</p>
  
  <pre><code>var data={crmAPI entity="Something" param1="42"}
  </code></pre>
  
  <p>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</p>
  
  <p>and then you can use it as </p>
  
  <pre><code>var data={crmSQL query=lizzy}
  </code></pre>
  
  <p>and voila ;)</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-13T09:30:32.410Z
Answers.LastActivityDate: 2018-11-13T09:30:32.410Z
Answers.UserDisplayName: Xavier
Answers.Body: <p>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:</p>
  
  <pre><code>they only have to create a template in templates/dataviz/
  </code></pre>
  
  <p>really only depends on what is in CiviVisualize. Documentation on CiviVisualize can be found here: <a href="https://github.com/TechToThePeople/civisualize" rel="nofollow noreferrer">https://github.com/TechToThePeople/civisualize</a>. 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.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-12T08:26:41.207Z
Answers.LastActivityDate: 2018-11-12T08:26:41.207Z
Answers.UserDisplayName: ErikH - CiviCooP
Body: <p>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?</p>
  
Tags: <civisualize>
Title: Civisualize: Creating Your Own Visualization concept question
ThreadText: # Civisualize: Creating Your Own Visualization concept question
  
  (Asked by: username_0 on 2018-11-11)
  
  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?
  
  **Tags:** civisualize
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2018-11-13. Score: 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 ;)
  
  
  ---
  
  ### Answer by username_2 on 2018-11-12. Score: 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.
  
  
  ---
  
  