I do not know your current implementation, but I am guessing you have a callback assigned to an
Input dependency from the hidden
Div's children and an
Output dependency of the graphs children, maybe also passing the data through a state or both colors and data are in the same hidden
To illustrate the flow, if the above is correct, you have:
Some click/interval [Input]->
Callback is triggered->
[Output] Hidden div changes [Input] ->
Callback is triggered ->
[Output] Graph object changes in figure.
Since currently there is no support for multiple callbacks with single output (that b.t.w can be added with a simple 5-lined patch which, I will upload a post soon/contribute)__, you can’t output to the same
Div and change the color selection in the JSONified data on the page. That means, you cannot access the same hidden
Figure to change its content, if you already assigned a different callback to the outputs.
Having said that, I suggest:
Think of another way you can update your figure without connecting two different flow chains to the same output element, from the UI design perspective. You can do the follows: Split the data and the colors to two different divs. Data will be injected from the same source you already do. The colors will be changed using a small panel you can add, with an update button. Then, use the two different
Divs (one is the data and the other is the colow) as
Input events that trigger a callback that update the graph (you can have multiple inputs that trigger the same output).
** I hope to upload the hack as a post here. I prefer “correct” implementations but I’m having trouble with
bundle.js, specifically the part that handles the dependency injection through the
_dash-dependencies access point.