Annotation chart: Could it be possible to reverse the Y-axis?

101 views
Skip to first unread message

Le Hung

unread,
Feb 12, 2016, 12:44:06 AM2/12/16
to Google Visualization API
Hello,

I am working with the project that need Annotation Chart to show my data. And I have a problem like below.

My problem:
I would like to show the reverse value on the Y-axis.
What I mean is: the bigger the value is down and vice versa (the smaller the value is up)

I try to test all the option at the support docs but it still did not work

Option:
...
 vAxis: {direction: -1} // This works on line chart but not annotation chart
...
or somethings like
...
max: -200000,
min: 200000
...

This is my test code that forked from the docs page

Could anyone help me to answer my problem? (Could it be possible to reverse the Y-axis now and later?)

Thank you very much


Daniel LaLiberte

unread,
Feb 12, 2016, 8:33:55 AM2/12/16
to Google Visualization API
Yes, you can reverse the vertical axis by putting options for the main chart under 'chart'.  I updated your jsfiddle to do that:  https://jsfiddle.net/dlaliberte/dsmgL9wj/3/

--
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-visualizati...@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/1e4606d7-34d2-44d8-8fb9-daea8ef148db%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Le Hung

unread,
Feb 14, 2016, 11:06:35 PM2/14/16
to Google Visualization API
Problem solved. Thank you very much.

*P.S. Just wonder that is there any update on the API or just the syntax
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsub...@googlegroups.com.



--

Daniel LaLiberte

unread,
Feb 15, 2016, 11:02:50 AM2/15/16
to Google Visualization API
I'm not sure what you are asking in your PS.  We didn't update the API to support what you were asking for.  We do need to update the documentation to mention this 'chart' option.

To unsubscribe from this group and stop receiving emails from it, send an email to google-visualizati...@googlegroups.com.



--

--
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-visualizati...@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.

For more options, visit https://groups.google.com/d/optout.



--

LeHung

unread,
Feb 15, 2016, 5:05:50 PM2/15/16
to google-visua...@googlegroups.com
It is just a curiousity. Thank you.

*The problem is solved and sorry for a confusing. 

--
You received this message because you are subscribed to a topic in the Google Groups "Google Visualization API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-visualization-api/1JCGLBRRhQM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-visualizati...@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.

Le Hung

unread,
Feb 19, 2016, 12:21:58 AM2/19/16
to Google Visualization API
Hello Daniel,

I think the reverse on Y-axis did not work on the small graph below. Just in case, I add the screenshot below.
Thank you.
Hung

 

Daniel LaLiberte

unread,
Feb 19, 2016, 8:41:53 AM2/19/16
to Google Visualization API
To give options to the range selector, you need to put them under 'range', and use the ChartRangeFilter options: https://developers.google.com/chart/interactive/docs/gallery/controls#chartrangefilter   So like this:

var options = {
  ...
  range: {
    ui: {
      chartOptions: {
        vAxis: { direction: -1 }
      }}}
}

--
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-visualizati...@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.

For more options, visit https://groups.google.com/d/optout.

LeHung

unread,
Feb 19, 2016, 6:58:21 PM2/19/16
to google-visua...@googlegroups.com
Yes, it worked. Thank you very much

P.S. I updated the code here

Creative Givery

unread,
Feb 29, 2016, 4:03:04 AM2/29/16
to Google Visualization API
Hi Daniel,

The Annotation Chart dit not work. I found that the error is occured today.
Is there any update with the API?

Thank you





Daniel LaLiberte

unread,
Feb 29, 2016, 8:52:38 AM2/29/16
to Google Visualization API
Try flushing your browser cache, or change 'current' to '44'.

--
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-visualizati...@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.

For more options, visit https://groups.google.com/d/optout.

LeHung

unread,
Feb 29, 2016, 8:41:41 PM2/29/16
to google-visua...@googlegroups.com
It worked. Thank you

P.S. Memo
Update: google.charts.load('44', {'packages':['annotationchart'], 'language': 'ja'});

You received this message because you are subscribed to a topic in the Google Groups "Google Visualization API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-visualization-api/1JCGLBRRhQM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-visualizati...@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.
Reply all
Reply to author
Forward
0 new messages