Ciao a tutti :)
ho appena installato il modulo Chart che contiene le API di Google per creare grafici.
Andando sulle API di google ho trovato un esempio di grafico che fa al caso mio:
http://code.google.com/p/drupal-chart-api/wiki/Examples
$chart = array(
'#chart_id' => 'test_chart',
'#title' => chart_title(t('Servings'), 'cc0000', 15),
'#type' => CHART_TYPE_LINE,
'#size' => chart_size(400, 200),
'#adjust_resolution' => TRUE,
);
$chart['#data']['fruits'] = array(1, 3, 5, 4, 2);
$chart['#data']['meats'] = array(2, 2, 4, 3, 1);
$chart['#data']['dairy'] = array(5, 2, 3, 1, 2);
$chart['#legends'][] = t('Fruits');
$chart['#legends'][] = t('Meats');
$chart['#legends'][] = t('Dairy');
$chart['#data_colors'][] = '00ff00';
$chart['#data_colors'][] = 'ff0000';
$chart['#data_colors'][] = '0000ff';
$chart['#mixed_axis_labels'][CHART_AXIS_Y_LEFT][0][] = chart_mixed_axis_range_label(0, 5);
$chart['#mixed_axis_labels'][CHART_AXIS_Y_LEFT][1][] = chart_mixed_axis_label(t('Count'), 95);
$chart['#mixed_axis_labels'][CHART_AXIS_X_BOTTOM][1][] = chart_mixed_axis_label(t('Mon'));
$chart['#mixed_axis_labels'][CHART_AXIS_X_BOTTOM][1][] = chart_mixed_axis_label(t('Tue'));
$chart['#mixed_axis_labels'][CHART_AXIS_X_BOTTOM][1][] = chart_mixed_axis_label(t('Wed'));
$chart['#mixed_axis_labels'][CHART_AXIS_X_BOTTOM][1][] = chart_mixed_axis_label(t('Thu'));
$chart['#mixed_axis_labels'][CHART_AXIS_X_BOTTOM][1][] = chart_mixed_axis_label(t('Fri'));
$chart['#mixed_axis_labels'][CHART_AXIS_X_BOTTOM][2][] = chart_mixed_axis_label(t('Days of the week'), 50);
echo chart_render($chart);
Non so però come va usato e dove devo incollare questo pezzo di codice. Qualcuno può farmi un esempio concreto? Perdonatemi se la mie domande vi sembrano banali ma mi sto avvicinando ora alla programmazione web... :)