I'm having some trouble using the multi series graphs with the dual y axis. If you could help me at all that would be great. I'm unsure what "P/S" is for in the data entry section, and it disappears after i try saving a graph and then go back into edit. I keep getting errors when trying to generate the graph too. I havent had any problems with any other graph types.

Comments

aaron1234nz’s picture

StatusFileSize
new3.4 KB
new4.04 KB

The Multi-series charts are the least tested of the graph types. I have put in some data validation and data reshaping routines into the latest release which should make it easier and more robust when entering data.
P/S stand for Primary or Secondary axis. Enter 'P' of the data should be shown on the primary axis 'S' to show in on the secondary axis.

Attached is a sample chart and corresponding data which you can use as an example. I will get around to documenting this properly one day ;-)

aaron1234nz’s picture

Title: Multi-series Column + Line-Dual Y Axis » User interface documentation needed
Component: User interface » Documentation
aeserran’s picture

Assigned: Unassigned » aeserran

and, in the code? I have this code:

function fusioncharts_example3() {
  return theme('fusionchart', 'example3');
}

function example3_fusionchart_callback($args = NULL) {

$info->query = "SELECT a.universidad as series, a.categoria as category, AVG(a.frecuencia)*2 as value, AVG(b.frecuencia)*2 as mediab, a.frecuencia as axis FROM proyectos.profesores as a INNER JOIN proyectos.profesores as b on a.universidad = b.universidad where a.fecha <='2006-2007' GROUP BY series, category"; 

  $info->chart_type = 'Multi-series Column 3D + Line - Dual Y Axis';
  $info->settings = array('Caption' => 'Principales países con los que colaboran las instituciones españolas', 'showvalues' => '0', 'showNames' => '1', 'formatNumberScale' => '0', 'formatNumber' => '0', 'showDivLineValue' => '1', 'rotateNames' => '1');
$info->attributes = array(
); 
  $info->width = 800;
  $info->height = 500;
  return $info;
}

print theme('fusionchart', 'example3');

How can i define the 'P' or 'S' axis?

Thanks!!

aaron1234nz’s picture

It's possible to do a Dual axis chart from a SQL query I'm afraid. Try selecting the data, processing it, then return it as $info->data. Checkout the fusioncharts.test module for an example.

I've updated the documentation on how to construct the data attribute for all charts also.

aaron1234nz’s picture

Status: Active » Closed (fixed)