@@ -18,27 +18,26 @@ elements when used in shiny applications.
1818Interactivity is added to ggplot ** geometries, legends and theme
1919elements** , via the following aesthetics:
2020
21- - ` tooltip ` : tooltips to be displayed when mouse is over elements.
22- - ` onclick ` : JavaScript function to be executed when elements are
23- clicked.
24- - ` data_id ` : id to be associated with elements (used for hover and
25- click actions)
21+ - ` tooltip ` : tooltips to be displayed when mouse is over elements.
22+ - ` onclick ` : JavaScript function to be executed when elements are
23+ clicked.
24+ - ` data_id ` : id to be associated with elements (used for hover and click
25+ actions)
2626
2727### Why use ` {ggiraph} `
2828
29- - You want to provide your readers with more information than the
30- basic information available; you can display a tooltip when the
31- user’s mouse is on a graphical element, you can also visually
32- animate elements with the same attribute when the mouse passes over
33- a graphical element, and finally you can link a JavaScript action to
34- the click, such as opening a hypertext link.
35- - You want to allow users of a Shiny application to select graphical
36- elements; for example, you can make the points of a scatter plot
37- selectable and available as a reactive value from the server part of
38- your application. With Shiny, ` {ggiraph} ` allows interaction with
39- graph elements, legends elements, titles and ggplot theme elements
40- from the server part; each selection is available as a reactive
41- value.
29+ - You want to provide your readers with more information than the basic
30+ information available; you can display a tooltip when the user’s mouse
31+ is on a graphical element, you can also visually animate elements with
32+ the same attribute when the mouse passes over a graphical element, and
33+ finally you can link a JavaScript action to the click, such as opening
34+ a hypertext link.
35+ - You want to allow users of a Shiny application to select graphical
36+ elements; for example, you can make the points of a scatter plot
37+ selectable and available as a reactive value from the server part of
38+ your application. With Shiny, ` {ggiraph} ` allows interaction with
39+ graph elements, legends elements, titles and ggplot theme elements
40+ from the server part; each selection is available as a reactive value.
4241
4342![ ] ( man/figures/image_girafe.png )
4443
@@ -52,12 +51,12 @@ elements**, via the following aesthetics:
5251
5352The things you need to know to create an interactive graphic :
5453
55- - Instead of using ` geom_point ` , use ` geom_point_interactive ` , instead
56- of using ` geom_sf ` , use ` geom_sf_interactive ` … Provide at least one
57- of the aesthetics ` tooltip ` , ` data_id ` and ` onclick ` to create
58- interactive elements.
59- - Call function ` girafe ` with the ggplot object so that the graphic is
60- translated as a web interactive graphics.
54+ - Instead of using ` geom_point ` , use ` geom_point_interactive ` , instead
55+ of using ` geom_sf ` , use ` geom_sf_interactive ` … Provide at least one of
56+ the aesthetics ` tooltip ` , ` data_id ` and ` onclick ` to create
57+ interactive elements.
58+ - Call function ` girafe ` with the ggplot object so that the graphic is
59+ translated as a web interactive graphics.
6160
6261``` r
6362library(ggplot2 )
@@ -75,10 +74,10 @@ girafe(ggobj = gg_point)
7574
7675### With Shiny
7776
78- - If used within a shiny application, elements associated with an id
79- (` data_id ` ) can be selected and manipulated on client and server
80- sides. The list of selected values will be stored in in a reactive
81- value named ` [shiny_id]_selected ` .
77+ - If used within a shiny application, elements associated with an id
78+ (` data_id ` ) can be selected and manipulated on client and server
79+ sides. The list of selected values will be stored in in a reactive
80+ value named ` [shiny_id]_selected ` .
8281
8382![ ] ( man/figures/shiny_girafe.png )
8483
@@ -140,11 +139,39 @@ documentation.
140139If you want to submit a Pull Request to integrate functions of yours,
141140provide if possible:
142141
143- - the new function(s) with code and roxygen tags (with examples)
144- - a new section in the appropriate vignette that describes how to use
145- the new function
146- - corresponding tests in directory ` inst/tinytest ` .
142+ - the new function(s) with code and roxygen tags (with examples)
143+ - a new section in the appropriate vignette that describes how to use
144+ the new function
145+ - corresponding tests in directory ` inst/tinytest ` .
147146
148- By using rhub (run ` rhub::check_for_cran() ` ), you will see if everything
149- is ok. When submitted, the PR will be evaluated automatically with
150- Github Action and you will be able to see if something broke.
147+ ### Install from sources on macOS
148+
149+ Please read carefully the official R for macOS instructions:
150+ < https://mac.r-project.org/ >
151+
152+ To compile ` {ggiraph} ` from source, you need ` libpng ` . Using Homebrew is
153+ recommended:
154+
155+ brew install libpng
156+
157+ Then configure your ` ~/.R/Makevars ` file with the appropriate paths. For
158+ Apple Silicon Macs (M1/M2/M3), the typical configuration is:
159+
160+ CFLAGS=-I/opt/homebrew/include
161+ CPPFLAGS=-I/opt/homebrew/include
162+ CXXFLAGS=-I/opt/homebrew/include
163+ CXX11FLAGS=-I/opt/homebrew/include
164+ LDFLAGS=-L/opt/homebrew/lib
165+
166+ For Intel Macs, paths are usually ` /usr/local/include ` and
167+ ` /usr/local/lib ` instead.
168+
169+ CFLAGS=-I/usr/local/include
170+ CPPFLAGS=-I/usr/local/include
171+ CXXFLAGS=-I/usr/local/include
172+ CXX11FLAGS=-I/usr/local/include
173+ LDFLAGS=-L/usr/local/lib
174+
175+ > Note: Paths may vary depending on your system configuration. We are
176+ > unable to provide support for installation issues related to macOS
177+ > compilation setup.
0 commit comments