reno.explorer.DiagramPane#

class reno.explorer.DiagramPane(model, **params)#

Bases: WidgetBase, PyComponent, Reactive

A model exploration widget that can be displayed within a tab, a stock and flow diagram to visually display how model equations/components are connected.

Methods

__init__(model, **params)

clone(**params)

Makes a copy of the object sharing the same parameters.

controls([parameters, jslink])

Creates a set of widgets which allow manipulating the parameters on this instance.

embed([max_states, max_opts, json, ...])

Renders a static version of a panel in a notebook by evaluating the set of states defined by the widgets in the model.

fire_on_cache_invalidated()

Trigger all callback functions registered for the cache_invalidated event.

from_dict(data)

Deserialize data into current instance from dictionary previously stored from to_dict().

from_param(parameter, **params)

Construct a widget from a Parameter and link the two bi-directionally.

from_values(values, **params)

Creates an instance of this Widget where the parameters are inferred from the data.

get_root([doc, comm, preprocess])

Returns the root model and applies pre-processing hooks

jscallback([args])

Allows defining a JS callback to be triggered when a property changes on the source object.

jslink(target[, code, args, bidirectional])

Links properties on the this Reactive object to those on the target Reactive object in JS code.

link(target[, callbacks, bidirectional])

Links the parameters on this Reactive object to attributes on the target Parameterized object.

on_cache_invalidated(callback)

Register a callback for any time a previous exported file will no longer match/cached file is no longer valid or current.

render([traces])

Update the visible components of this widget.

save(filename[, title, resources, template, ...])

Saves Panel objects to file.

select([selector])

Iterates over the Viewable and any potential children in the applying the Selector.

servable([title, location, area, target])

Serves the object or adds it to the configured pn.state.template if in a panel serve context, writes to the DOM if in a pyodide context and returns the Panel object to allow it to display itself in a notebook context.

server_doc([doc, title, location])

Returns a serveable bokeh Document with the panel attached

show([title, port, address, ...])

Starts a Bokeh server and displays the Viewable in a new tab.

to_dict()

Serialize this pane to a dictionary that can be saved to file.

to_html()

Get an HTML-compatible string for the contents of this pane.

Attributes

align

aspect_ratio

css_classes

design

fit

height

height_policy

include_dependencies

loading

margin

max_height

max_width

min_height

min_width

name

param

rx

show_vars

sizing_mode

sparkdensities

sparklines

styles

stylesheets

tags

universe

value

visible

width

width_policy

__annotations__ = {}#
__module__ = 'reno.explorer'#
__panel__()#
fire_on_cache_invalidated()#

Trigger all callback functions registered for the cache_invalidated event.

fit = True#
from_dict(data)#

Deserialize data into current instance from dictionary previously stored from to_dict().

Parameters:

data (dict)

include_dependencies = False#
name = 'DiagramPane'#
on_cache_invalidated(callback)#

Register a callback for any time a previous exported file will no longer match/cached file is no longer valid or current.

Parameters:

callback (Callable)

render(traces=None)#

Update the visible components of this widget. We save a base64 representation of the diagram so it can be used in the to_html() call.

show_vars = True#
sparkdensities = False#
sparklines = True#
to_dict()#

Serialize this pane to a dictionary that can be saved to file.

Return type:

dict

to_html()#

Get an HTML-compatible string for the contents of this pane. This is used for generating exported standalone reports, see tab_exporter.

For this pane, this works by creating a base64 representation of the diagram and embedding that directly in the string output.

Return type:

str

universe = []#