Title: Chart v_axis syntax
Last modified: August 30, 2016

---

# Chart v_axis syntax

 *  Resolved [ZenEntSEA](https://wordpress.org/support/users/zenentsea/)
 * (@zenentsea)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/chart-v_axis-syntax/)
 * I am trying to customize a line chart. I would like to have ticks at 9, 18 & 
   27. But when I use this code
    `chart_v_axis='{"ticks":"9,18,27", "gridlines":{"
   color": "#202020"}}'` I get ticks on 1, 2, 7, 8 & 9. The gridlines color code
   works fine.
 * Could you tell me what syntax I can use to make sure its not ignoring the commas?
   Am I missing something obvious?
 * [https://wordpress.org/plugins/inline-google-spreadsheet-viewer/](https://wordpress.org/plugins/inline-google-spreadsheet-viewer/)

Viewing 15 replies - 1 through 15 (of 21 total)

1 [2](https://wordpress.org/support/topic/chart-v_axis-syntax/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/chart-v_axis-syntax/page/2/?output_format=md)

 *  Plugin Author [Meitar](https://wordpress.org/support/users/meitar/)
 * (@meitar)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/chart-v_axis-syntax/#post-6703597)
 * `ticks` should be an array, not a string. [Read the friendly manual](https://developers.google.com/chart/interactive/docs/gallery/linechart#configuration-options).
 *  Thread Starter [ZenEntSEA](https://wordpress.org/support/users/zenentsea/)
 * (@zenentsea)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/chart-v_axis-syntax/#post-6703646)
 * I see that for an array, it should look like this (from the page you referenced):
 * `vAxis: { ticks: [5,10,15,20] }`
 * But when I attempt to use `[` or `]`, I get an error. SHould I different character
   be substituted for the shortcode, like `=` instead of `:`?
 *  Plugin Author [Meitar](https://wordpress.org/support/users/meitar/)
 * (@meitar)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/chart-v_axis-syntax/#post-6703648)
 * URL encode the `[` and `]` characters. [Read this plugin’s FAQ](https://wordpress.org/plugins/inline-google-spreadsheet-viewer/faq/).
 *  Thread Starter [ZenEntSEA](https://wordpress.org/support/users/zenentsea/)
 * (@zenentsea)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/chart-v_axis-syntax/#post-6703649)
 * Read the FAQ, found the URL encode equivalents. Still not quite sure how to incorporate
   that into your shortcode:
 * `chart_v_axis='{"ticks": %5B 9,18,27 %5D, "gridlines": {"color": "#202020"}}'`
 * Still gives error.
 *  Plugin Author [Meitar](https://wordpress.org/support/users/meitar/)
 * (@meitar)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/chart-v_axis-syntax/#post-6703655)
 * Right above the button you pressed to post this message, this forum asks you:
 * > Did you include a link to your site, so that others can see the problem?
 * Other things that would be helpful:
    - The shortcode you’re using.
    - Literally any info about the error you say you’re getting.
 *  Thread Starter [ZenEntSEA](https://wordpress.org/support/users/zenentsea/)
 * (@zenentsea)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/chart-v_axis-syntax/#post-6703662)
 * Shortcode:
 * `[gdoc key="https://docs.google.com/spreadsheets/d/1hOJPFL9VrwBYYn0OKeVwI2MwgxPX0lyzpx0bpIBarHw/
   edit#gid=1314876059" chart="Line" chart_chart_area='{"width":"90%", "height":"
   75%"}' chart_background_color='{"fill":"#292929"}' chart_v_axis='{"ticks": %5B
   5,10,15,20 %5B "gridlines": {"color": "#202020"}}' chart_h_axis='{"textPosition":"
   bottom", "textStyle": {"color": "#CBCBCB", "fontSize": "10"}}' chart_legend='{"
   position": "top", "maxLines": "3", "alignment": "center", "textStyle": {"color":"#
   CBCBCB", "fontSize": "10"}}' chart_height="500" chart_width="100%"]`
 * Site/page is not live.
 * Error appears on page where chart should be. Red box stat states “b is undefined”.
 *  Plugin Author [Meitar](https://wordpress.org/support/users/meitar/)
 * (@meitar)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/chart-v_axis-syntax/#post-6703663)
 * Google Docs can’t load your Sheet. [Screenshot](https://i.imgur.com/9Qo22fX.png).
   I’d worry about fixing that issue first. Good luck.
 *  Plugin Author [Meitar](https://wordpress.org/support/users/meitar/)
 * (@meitar)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/chart-v_axis-syntax/#post-6703664)
 * Also,
 *     ```
       chart_v_axis='{"ticks": %5B 5,10,15,20 %5B "gridlines": {"color": "#202020"}}'
       ```
   
 * has at least two syntax errors in it:
    1. `%5B` (`[`) is used to open _and_ close the array, but you actually mean `%5D`(`]`)
       to close it.
    2. You’re missing a comma after the close of the array and before `"gridlines"`,
       since that’s the next element.
 * In short, please provide a usable (minimal) test case of where `chart_v_axis`
   fails. I really don’t have the time to troubleshoot syntax errors and point you
   at the FAQ/manual every time you have a problem. Thanks.
 *  Thread Starter [ZenEntSEA](https://wordpress.org/support/users/zenentsea/)
 * (@zenentsea)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/chart-v_axis-syntax/#post-6703676)
 * Well that’s strange because I can get to the Google Doc just fine, Its ‘view 
   only’ in [this screenshot I took after logging out](http://imgur.com/6evw8Be).
   I also have checked from multiple computers/browsers, not logged into google,
   and its there too. Also the page I’m testing this on has a couple tables from
   the same spreadsheet all displaying fine, using their own shortcode with this
   same gdoc.
 * Here is the new shortcode after your suggestions, still not working:
 * `[gdoc key="https://docs.google.com/spreadsheets/d/1hOJPFL9VrwBYYn0OKeVwI2MwgxPX0lyzpx0bpIBarHw/
   edit#gid=1314876059" chart="Line" chart_chart_area='{"width":"90%", "height":"
   75%"}' chart_background_color='{"fill":"#292929"}' chart_v_axis='{"ticks":%5B
   9,18,27%5D, "gridlines": {"color": "#202020"}}' chart_h_axis='{"textPosition":"
   bottom", "textStyle": {"color": "#CBCBCB", "fontSize": "10"}}' chart_legend='{"
   position": "top", "maxLines": "3", "alignment": "center", "textStyle": {"color":"#
   CBCBCB", "fontSize": "10"}}' chart_height="500" chart_width="100%"]`
 * Here is [a test page](http://premierleaguepokerclub.com/test-2/) outside our 
   pay wall that I copied the shortcode into so you can see the error.
 * I appreciate your help.
 *  Thread Starter [ZenEntSEA](https://wordpress.org/support/users/zenentsea/)
 * (@zenentsea)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/chart-v_axis-syntax/#post-6703700)
 * Nothing huh?
 *  Plugin Author [Meitar](https://wordpress.org/support/users/meitar/)
 * (@meitar)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/chart-v_axis-syntax/#post-6703701)
 * > Nothing huh?
 * I haven’t looked at your test page yet. You’re not the highest priority in my
   life right now. And bluntly, I don’t like being haughtily prodded, so I think
   I’ll ignore this for a while longer.
 *  Thread Starter [ZenEntSEA](https://wordpress.org/support/users/zenentsea/)
 * (@zenentsea)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/chart-v_axis-syntax/#post-6703702)
 * 1. I realize I’m not your “highest priority”, I never claimed to be, or insinuated
   that…. or even asked for that.
 * 2. I only “prodded” because your previous replies were so quick, combined with
   you marking this support thread as ‘resolved’, led me to believe this was not
   on your radar any longer, but my errors persist.
 * 3. “I think I’ll ignore this for a while longer.” Have I done anything to upset
   you? If so, I apologize, but I feel I’ve been nothing but thankful of your help,
   and making the changes you suggest.
 * Again….. I appreciate your help.
 *  Plugin Author [Meitar](https://wordpress.org/support/users/meitar/)
 * (@meitar)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/chart-v_axis-syntax/#post-6703703)
 * > Have I done anything to upset you? If so, I apologize, but I feel I’ve been
   > nothing but thankful of your help, and making the changes you suggest.
 * Perhaps I attributed some entitled malice in your prod that you did not intend.
   Chalk it up to Capitalism Should Die But Won’t. *shrug* Anyways, thanks for the
   test case, will take a peek when I get a chance.
 *  Thread Starter [ZenEntSEA](https://wordpress.org/support/users/zenentsea/)
 * (@zenentsea)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/chart-v_axis-syntax/#post-6703704)
 * No entitled malice, or haughtiness intended. Sorry if it came across that way.
   Looking forward to your thoughts on my issue when you can get to it.
 *  [Yuffx](https://wordpress.org/support/users/yuffx/)
 * (@yuffx)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/chart-v_axis-syntax/#post-6703705)
 * Hi,I took your code and modified this line chart_v_axis='{“ticks”:”%5B 9,18,27%
   5D”, “gridlines”: {“color”: “#202020”}}’
    I added %5B 9,18,27%5D between “”. 
   I’m not sure if this is the right way but it seems to work 🙂
 * Cheers!

Viewing 15 replies - 1 through 15 (of 21 total)

1 [2](https://wordpress.org/support/topic/chart-v_axis-syntax/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/chart-v_axis-syntax/page/2/?output_format=md)

The topic ‘Chart v_axis syntax’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/inline-google-spreadsheet-viewer.
   svg)
 * [Inline Google Spreadsheet Viewer](https://wordpress.org/plugins/inline-google-spreadsheet-viewer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/inline-google-spreadsheet-viewer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/inline-google-spreadsheet-viewer/)
 * [Active Topics](https://wordpress.org/support/plugin/inline-google-spreadsheet-viewer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/inline-google-spreadsheet-viewer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/inline-google-spreadsheet-viewer/reviews/)

## Tags

 * [ticks](https://wordpress.org/support/topic-tag/ticks/)

 * 21 replies
 * 3 participants
 * Last reply from: [ZenEntSEA](https://wordpress.org/support/users/zenentsea/)
 * Last activity: [10 years, 9 months ago](https://wordpress.org/support/topic/chart-v_axis-syntax/page/2/#post-6703723)
 * Status: resolved