Git Product home page Git Product logo

Comments (3)

mages avatar mages commented on September 2, 2024

Hi Whitney,

The function gvisChart is not exported by googleVis, hence you have to rebuild the package yourself with your new function.

I hope this helps.

Regards

Markus

On 29 Apr 2016, at 21:54, Whitney E Kramer [email protected] wrote:

Can you help troubleshoot....

My goal is to add a custom tooltip to the gvisTimeline function.

I've modified your script to add tooltip as a parameter. However, when I run the modified function, I get the following error message "could not find function "gvisChart". I reloaded googleVis, but I get the same error message.

This is also an unsolved post on StackOverflow, so I'm reaching out to the expert!

Thanks in advance for any guidance.

gvisTimeline <- function(data, rowlabel="", barlabel="", tooltip="", start="",
end="", options=list(), chartid){

my.type <- "Timeline"
dataName <- deparse(substitute(data))

my.options <- list(gvis=modifyList(list(width=600, height=200),options), dataName=dataName,
                   data=list(rowlabel=rowlabel, barlabel=barlabel,** tooltip=tooltip**, start=start, end=end,
                             allowed=c("number", "string", "date", "datetime"))
)


checked.data <- gvisCheckTimelineData(data, rl=rowlabel, bl=barlabel, **tt=tooltip**,
                                      start=start, end=end)

output <- gvisChart(type=my.type, checked.data=checked.data, options=my.options,
                    chartid=chartid, package="timeline") 

return(output)

}

gvisCheckTimelineData <- function(data, rl, bl, tt, start, end){

if(any(c(rl, bl, **tt**, start, end) %in% ""))
        return(data)
else  
        return(data[, c(rl, bl, **tt,** start, end)])

}

require(timeline)
require(googleVis)
data(ww2)
ww2$Person <- gsub("\n" ," ", ww2$Person)
ww2$tooltip <- rep("Hello World",nrow(ww2))
plot(gvisTimeline(ww2, barlabel="Person", rowlabel="Group", tooltip = "tooltip",
start="StartDate", end="EndDate",
options=list(tooltip="{isHtml:'True'}"), chartid="ww2")
)


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub

from googlevis.

number-cruncher avatar number-cruncher commented on September 2, 2024

Got it working. Thanks Markus. Post to follow.

from googlevis.

number-cruncher avatar number-cruncher commented on September 2, 2024

thx

On Wed, Aug 31, 2016 at 2:24 PM, Markus Gesmann [email protected]
wrote:

Closed #34 #34.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#34 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AFBPl3KBtTNCFbSMeea_ands3PR5rDqlks5qlcbSgaJpZM4ITK1M
.

Whitney Kramer
Manager of Analytics and Insights
101 Tremont Street, 6th floor, Boston, MA 02108
m: 507.358.3600 • iorahealth.com

from googlevis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.