Generazione grafici

5 contenuti / 0 new
Ultimo contenuto
Generazione grafici

Ho una views di campi in formato tabella, i campi sono date e termini di tassonomia.

Devo realizzare dei grafici statistici, possibilmente belli esteticamente, con diverse forme (torta, ragnatela, ecc....)

Ad esempio vorrei realizzare un grafico a torta che mi rappresenti quante volte sono usati dei termini di tassonomia nell'arco di 1 anno.

Drupal Version:

Ciao, per realizzare i grafici usa delle librerie grafiche come charts.js così che il lavoro passi dal server al client. Hai controllato su drupal.org per views charts?

M.

--
Michel 'ZioBudda' Morelli -- [email protected]
Sviluppo applicazioni CMS DRUPAL e web dinamiche -- Corsi Drupal -- Amministrazione Drupal -- Hosting Drupal

Ho cercato in drupal.org, ma non ho trovato nulla che non fosse una beta.... anche views charts è solamente una release 1.x dev. Dici che rischio ad integrare un modulo dev nel sito?

Sto provando views charts.... ma proprio non ci vengo fuori.

Ho tentato di seguire il semplice tutorial del modulo advance help tanto per capirne il funzionamento:

Quote:

Views Charts implements a new View style: charts. With it the use can present view data as charts.

Dependencies
Views Charts depends on Charts and Graphs and Views.

The Views GroupBy module provides important functionality that greatly enhances Views Charts usage. Please consider installing it with Views Charts.

Usage
This usage instructions were shamelessly stolen from Views GroupBy project page:

Create a new View
Add following fields:
Taxonomy: Term Term
Taxonomy: Vocabulary Name
Node: Nid Nid (and rename its label to Nid Count)
SQL Aggregation: Group By Fields Group By Fields (must be last field!)
Click on the "SQL Aggregation: Group By Fields" and configure its settings as follows:
Fields to Group On = 'Taxonomy: Term' and 'Taxonomy: Vocabulary Name' (both fields)
SQL Aggregation Function = Count
Fields to Aggregate with the SQL function = Node: Nid
Field to Sort Resultset On (after SQL Function is applied) = Node: Nid
Sorting Direction: Descending
Add a filtering criteria for the node type if you need to.
Add a page display to the view. Set the page path to views_charts_example_view
Test this view. You should get aggregated data per taxonomy term.

Lastly you only have to set the charting options:

In Basic settings change the Style to Charts and click the Update button
In the settings page choose:
For Fields to be used in Chart Series choose Node: Nid (Nid Count)
For Fields to be used as X axis labels choose Taxonomy: Term (Term)
That's it. Save the view. Views with Charts style can't be previewed. Open to see the chart.

Customizing charts
The presented charts can be customized through the hook_views_charts_graph_alter() hook.

hook_views_charts_graph_alter(&$canvas);
The hook_views_charts_graph_alter() hook is called just before actual chart draw. You can freely change $canvas to customize any chart property. To understand how to customize $canvas please see the Charts and Graphs module documentation.

...ma quel SQL Aggregation: Group By Fields Group By Fields (must be last field!) non capisco come impostarlo.
Uso Drupal 7 e views3

Rieccomi.... sono ritornato sul tema "grafici".

Googlando mi sembra che il modulo più utilizzato sia google charts tools che ingloba anche il modulo "Analytics Dashboard".

Da quello che ho capito Analytics Dashboard pubblica un filtro dinamico per la generazione del grafico, ma non riesco ad attivarlo, io vorrei realizzare una cosa simile a questo video:

http://www.youtube.com/watch?v=5cZfAZn3WCA