Can you point us at a web page showing this?  It will have all the html and
js code that we can look at and figure out what is happening.

On Fri, Jul 7, 2017 at 5:08 AM, Christofer Bogaso <
[email protected]> wrote:

> Hi,
>
> I have posted this issue in some other forum, however unable to get any
> satisfactory reply. Hope expert here would provide some some light/pointer
> how to achieve below.
>
> I am tying to put some Googlevis plot in the tooltip of another Googlevis
> line chart as follows.
>
>
> library(googleVis)
> library(quantmod)
>
>  sp500 = as.zoo(na.omit(
>    getSymbols(
>     "SP500",
>      src = "FRED",
>      auto.assign = FALSE
>    )
>  ))
>
>  sp500 = window(as.zoo(sp500), start = as.Date("2017-04-01"))
>
>  ### Now a dummy TS, to be used in the tooltipDummy = tail(sp500, 10)Dummy.df 
> = data.frame('date' = index(Dummy), 'data' = coredata(Dummy))
> m = gvisLineChart(
>    data = Dummy.df,
>    xvar = "date",
>    yvar = "SP500",
>    options = list(
>      title = "Dummy TS",
>      height = 400,
>      width = 600
>    ))
>
> htmlstring = paste(c(m$html$header,paste(m$html$chart,collapse = 
> ""),m$html$caption,m$html$footer),collapse = "\n")
> final.df = data.frame('X' = index(sp500), 'Y' = coredata(sp500)[,1], 
> 'Y.html.tooltip' = htmlstring)
>
> plot(gvisLineChart(
>    data = final.df,
>    xvar = "X",
>    yvar = c("Y", "Y.html.tooltip"),
>    options = list(
>      title = "Final TS",
>      height = 400,
>      width = 600, tooltip = '{isHtml: true}'
>    )))
>
>
>
> However for some reason, I am not able to generate any plot. Probably I
> could not create right HTML code for my 1st plot 'm'. Could someone
> please help me with right pointer.
>
> Thanks,
>
> --
> 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/9987cbee-26ef-4639-8b3b-
> 9668ee5b3b60%40googlegroups.com
> <https://groups.google.com/d/msgid/google-visualization-api/9987cbee-26ef-4639-8b3b-9668ee5b3b60%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>
[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/CAOtcSJP%2BqrO6B%2B03D5f9uhfCn9fwrbQF%2Bg9fDtobQV3DSm-R0w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to