-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
guided tour of each animint #150
Comments
for a geom like geom_point(
help="Each point shows life expectancy, fertility rate, and population, for a given country",
showSelected="year",
clickSelects="country"
) tour info should show
and geom_vline(
help="Vertical lines show selected prediction for the currently selected problem",
showSelected=c(selector="mid.thresh", "profile.chrom"),
clickSelects="model.name") should show
and animint2::geom_tallrect(
help="Each rectangle highlights an interval of thresholds with the same error rate",
showSelected="model.name",
clickSelects=c(selector="mid.thresh"), should make
|
@tdhock is this way to do |
I don't understand your screenshot.
etc instead of screenshots. |
<span class="fu"><a href="geom_point.html">geom_point</a></span><span class="op">(</span><span class="fu"><a href="aes.html">aes</a></span><span class="op">(</span></span></span>
<span class="r-in"><span> <span class="va">fertility.rate</span>, <span class="va">life.expectancy</span>,</span></span>
<span class="r-in"><span> key<span class="op">=</span><span class="va">country</span>, colour<span class="op">=</span><span class="va">region</span>, size<span class="op">=</span><span class="va">population</span><span class="op">)</span>,</span></span>
<span class="r-in"><span> showSelected<span class="op">=</span><span class="st">"year"</span>,</span></span>
<span class="r-in"><span> clickSelects<span class="op">=</span><span class="st">"country"</span>,</span></span>
<span class="r-in"><span> data<span class="op">=</span><span class="va">WorldBank</span><span class="op">)</span><span class="op">+</span></span></span>
<span class="r-in"><span> Would driver.js implement in the above code to create a guided tour on a web ? |
please put backticks by themselves on their own lines, and the code in between:
|
I don't understand the HTML code you shared. Can you explain where it comes from? And why it is relevant to your question? The idea of this issue is to use driver.js to show the text of the "help" parameter for each geom, along with interactive parameters. |
@tdhock if I create a visualization using animint should I use driverjs to implement the tour in this way? gif.mp4 |
I saw two driverjs boxes, one for each plot. |
after generating visualization with geom_vline, geom_point when index.html generated then manually implemented driverjs, by the way are you trying to implement something like that shows data when we toggle over element? |
I don't understand. can you clarify? the idea for this issue is to show the driverjs boxes when the user clicks a help/tour button |
ggplot(data, aes(x = life_expectancy, y = fertility_rate)) + If I create a visualization with this code, how can I extract those properties like help, showSelceted.. dynamically? I am not getting it and how the size and color are being extracted I thought I could create a function with driverjs using the id plot_pointPlot, plot_vlinePlot which is in |
the showSelected/clickSelects is in plot.json, which is written by R code inside of animint2dir() function. https://github.com/animint/animint2/blob/master/R/z_animint.R#L653 |
you can add the help/tour button at the bottom next to the other widgets, https://github.com/animint/animint2/blob/master/inst/htmljs/animint.js#L2054 |
@tdhock var element = d3.select("body");
function startTour() {
const driver = window.driver.js.driver;
const driverObj = driver({
showProgress: true,
steps: steps
});
driverObj.drive();
}
element.append("button")
.text("Start Tour")
.on("click", function() {
startTour();
}); var geom = g_info.geom;
var id = "plot_" + geom + "Plot";
var helpText = g_info.params.help || '';
var showSelected = g_info.params.showSelected || '';
var clickSelects = g_info.params.clickSelects || '';
steps.push({
element: "#" + id,
popover: {
title: geom.charAt(0).toUpperCase() + geom.slice(1),
description: `${helpText} Data are shown for the current selection of: ${showSelected}. Click to change selection of: ${clickSelects}.`
}
}); |
that looks like a good start, thanks! can you please submit a pr? also for including code in github comments/markdown you tried
|
https://driverjs.com/
The text was updated successfully, but these errors were encountered: