1

I'd like to make a custom visualization with Civisualize but the visualization requires the user to first provide some input through several form elements. None of the visualizations that I see within Civisualize allow for any user input. Is this possible with Civisualize?

2
  • The data for visualization you are looking for from the user, is it to filter data, or you want the data to be fetched from the server according to this data? – Siddharth Gupta Feb 22 '17 at 7:34
  • "Data to be fetched from the server according to inputs" – Sean Feb 22 '17 at 15:18
1

So the general dc.js way is that you fetch all the data needed, and do the filtering client side.

The usual way of doing the filtering is by clicking on the graphs, but you can as well have buttons on input filters, eg http://www.integritywatch.eu/

This being said, you could as well ajax fetch the data as csv or json, update the crossfilter and redraw the graphs. It might be easier to discuss about a specific example of what you want to do to work the pros and cons of each approach

X+

0

I had some need to be able to do that: on the first step, you have a list of campaign, and on the second one, you have the visualisation for the specific campaign. The trick is to see them as two different dataviz (list of campaign, detail of a specific campaign) with two diffent .tpl

For the second one, you can put in the url the user input (eg the campaign id), so for instance if your url is example.org/civicrm/dataviz/campaign/42 civisualize automatically assign {id} and you can read it from Campaign.tpl

So to finish the campaign example, you would have two urls example.org/civicrm/dataviz/campaign that uses Campaign.tpl and contains:

{crmTitle string="All campaigns"}
{if isset($id)}
Display the details of a campaign
  {include file='dataviz/_campaign_detail.tpl'}
{else}
  {include file='dataviz/_campaign_selector.tpl'}
Display the list of campaigns with urls to /dataviz/campaign/campaign_id
 {/if}

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.