Hi Jessica, Your gridlines.count option being 12 is the problem, since the chart does try to accommodate your request. Note that the image that shows what you don't want does have 12 gridlines, while the image that shows what you do want has 14. The other part of the problem is your assumption that the formatted tick labels will correspond accurately to your tick values. You can format the labels to all be "foobar" and that's what you will get.
We should have a way of using the format to help determine the gridline values, but it's not available yet. For now, you should either specify the gridlines.count to be -1, which means it will be automatically computed rather than defaulting to 5, and live with the occasional extra precision (which is more likely to be .5) or specify the 'ticks' option to get exactly the values you want. On Tue, Jan 5, 2016 at 2:35 AM, Jessica Schlapbach <[email protected]> wrote: > hey hey, > > I don't know if this is a bug of some sort, but the y-as of my chart is > acting strange. > I have made a area chart wirth a min and maximum value, like in this > example : > http://stackoverflow.com/questions/10984981/how-would-i-go-about-making-a-type-of-stacked-area-chart-jquery-google-charts > Everything works as I want it to except the y-axis. > > This is the code for the y-axis that I use: > > options.vAxis = { > title: title, > gridlines: { > count: 12, > color: '#939393', > }, > viewWindowMode:'maximized', > viewWindow:{ > max: vAxesMax.max, > min: vAxesMin.min, > }, > } > > This is what I want it to look like (this is achived by using the explorer > option): > http://i67.tinypic.com/2nhgaoz.png > The explorer option should only be a feature which can be enabled and > disabled by the costumer. > > This is what it looks like (without the explorer option): > http://i63.tinypic.com/1z2iwww.png > I don't want the numbers behind the comma, so I put a formater to the > y-axis: > format: '#', OR format: '0', > which creates this grafiek (and here is the problem): > http://i64.tinypic.com/20u2x4p.png > > the grafiek is displayed 0.5 higher, then it should (look at the tooltip > which says that min is 10 or at the explorer which has the correct y-axis). > > I don't know if this is a bug or if I can fix it with some sort of code, I > can also life with the numbers behind the comma (but they are not realy > pretty for the grafiek that I am making :<). > I would realy like the y-axis without explorer to act like the one with > explorer. > > M.f.G., > > Jessica. > > -- > 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 > https://groups.google.com/group/google-visualization-api. > To view this discussion on the web visit > https://groups.google.com/d/msgid/google-visualization-api/5d1da47a-8b4e-4cd1-a9aa-c3227d30c7b4%40googlegroups.com > <https://groups.google.com/d/msgid/google-visualization-api/5d1da47a-8b4e-4cd1-a9aa-c3227d30c7b4%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2> [email protected] <[email protected]> 5CC, Cambridge 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 https://groups.google.com/group/google-visualization-api. To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/CAOtcSJMBcNFxe1piMvGGGav7n4vUXpA9Fwc93Nk38_9--XEEGA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
