Several iNZightPlots graphs have been enabled with custom interaction, while others make use of the automatic output of 'plotly'. This function returns 'TRUE' if the provided plot has interaction (as determined by iNZight), and 'FALSE' otherwise.
1 2 3 4 5 6 7 8 9 10
a plot object returned from a plotting function
Not that, while most 'ggplot2' graphs can be passed to 'plotly', and even though we are using plot.ly directly for some of our ggplot2 graphs, we still only return 'TRUE' if the graph was created by one of the packages in the iNZight collection.
Logical to identify if there is an interactive version
default: Default interaction helper (always returns 'FALSE')
inzplotoutput: Graphs from 'iNZightPlot()', many of which
have interaction enabled, but some do not (for example, hex plots)
ggplot: Those 'iNZight*' plotting functions which return
a 'ggplot2' object and have been tested to work with plotly
will be tagged as such; this is just a helper to check for
the necessary attribute.
Tom Elliott, Yu Han Soh
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.