The ticks option is supposed to work for the hAxis on the Histogram, but
that feature got broken.  I'll be fixing it asap, along with several more
fixes.

You should be able to get it working for now if you load an older version
instead of 'current', such as the previous version which was 45.2.

On Mon, Oct 29, 2018 at 5:41 PM Erik M <erik.mon...@onemind.org> wrote:

> I am trying to have a custom tick label in my x-axis in a Histogram though
> it doesn't seem to work. I've tried:
>
> hAxis: {
>   ticks: [0,1,2,3,{v:5, f:'5+'}]
> }
>
> however that doesn't seem to work as ticks are not even being respected.
>
> In reading the documentation, there is an example in
> https://developers.google.com/chart/interactive/docs/gallery/histogram#controlling-buckets
> which shows that ticks can be used for hAxis.
>
>   var options = {
>>     title: 'Approximating Normal Distribution',
>>     legend: { position: 'none' },
>>     colors: ['#4285F4'],
>>
>>     *chartArea: { width: 401 },
>>     hAxis: {
>>       ticks: [-1, -0.75, -0.5, -0.25, 0, 0.25, 0.5, 0.75, 1] // <----- here
>>     },
>>     bar: { gap: 0 },
>>
>>     histogram: {
>>       bucketSize: 0.02,
>>       maxNumBuckets: 200,
>>       minValue: -1,
>>       maxValue: 1
>>     }*
>>   };
>>
>>
> If I scroll down to the configuration options section
> https://developers.google.com/chart/interactive/docs/gallery/histogram#configuration-options
> there's no such thing as hAxis.ticks, there is however, a vAxis.ticks. So
> is the example just outdated?
>
> Is there any way I can have custom ticks with labels along the x-axis for
> Histograms?
>
> Thanks for the help!
>
> --
> 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 google-visualization-api+unsubscr...@googlegroups.com.
> To post to this group, send email to
> google-visualization-api@googlegroups.com.
> 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/3fad7d6b-8965-4181-9af8-64df03299d36%40googlegroups.com
> <https://groups.google.com/d/msgid/google-visualization-api/3fad7d6b-8965-4181-9af8-64df03299d36%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>
dlalibe...@google.com <dlalibe...@google.com>   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 google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
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/CAOtcSJPKusFR6hHjuFRHiJefFanv%2BBuxqTP6rfP098WLqzOEVQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to