Bodylight.js

Bodylight.js

  • Docs
  • GitHub

›API

Getting started

  • Introduction
  • Compiling Modelica

Simple project

  • Creating a simple project
  • Adding the model
  • Visualisation
  • Controls
  • Events and Actions

Physiological application

  • Pressure volume cardiac simulator
  • Creating the layout
  • Adding the heart
  • Heart Beat
  • Controls
  • Phases
  • Pressure volume chart
  • Rolling charts
  • Custom actions
  • Buttons
  • Finishing touches

API

  • Model
  • Plotly chart
  • Range
  • Toggle

Plotly chart

clear()

chart.clear()

Removes all traces from the chart, until the next update.

setTraceVisibility()

chart.setTraceVisibility(index, visible)

Shows or hides a trace in the chart. Trace continues to be updated.

  1. indexnumber sequential index of the trace, indexed from 0.
  2. visibleboolean false hides the trace, true displays the trace.

enableTraceUpdates()

chart.enableTraceUpdates(index)

Enables update for a specific trace, identified by it's position in the legend.

  1. indexnumber sequential index of the trace, indexed from 0.

disableTraceUpdates()

chart.disableTraceUpdates(index)

Disables update for a specific trace, identified by it's position in the legend.

  1. indexnumber sequential index of the trace, indexed from 0.

duplicateTrace()

chart.duplicateTrace(index, randomizeColor)

Appends a duplicated trace, this trace will not receive updates.

  1. indexnumber sequential index of the trace, indexed from 0.
  2. randomizeColorboolean if true the duplicated trace will have a different color. Default: true.

deleteTrace()

chart.deleteTrace(index)

Removes specified trace.

  1. indexnumber sequential index of the trace, indexed from 0.

deleteLastTrace()

chart.deleteLastTrace()

Removes last trace.

← ModelRange →
  • clear()
  • setTraceVisibility()
  • enableTraceUpdates()
  • disableTraceUpdates()
  • duplicateTrace()
  • deleteTrace()
  • deleteLastTrace()
Copyright © 2019 Creative Connections s.r.o.