To get a "perfect" solution to the problem is an O(n^3) algorithm: find the perfect combination of gridline count, left-axis max value, and right-axis max value that results in (emails / maxEmails) = (activities / maxActivities), such that both (maxEmails / (gridline count - 1)) and (maxActivities / (gridline count - 1)) are integers. Worse yet, the problem may not have a solution at all.
If you are willing to toss out the gridlines on one of the axes, it becomes easier to solve by several orders of magnitude. Here's an example: http://jsfiddle.net/asgallant/77Vs2/ Note that as Sergey said, this will not work at all if you have multiple users (except perhaps by coincidence). On Thursday, December 20, 2012 4:02:27 AM UTC-5, Arthur Shvetsov wrote: > > Hi, guys! > > How can I display two different values for a single column in column chart > on left and right vAxis? > For example, I have a *single *column 'user' and I need to show his > number of emails on left vAxis, and number of activities on right vAxis. > I know, that i can create *two *seperate columns and map each of them to > specific axis, but it's not a solution for me.. > > Thanks! > -- You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-visualization-api/-/ZlOJuouiuzcJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en.
