Hey Daniel,

Worked! But now i have another issue :(. Sometimes my left bars (when the 
value is big), have the annotation above of the vertical ticks.
Any way of change the annotation to the other side of the bar?
In the image its not happening that, but its possible have an idea about 
what happens when the value is bigger. Any way of avoid this :( ?
Thank you very much for your help!!
Regards

<https://lh3.googleusercontent.com/-pNt1m1PGD7s/WDyS7cCMazI/AAAAAAAAAPs/YRV2NcPgwVYsFNWwJInGyiTJnkZ6UNroQCLcB/s1600/bars_issue.png>


segunda-feira, 28 de Novembro de 2016 às 15:14:08 UTC, Daniel LaLiberte 
escreveu:
>
> Did you try adding a vAxis viewWindow.  In this case, since your vertical 
> axis values are discrete, the viewWindow max value should be something like 
> 8.1.  The first discrete value has a numeric value of 0 and you have 9 
> values, 0-8.  Here is an example using a variant of the previous example I 
> posted: https://jsfiddle.net/dlaliberte/wctwnro5/5/
>
> On Sun, Nov 27, 2016 at 12:29 PM, Ricky Costa <rickyc...@gmail.com 
> <javascript:>> wrote:
>
>> Hey Daniel,
>>
>> Sorry did not say nothing more about our topic, but i started working in 
>> another project and this one stayed in pause a little. I am now trying to 
>> fix that issue about the ticks. I had the idea of manipulate the values and 
>> after the direction of my hAxis. And its working! I dont have anymore my 
>> ticks with negative values while drawing the chart. But i have this issue 
>> that i show on the image. This happens when i set the direction: -1 on my 
>> hAxis. 
>>
>>
>> <https://lh3.googleusercontent.com/-Tcvwi3ZLE70/WDsXym8MBiI/AAAAAAAAAPY/TrTft8RcXdwp2QeppIkgiwwMuG6-gd0PgCLcB/s1600/annotation_issue.png>
>>
>>
>> Basically what i did was multiply by -1 my negative values, and the same 
>> with my positive values. After i changed the direction of my vAxis 
>> (direction: -1) ..and the issue happens. Already tried like you said 
>> before...set a max value for my axis...did not work. Any idea :( ?
>> Thank you for your help!
>> Regards
>>
>>
>> quinta-feira, 20 de Outubro de 2016 às 10:25:45 UTC+1, Ricky Costa 
>> escreveu:
>>>
>>> Hey Daniel,
>>>
>>> Thanks for your help! Gonna try that solution. I will let you know if i 
>>> did it :).
>>>
>>> Regards,
>>>
>>>
>>> quarta-feira, 19 de Outubro de 2016 às 18:27:31 UTC+1, Daniel LaLiberte 
>>> escreveu:
>>>>
>>>> You can get the range of data with getColumnRange() ( 
>>>> https://developers.google.com/chart/interactive/docs/reference#DataTable_getColumnRange
>>>>  
>>>> )
>>>> and then compute the ticks you need from that.  You'll probably want to 
>>>> round up the range to the nearest multiple of 1, 2, or 5 times a power of 
>>>> 10.  
>>>>
>>>> We should offer a way to specify a tick formatting function, so you 
>>>> could simply use the absolute value of whatever ticks are computed based 
>>>> on 
>>>> your data.
>>>>
>>>> On Wed, Oct 19, 2016 at 12:22 PM, Ricky Costa <rickyc...@gmail.com> 
>>>> wrote:
>>>>
>>>>> Hey Daniel,
>>>>>
>>>>> This works, but the problem is that my ticks are dynamic because my 
>>>>> values changes every minute. I am getting the values from a ajax request 
>>>>> to 
>>>>> a server.
>>>>> Doing this, my ticks will always have the same values and won´t match 
>>>>> the values of the bars.
>>>>>
>>>>> Any way of dong this dynamically? I can´t share directly the code 
>>>>> because this project its not personal :(. I wish i could, would be much 
>>>>> easier for you and for me.
>>>>>
>>>>> Regards,
>>>>>
>>>>> terça-feira, 18 de Outubro de 2016 às 16:23:31 UTC+1, Daniel LaLiberte 
>>>>> escreveu:
>>>>>>
>>>>>> You can specify a set of tick values and how they will be displayed, 
>>>>>> if that is your concern.  e.g. 
>>>>>>
>>>>>>   hAxis: { ticks: [{v: -15000, f: '15,000'}, {v: -10000, f: 
>>>>>> '10,000'}, {v: -5000, f: '5,000'}, {v: 0, f: '0'}, {v: 5000, f: 
>>>>>> '5,000'}] }
>>>>>>
>>>>>> Here is an example: https://jsfiddle.net/dlaliberte/wctwnro5/3/
>>>>>>
>>>>>> It might be simpler if you could point me to your web page, or set up 
>>>>>> an example on jsfiddle.
>>>>>>
>>>>>>
>>>>>> On Tue, Oct 18, 2016 at 11:09 AM, Ricky Costa <rickyc...@gmail.com> 
>>>>>> wrote:
>>>>>>
>>>>>>> Hi Daniel,
>>>>>>>
>>>>>>> Thank you for your example. Maybe i am not exposing corrrectly my 
>>>>>>> issue, i am new with this, sorry! Basically my problem its with the 
>>>>>>> ticks 
>>>>>>> and i tried solve it with all this values conversion and direction 
>>>>>>> thing. 
>>>>>>> What i am trying to solve its the following:
>>>>>>>
>>>>>>>
>>>>>>> <https://lh3.googleusercontent.com/-Qs8Q_VcBVcs/WAY6Zh7RI4I/AAAAAAAAAOs/LrpYgyr9pVMpM6AXh1oonHPoeBZcqRFnwCLcB/s1600/expensiveChart1.png>
>>>>>>>
>>>>>>>
>>>>>>> <https://lh3.googleusercontent.com/-lZF_5DdxRBA/WAY6czFctsI/AAAAAAAAAOw/-Eta1IGnWtk_9PzrBh6441xC6iL68FtuwCLcB/s1600/expensiveChart1b.png>
>>>>>>> I am using a animation during my charts draw. During that animation 
>>>>>>> my ticks for the negative values are negatives..but i want them so be 
>>>>>>> positive. Basically i want to have bars to the left and right (to 
>>>>>>> negative 
>>>>>>> and positive values) but with positive values for the ticks. Check my 
>>>>>>> images please. The first image, to the left bars the ticks are negative 
>>>>>>> during the animation. When the animation finish, the ticks get the 
>>>>>>> values 
>>>>>>> that i want (2nd image). I want always have the values like they are 
>>>>>>> shown 
>>>>>>> on second image, even during the animation.
>>>>>>> Its that possible? Any idea i can i change this behavior?
>>>>>>>
>>>>>>> Thank you very much for be trying to help!
>>>>>>> Regards,
>>>>>>>
>>>>>>> terça-feira, 18 de Outubro de 2016 às 15:38:18 UTC+1, Daniel 
>>>>>>> LaLiberte escreveu:
>>>>>>>>
>>>>>>>> Hi Ricky,
>>>>>>>>
>>>>>>>> Check this example out that reproduces your problem:  
>>>>>>>> https://jsfiddle.net/dlaliberte/wctwnro5/
>>>>>>>> Then uncomment the viewWindow line and you will see that it does 
>>>>>>>> work correctly.
>>>>>>>>
>>>>>>>> On Tue, Oct 18, 2016 at 3:59 AM, Ricky Costa <rickyc...@gmail.com> 
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> Hey Daniel,
>>>>>>>>>
>>>>>>>>> Thank you for your answer.
>>>>>>>>>
>>>>>>>>> If i apply my original values and don´t revert the direction, this 
>>>>>>>>> issue don´t happen. So i don´t think that the problem its not enough 
>>>>>>>>> space 
>>>>>>>>> :/. Its weird because this only happens when i change the direction 
>>>>>>>>> of the 
>>>>>>>>> bars!
>>>>>>>>>
>>>>>>>>> Regards,
>>>>>>>>>
>>>>>>>>> segunda-feira, 17 de Outubro de 2016 às 15:21:54 UTC+1, Daniel 
>>>>>>>>> LaLiberte escreveu:
>>>>>>>>>>
>>>>>>>>>> Hi Ricky,
>>>>>>>>>>
>>>>>>>>>> It appears the annotation for the top bar is dropped down, 
>>>>>>>>>> erroneously, perhaps because the code thinks it is too close to the 
>>>>>>>>>> top.  
>>>>>>>>>> Maybe arrange that there is more space on the top by using a 
>>>>>>>>>> vAxis.viewWindow.max of, say, 8000.
>>>>>>>>>>
>>>>>>>>>> On Mon, Oct 17, 2016 at 7:50 AM, Ricky Costa <rickyc...@gmail.com
>>>>>>>>>> > wrote:
>>>>>>>>>>
>>>>>>>>>>> Hello,
>>>>>>>>>>>
>>>>>>>>>>> I am working on some google charts. In one of those charts i am 
>>>>>>>>>>> using a Bar Chart. I have negative and positive values, so i have 
>>>>>>>>>>> bars to 
>>>>>>>>>>> the right (positive) and bars to the left (negative), but i am 
>>>>>>>>>>> having the 
>>>>>>>>>>> ticks with negative values for the left bars. So i decided turn my 
>>>>>>>>>>> positive 
>>>>>>>>>>> values to negative, my negative values to positive and apply the 
>>>>>>>>>>> direction: 
>>>>>>>>>>> -1 to get the bars to the correct direction and without negative 
>>>>>>>>>>> ticks. But 
>>>>>>>>>>> i am getting an issue with one of my annotations...it appears in 
>>>>>>>>>>> the 
>>>>>>>>>>> incorrect position. Its visible in the image. Any idea what is 
>>>>>>>>>>> going on and 
>>>>>>>>>>> how to fix it? Or a better solution for what i am trying to do?
>>>>>>>>>>>
>>>>>>>>>>> Thanks,
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> <https://lh3.googleusercontent.com/-la6MaC5QjV4/WAS6nGqvALI/AAAAAAAAAOU/4VCmJcElWgoMSs-cQLTkWWCgPtHsUekNACLcB/s1600/annotationIssue.png>
>>>>>>>>>>> Best regards for you all.
>>>>>>>>>>>
>>>>>>>>>>> -- 
>>>>>>>>>>> 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-visua...@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/e6cd39f8-e820-4533-bf6b-1c5f4485d46b%40googlegroups.com
>>>>>>>>>>>  
>>>>>>>>>>> <https://groups.google.com/d/msgid/google-visualization-api/e6cd39f8-e820-4533-bf6b-1c5f4485d46b%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>
>>>>>>>>>> dlali...@google.com   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 
>>>>>>>>> google-visualization-api+unsubscr...@googlegroups.com.
>>>>>>>>> To post to this group, send email to 
>>>>>>>>> google-visua...@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/72bdc51f-9943-4afc-93b0-34daf8982cde%40googlegroups.com
>>>>>>>>>  
>>>>>>>>> <https://groups.google.com/d/msgid/google-visualization-api/72bdc51f-9943-4afc-93b0-34daf8982cde%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>
>>>>>>>> dlali...@google.com   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 
>>>>>>> google-visualization-api+unsubscr...@googlegroups.com.
>>>>>>> To post to this group, send email to 
>>>>>>> google-visua...@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/08a55033-a5c2-44c7-babb-52c05986ddc6%40googlegroups.com
>>>>>>>  
>>>>>>> <https://groups.google.com/d/msgid/google-visualization-api/08a55033-a5c2-44c7-babb-52c05986ddc6%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>
>>>>>> dlali...@google.com   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 google-visualization-api+unsubscr...@googlegroups.com.
>>>>> To post to this group, send email to google-visua...@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/20edac1e-fafe-4c2e-bfcf-fd6de7e49747%40googlegroups.com
>>>>>  
>>>>> <https://groups.google.com/d/msgid/google-visualization-api/20edac1e-fafe-4c2e-bfcf-fd6de7e49747%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>
>>>> dlali...@google.com   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 google-visualization-api+unsubscr...@googlegroups.com 
>> <javascript:>.
>> To post to this group, send email to google-visua...@googlegroups.com 
>> <javascript:>.
>> 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/4f70e91e-d3a7-4466-9960-d91081ec0d5b%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/google-visualization-api/4f70e91e-d3a7-4466-9960-d91081ec0d5b%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>
> dlali...@google.com <javascript:>   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 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/21195763-07b4-4b1b-b3f5-353f19580c84%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to