Nice. Glad it worked out. I imagine one enhancement you might like is a vertical crosshairs that you could coordinate between the charts when the user hovers the mouse over the charts.
On Sat, Apr 18, 2015 at 11:45 AM, rashmani <[email protected]> wrote: > Hi Daniel, > > beautyfully sorted out following your suggestions! Pixel-perfect (as per > attached image) in almost all cases but waaaaaaaaay more than hoped. > > > <https://lh3.googleusercontent.com/-z7eLztDKJzA/VTJ7Aj-5s9I/AAAAAAAAAOg/Qk2EXojhhi0/s1600/chartsaligned.jpg> > Cheers, > rash* > > > Il giorno venerdì 17 aprile 2015 20:03:58 UTC+2, rashmani ha scritto: > >> Hi Daniel, >> >> thanks a lot, I'll play with those. >> >> Ciao, >> rash* >> >> Il giorno venerdì 17 aprile 2015 19:46:59 UTC+2, Daniel LaLiberte ha >> scritto: >>> >>> Hi rash, >>> >>> These two charts use different ways of generating the axes, so at best, >>> you will have to tweak options for each chart until the gridlines align as >>> you want. For the timeline chart, your options are limited, so you should >>> set that chart up first, and then match the scatter chart to the timeline. >>> For >>> the scatter chart, you can specify the overall width, the chartArea.width, >>> and the chartArea.left. You can also specify the viewWindow.min and .max >>> to get the range you want. And additionally, you should also be able to >>> specify an explicit set of gridlines using the 'ticks' option. >>> >>> On Fri, Apr 17, 2015 at 1:33 PM, rashmani <[email protected]> wrote: >>> >>>> Hi there, >>>> >>>> I have two charts with values (passengers, average price) distributed >>>> between two dates. I use two charts to provide two different views of the >>>> same data, respectively a scatter chart (with trend line) and a timeline >>>> chart. I display the two charts like this: >>>> >>>> >>>> <https://lh3.googleusercontent.com/-K39Qyt6O9lw/VTFAWT5zrtI/AAAAAAAAAOM/3JU-9Tpo00s/s1600/scattertest.jpg> >>>> >>>> For top chart, I've set hAxis' minValue to the first date of bottom >>>> chart (say October 17, 2014) and maxValue to last date of bottom chart (say >>>> April 26, 2015) respectively. >>>> >>>> Now, I'd like to keep the two chart aligned and their vertical grid >>>> lines aligned as well. The timeline chart spawns correctly between the two >>>> dates. The scatter chart on top though, adds space (days) before and after >>>> set values. >>>> >>>> Both charts are inside the same div. What should I edit or tweak to >>>> keep charts the same size and time aligned? Any suggestion? >>>> >>>> Cheers, >>>> rash* >>>> >>>> >>>> >>>> <https://lh3.googleusercontent.com/-K39Qyt6O9lw/VTFAWT5zrtI/AAAAAAAAAOM/3JU-9Tpo00s/s1600/scattertest.jpg> >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Google Visualization API" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> To post to this group, send email to [email protected]. >>>> Visit this group at >>>> http://groups.google.com/group/google-visualization-api. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> >>> >>> -- >>> Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2> >>> - 978-394-1058 >>> [email protected] 5CC, Cambridge MA >>> [email protected] 9 Juniper Ridge Road, Acton MA >>> >> -- > You received this message because you are subscribed to the Google Groups > "Google Visualization API" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to > [email protected]. > Visit this group at > http://groups.google.com/group/google-visualization-api. > For more options, visit https://groups.google.com/d/optout. > -- Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2> - 978-394-1058 [email protected] <[email protected]> 5CC, Cambridge MA [email protected] <[email protected]> 9 Juniper Ridge Road, Acton MA -- You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout.
