I can't tell from the script used to generate JavaScript, but if you could
instead show us the JavaScript results from running this, that would help.

I see you are trying to use the explicit ticks option, which is the best
way to specify exactly what ticks you will get.  But how the options are
interpreted also depends on the chart type, so please specify that as well.


It is best to give us a link to the resulting web page, so we can see all
the code and what it does.

On Sun, Jun 25, 2017 at 5:55 AM, Paul Maural <[email protected]> wrote:

> Hi,
>
> I appreciate if someone can point me right approach to have specific
> number of ticks in x axis.
>
> I am using below code to generate the same :
>
> Basically I want to have fixed 6 number of ticks for x axis. Surprisingly,
> below code generates correct number of ticks for y axis but not for x axis
>
> Dummy_DF = data.frame('x' = 0:60, 'y' = runif((1 + 60), 1, 90))
>
> plot(gvisLineChart(Dummy_DF, xvar = "x", yvar = "y",
>
>             options = list(width = 940, height = 500, legend = 'none',
> title = "",
>                   series = "[{color:'#e8cec5', lineWidth: 1}]",
>                   hAxes = paste("[{title:'", "Days", "', ticks: [",
>                         paste(sort(unique(round(c(seq(0, 60, length.out =
> 6), 60), 0))), collapse = ','),
>                               "], titleTextStyle: { italic: false},
> minValue:", 0, ", maxValue:", 60, "}]", sep = ""),
>             vAxes = paste("[{title:'", "", "', ticks: [",
>                         paste(round(sort(unique(c(seq(0, 100, length.out
> = 11), 100))), 0), collapse = ','),
>                   "], format:'#.#', titleTextStyle: { italic: false},
> minValue:", 0,
>                   ", textPosition: 'out', maxValue:", 100, "}]", sep =
> ""))))
>
> Where am I doing wrong?
>
> --
> 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 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/CAMnpynQ60k30VKP0AqTkUx2o2cDNC
> SBYCkT5AzokE1h3Xzz2ag%40mail.gmail.com
> <https://groups.google.com/d/msgid/google-visualization-api/CAMnpynQ60k30VKP0AqTkUx2o2cDNCSBYCkT5AzokE1h3Xzz2ag%40mail.gmail.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/CAOtcSJM1D9vDMB4MnygTxfBC8kmv6hWbPHD5xBOjYVUhk_JPSg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to