Closed (fixed)
Project:
Quant
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
23 Nov 2010 at 20:36 UTC
Updated:
26 Mar 2012 at 01:30 UTC
Looking at the module, it seems all the quants are only visible on the /analytics page...
Is there a way you could allow the embedding of a chart within a certain page or block, by calling something like quant_embed_quant(), similar to how views_embed_view() works? This would be really powerful for my own data analytics and reporting...
Comments
Comment #1
mstef commentedYep - that's the beauty of this module. I've been trying to think of better ways to handle it. Maybe provide a block for each module, but that doesn't offer a time selector. Maybe that should be in the block too..
What do you think? Any ideas..
For now, you can add the following in a custom block, and remember it's very flexible. Check out quants.quant.inc for examples..
Comment #2
gateway69 commentedI moved my support request to another ticket http://drupal.org/node/1027242
Comment #3
mstef commentedThe example in #1 shows how to do this in D6. You could also load the quant uses quant_get_quants(), then print it.
In D7, quants are now Quant-class objects. You can do $quant->execute($period), then print $quant->render(). Quants can either be defined on the spot, or loaded with quant_get_quant(). See more info in quant.api.php and quant.module.