1

I'm using Google Chart API to display a multi-line chart in my application. The graph shows daily income in several currencies.

As you can see, there is a problem when the exchange rate between the currencies is significant (20 CZK = 1 USD). You may notice the little bump at about 1 third. That's actually 18 USD which is (when the exchange rate is taken into account) about 360 CZK.

I need to scale the lines to have their maximums at the same height.

I know I could just use a multiplication mapper but then there would be wrong values in tooltips shown on hover.

What solution would you recommend? I really don't like the idea of rendering the graph on my own. Thanks.

Community
  • 1
  • 1
J. K.
  • 8,268
  • 1
  • 36
  • 35
  • You can have two scales, as described here: http://stackoverflow.com/questions/7256672/can-google-charts-support-dual-y-axis-v-axis/9650352 – Jamie Kitson Sep 08 '13 at 13:36

1 Answers1

0

So, what you basicly need is three different Y axes.

I would do it by rendering three graphs side by side, or three transparent graphs absolutely positioned in one space, if it were possible to render the axes nicely.

or using different units for higher exchange rates (maybe hundreds CZK)

Nikes
  • 1,094
  • 8
  • 13
  • Thanks but I considered both of those solutions. I don't think the API supports transparent backgrounds and I commented on the different unit solution in the question—wrong values would be shown in the tooltips. – J. K. Feb 18 '12 at 12:11
  • 1) it supports option backgroundColor: 'transparent' 2) another option, i would try is vAxis: {logScale : true} – Nikes Feb 18 '12 at 12:46
  • 1) I will try the transparent background thx. 2) I don't want a logarithmic scale ;) – J. K. Feb 18 '12 at 14:06