question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Option to execute component commands on initialization

See original GitHub issue

We talked about this briefly before and it didn’t sound like a good idea, but I really think this is proving to be necessary. Syntax:

"updatemenus": [{
  "active": 0,
  "executeoninitialization": true,
  "buttons": [{
    "method": "animate"
  }]
}]

This would trigger execution of the command if the internally active button/step index was previously undefined. Once that has happened, it won’t automatically be executed again.

Here’s situations it would help with:

  1. Playing animations on load in the UI. Right now they just get played with Plotly.animate(gd) (I think), which is not acceptable because it’s entirely unconfigured, giving a better than average chance that it will look pretty junky.

  2. synchronizing the initial state. Right now you have to load a bunch of frames and also set up the initial plot state and set the slider component value and configure a command that correctly reconstructs the exact state. Long story short, the inability to execute a command that sets the state automatically means you have to do your best to make things look correct and then just cross your fingers that you got it right. Executing the command would just make it right in the first place.

  3. Slider transform. cc: @bpostlethwaite. Right now when the magic workspace transform generates frames slider etc, it doesn’t actually set that frame. This leads to a difficult initialization problem that, at best, has to be hacked around. If it actually executed the command that configured the filter, this problem would go away.

cc: @etpinard

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
Kombat-Batyanyacommented, Jun 28, 2018

Hi, it doesn’t seem to be much activity/discussion on this issue? I am facing the problem explained in the merged issue #1955 and consider the proposed workaround as way too complicated. Isn’t it obvious that if I need to set the default slider step to other than 0, I should see the frame related to this step?

2reactions
etpinardcommented, Dec 6, 2016

To me, setting whether or not an animation should start right after the first draw depends on the plot context in plotly lingo (i.e. its environment).

For example on plot.ly, you can make the case that animations in shareplot and embed should start right away. But, I doubt that someone editing a graph in the workspace would want it to animate while editing.

Generally, per-context options are handled in the config object e.g. Plotly.plot(gd, data, layout, { editable: true }).

Read more comments on GitHub >

github_iconTop Results From Across the Web

init/README.md
The Android Init Language consists of five broad classes of statements: Actions, Commands, Services, Options, and Imports. All of these are line-oriented, ...
Read more >
Initialization actions | Dataproc Documentation
When creating a Dataproc cluster, you can specify initialization actions in executables or scripts that Dataproc will run on all nodes in your...
Read more >
Starting Up a Database
You can start a SQL*Plus session, connect to Oracle Database with administrator privileges, and then issue the STARTUP command. Using SQL*Plus in this...
Read more >
The system initialization parameter descriptions and ...
Parameter PARM SYSIN System console DFHSIT Default value ADI YES YES YES YES 30 AIBRIDGE YES YES YES YES AUTO AICONS YES YES YES YES NO...
Read more >
Console Commands (Symfony Docs)
If you find the command you need, you can run it with the --help option to view the ... Many PHP tools are...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found