ggiraph | make 'ggplot' graphics interactive | Data Visualization library

 by   davidgohel R Version: v0.7.10 License: No License

kandi X-RAY | ggiraph Summary

kandi X-RAY | ggiraph Summary

ggiraph is a R library typically used in Analytics, Data Visualization applications. ggiraph has no bugs, it has no vulnerabilities and it has low support. You can download it from GitHub.

{ggiraph} is a tool that allows you to create dynamic ggplot graphs. This allows you to add tooltips, hover effects and JavaScript actions to the graphics. The package also allows the selection of graphical elements when used in shiny applications.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              ggiraph has a low active ecosystem.
              It has 677 star(s) with 71 fork(s). There are 21 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 15 open issues and 209 have been closed. On average issues are closed in 180 days. There are 1 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of ggiraph is v0.7.10

            kandi-Quality Quality

              ggiraph has 0 bugs and 0 code smells.

            kandi-Security Security

              ggiraph has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              ggiraph code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              ggiraph does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              ggiraph releases are available to install and integrate.
              Installation instructions, examples and code snippets are available.
              It has 100 lines of code, 0 functions and 13 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ggiraph
            Get all kandi verified functions for this library.

            ggiraph Key Features

            No Key Features are available at this moment for ggiraph.

            ggiraph Examples and Code Snippets

            No Code Snippets are available at this moment for ggiraph.

            Community Discussions

            QUESTION

            Is it possible to use ggiraph interactive functions with ggplots generated using stat_summary
            Asked 2022-Apr-17 at 09:42

            I am using stat_summary to generate a column plot from a dataframe. I would like to report the values to the user via tooltips using geom_col_interactive from ggiraph.

            I can get the values from the ggplot using ggplot_build and construct a tooltip as below. However, I cannot work out how to use ggiraph with the plot generated using stat_summary to present tooltips interactively. I could of course use the summary_values tibble and generate a different ggplot using geom_col_interactive, but this would defeat the purpose of using stat_summary (which lends itself nicely to faceting). Is there any way to do this? Or must I use summarySE from Rmisc to generate the tibble to be plotted using geom_col_interactive?

            ...

            ANSWER

            Answered 2022-Apr-17 at 09:42

            One approach to achieve your desired result via stat_summary would be to pass the ggiraph:::GeomInteractiveCol to the geom argument. However, be aware that GeomInteractiveCol is not exported by ggiraph and so requires to use :::. Additionally, to have both the mean and the standard error in the tooltip requires to switch to fun.data="mean_se". For convenience I make use of a simple custom function to create the tooltip:

            Source https://stackoverflow.com/questions/71899911

            QUESTION

            Exporting a graph in svg format, which is a `girafe` object (`ggiraph` package)
            Asked 2022-Mar-11 at 09:07

            ggiraph package is suitable for generating interactive graphics.

            I was trying to execute some examples found online concerning package ggiraph and I was not able to find anywhere how to export the interactive graph generated, maybe in format svg (or other).

            Below the code:

            ...

            ANSWER

            Answered 2022-Mar-11 at 09:07

            You can save the interactive plot containing the svg in a HTML file using htmltools::save_html(oggetto, "out.html")

            out.html contains JavaScript e.g. ggiraphjs.min.js required to run the interactivity. Plain SVG files can display tooltips using the title attribute, but the orange point color on hover on both plots simultaneously seems to require JavaScript.

            Source https://stackoverflow.com/questions/71435042

            QUESTION

            R ggiraph dynamically setting tooltip text without Shiny
            Asked 2021-Dec-10 at 16:19

            What: Dynamically set the contents of ggiraph tooltips in rmarkdown knitted to html on page load.

            Why: Using embedded png's tooltips can be made to be graphics which is valuable for certain biological structures where text is insufficient. Here is a minimal example of what I'm currently doing:

            ...

            ANSWER

            Answered 2021-Dec-10 at 16:19

            There may be several different ways to achieve this goal, in particular I suspect that using the htmlwidgets "onRender" function may be able to achieve this more cleanly but I never got that to work.

            What I've found is that any editing of the innerHTML of the htmlwidget or htmlwidget data breaks the mouseover text completely, because it breaks the event listener which powers the mouseover text.

            Instead I've found I can edit the resulting svg of the htmlwidget by wrapping my ending script in a $(window).load(function(){ ... }) call. If I find all svg elements (in this case circles!) and edit the title property of those svg objects I can preserve the event listeners and change the title contents (to be an image!).

            See complete example below which has 1000 1kb images as tooltips but gives no increase in file size:

            Source https://stackoverflow.com/questions/70294953

            QUESTION

            Positioning legend title on top of horizontal legend causes loss of interactivity in ggiraph
            Asked 2021-Nov-14 at 23:37

            When I used guides() specifications to customise legend appearance, I found that the interactive nature of the legend in the plot is lost.

            The following code modified from the example in the ggiraph documentation.

            ...

            ANSWER

            Answered 2021-Nov-14 at 23:37

            Instead of changing the title position via guides() you could achieve your desired result without losing the interactivity via the guide argument of scale_fill_manual_interactive:

            Source https://stackoverflow.com/questions/69968025

            QUESTION

            Render different plots based on if/else on existence of reactive variable
            Asked 2021-Jul-29 at 23:48

            I'm trying to create an app that allows 1) a user to hover over scatter plot points, which displays a label associated with the point, and 2) search for a specific point by label.

            Currently, to highlight a point, I re-plot the graph each time the user submits a search term, adding that single point on top of rest of the points that have been plotted.

            In order to avoid the server re-plotting before the user finishes typing the label, I require that the "search" button be pressed. However, I'm struggling to get the plot to display BEFORE the user has searched for any labels.

            Here's what I have so far:

            ...

            ANSWER

            Answered 2021-Jul-29 at 07:07

            Set ignoreNULL = FALSE in eventReactive to have a default value at the beginning.

            Source https://stackoverflow.com/questions/68568506

            QUESTION

            R/shiny drilldown report
            Asked 2021-May-11 at 07:19

            Trying to have a pie (or preferably, donut) chart that displays totals per category and that allows a drilldown to display specifics per category when clicked. Make sense?

            I think I might not have every system setting correct, since also copy/paste standard examples render an empty page. Unless that's somehow outdated or something. My system: Ubuntu 20.04, R 4.0.5, packageVersion("shiny") 1.6.0, shiny-server --version 1.5.16.958 Blank examples: https://plotly-r.com/linking-views-with-shiny.html#drill-down and Creating drill down report in R Shiny (amongst others)

            My current attempt (not reactive yet because I can't for the life of me figure it out):

            ...

            ANSWER

            Answered 2021-May-11 at 07:19

            The key is to use input$donut_selected, the automatically generated _selected-suffixed input, see https://davidgohel.github.io/ggiraph/articles/offcran/shiny.html#access-the-selected-values.
            Like so:

            Source https://stackoverflow.com/questions/67467942

            QUESTION

            set css property separately for each layer on hover (ggiraph)
            Asked 2021-Apr-24 at 15:16

            Using ggiraph, I'd like to set css properties differently for each ggplot geom_ or layer using hover. In the example below, how might I set the stroke for the second geom_rect_interactive to blue on hover but keep the first layer stroke red on hover (keeping the data_id the same so both respond to hovering over either layer)?

            ...

            ANSWER

            Answered 2021-Apr-24 at 15:16

            (I am one of the authors) This is not currently possible, we have not considered this case (we will if we can implement it).

            For the moment, it is only possible to specify a CSS per shape type. An example will be more meaningful, it is copied from:

            https://davidgohel.github.io/ggiraph/articles/offcran/customizing.html#detailled-control-1

            Source https://stackoverflow.com/questions/67237723

            QUESTION

            Create selection for filter based on interactive ggplot using javascript
            Asked 2021-Apr-07 at 05:34

            I created the following Rmarkdown file to make a selection based on clicking an interactive ggplot.

            In the javascript chunk I would like to use instead of "A" the letter (A or B) obtained from
            the onclick event in the interactive ggplot. If the user clicks on polygon B then the "A" should become a "B".

            ...

            ANSWER

            Answered 2021-Apr-06 at 22:30

            Here's a slightly more useful take on the problem:

            Source https://stackoverflow.com/questions/66831359

            QUESTION

            Setting tooltip font in ggiraph 0.7 (R)
            Asked 2021-Jan-29 at 10:04

            This may well be a CSS query rather than a {ggiraph} question, or may be to do with my R or Cairo installation, but here goes:

            I'm building a ggiraph interactive plot, but the settings that I apply for tooltip options aren't applied to the printed plot.

            This is a reprex:

            ...

            ANSWER

            Answered 2021-Jan-29 at 09:58

            QUESTION

            Can a ggiraph interactive plot be the size of the window in R shiny?
            Asked 2020-Dec-12 at 17:35

            I am creating an RShiny app that centres around a network drawn in ggiraph. The network is very large and detailed so ideally I'd like it to fill as much of the page as possible.

            I've had a lot of problems getting ggiraph to scale properly, and also with margins/padding in RShiny. I've gotten this far with the code but it's still leaving huge amounts of whitespace

            ...

            ANSWER

            Answered 2020-Dec-12 at 17:35

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install ggiraph

            Get development version on github.

            Support

            The help pages are located at https://davidgohel.github.io/ggiraph/.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/davidgohel/ggiraph.git

          • CLI

            gh repo clone davidgohel/ggiraph

          • sshUrl

            git@github.com:davidgohel/ggiraph.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link