First of all thanks for the awesome module!

Now, I'm trying to output 2 lines on the same graphs where first attached to the left-Y axis and the second to the right-Y axis. By default, both of them are attached to the the left-Y. I tried looking into the Google's API Docs and into your modules, but haven't had much luck.

Any help is greatly appreciated!

Comments

tjholowaychuk’s picture

hello, I am not quite sure I understand what you are looking for! You wish to have a line series start from the left and one start from right? to do that you may have to 'padd' the series data to ensure that what are not NULL values start from the 'right' or 'end' of the array stack. I am not sure if Googles API allows to strictly set a series to the right

gemini’s picture

Here is an example of what I would like my graphs to do
http://teethgrinder.co.uk/open-flash-chart/gallery-y-axis-4.php
You see, there are 2 lines - one line shows number of users by left axis Y and another line shows Free Ram in MB by right axis-Y.

Any idea how to do that?

gemini’s picture

Okay, if some one is interested doing similar thing, the work around would to scale your RIGHT Y axis data in proportion to the LEFT Y axis. At the same time use the correct RIGHT Y axis labels data and it will work correctly.

The PHP code for the scaling RIGHT Y axis data would be something like:

foreach($right_y_data_array as $right_y_data) {
  $new_right_y_data_array[] = $right_y_data * _chart_get_max($left_y_data_array) / _chart_get_max($right_y_data_array);
}

Works for me just great.

tjholowaychuk’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.