Cookes and Terms and Conditions

I accept This site stores small pieces of text information called cookies on your computer in order to deliver better content and for statistical purposes. You can disable the usage of cookies by changing the settings of your browser. By using this website without changing your browser settings you are granting permission to store that information on your device.

Any and all use of this Website is subject to our terms and conditions

Live Updating

Live updating uses a websocket connection. The server pushes messages to the UI, and this is then translated into a callback through a dash component.

Each press of a button causes a new random value to be added to that colour's time series in each chart. Separate values are generated for each chart. The top chart has values local to this page, and the bottom chart - including its values - is shared across all views of this page.

Reloading this page, or viewing in a second browser window, will show a new and initially empty top chart and a copy of the bottom chart. Pressing any button in any window will cause all instances of the bottom chart to update with the same values. Note that button presses are throttled so that only one press per colour per second is processed.

{% load plotly_dash %}

{% plotly_message_pipe %}

{% plotly_app name="LiveInput" %}

{% plotly_app name="LiveOutput" %}

{% plotly_app slug="liveoutput-2" %}

Any http command can be used to send a message to the apps. This is equivalent to a press of the red button. Other colours can be specified, including yellow, cyan and black in addition to the three named in the LiveInput app.

curl -d'{"channel_name":"live_button_counter","label":"named_counts","value":{"click_colour":"red"}}'