Dash DAQ

Dash is a web application framework that provides pure Python abstraction
around HTML, CSS, and JavaScript.

Dash DAQ comprises a robust set of controls that make it simpler to
integrate data acquisition and controls into your Dash applications.

The source is on GitHub at plotly/dash-daq.

These docs are using version 0.6.0.

>julia using Pkg
>julia Pkg.status("DashDaq")
0.5.0

using Dash

using DashDaq

app = dash()

app.layout = daq_booleanswitch(
  id="my-daq-booleanswitch",
  on=true
)  
run_server(app, "0.0.0.0", debug=true)

**

using Dash

using DashDaq

app = dash()

app.layout = daq_colorpicker(
  id="my-daq-colorpicker",
  label="colorPicker"
)  
run_server(app, "0.0.0.0", debug=true)

**

using Dash

using DashDaq

app = dash()

app.layout = daq_gauge(
  id="my-daq-gauge",
  min=0,
  max=10,
  value=6
)  

run_server(app, "0.0.0.0", debug=true)

**

using Dash

using DashDaq

app = dash()

app.layout = daq_graduatedbar(
  id="my-daq-graduatedbar",
  value=4
)  

run_server(app, "0.0.0.0", debug=true)

**

using Dash

using DashDaq

app = dash()

app.layout = daq_indicator(
  id="my-daq-indicator",
  value=true,
  color="#00cc96"
)  

run_server(app, "0.0.0.0", debug=true)

**

using Dash

using DashDaq

app = dash()

app.layout = daq_joystick(
  id="my-daq-joystick"
)  

run_server(app, "0.0.0.0", debug=true)

**

using Dash

using DashDaq

app = dash()

app.layout = daq_knob(
  id="my-daq-knob",
  min=0,
  max=10,
  value=8
)  

run_server(app, "0.0.0.0", debug=true)

**

using Dash

using DashDaq

app = dash()

app.layout = daq_leddisplay(
  id="my-daq-leddisplay",
  value="3.14159"
)

run_server(app, "0.0.0.0", debug=true)

**

using Dash

using DashDaq

app = dash()

app.layout = daq_numericinput(
  id="my-daq-numericinput",
  min=0,
  max=10,
  value=5
)  

run_server(app, "0.0.0.0", debug=true)

**

using Dash

using DashDaq

app = dash()

app.layout = daq_powerbutton(
  id="my-daq-powerbutton",
  on=true
) 

run_server(app, "0.0.0.0", debug=true)

**

using Dash

using DashDaq

app = dash()

app.layout = daq_precisioninput(
  id="my-daq-precisioninput",
  precision=4,
  value=299792458
) 

run_server(app, "0.0.0.0", debug=true)

**

using Dash

using DashDaq

app = dash()

app.layout = daq_slider(
  id="my-daq-slider",
  value=17,
  min=0,
  max=100,
  targets=Dict("25" => Dict("label" => "TARGET"))
)  

run_server(app, "0.0.0.0", debug=true)

**

using Dash

using DashDaq

app = dash()

app.layout = daq_stopbutton(
  id="my-daq-stopbutton"
)  

run_server(app, "0.0.0.0", debug=true)

**

using Dash

using DashDaq

app = dash()

app.layout = daq_tank(
  id="my-daq-tank",
  min=0,
  max=10,
  value=5
)   

run_server(app, "0.0.0.0", debug=true)

**

using Dash

using DashDaq

app = dash()

app.layout = daq_thermometer(
  id="my-daq-thermometer",
  min=95,
  max=105,
  value=98.6
)  

run_server(app, "0.0.0.0", debug=true)

**

using Dash

using DashDaq

app = dash()

app.layout = daq_toggleswitch(
  id="my-daq-toggleswitch"
)  

run_server(app, "0.0.0.0", debug=true)

**

using Dash

using DashDaq

app = dash()
theme = Dict(
    "dark" => false,
    "detail" => "#007439",
    "primary" => "#00EA64",
    "secondary" => "#6E6E6E"
)

app.layout = html_div(id="dark-theme-provider-demo", children=[
  html_br(),
  daq_toggleswitch(
      id="daq-light-dark-theme",
      label=["Light", "Dark"],
      style=Dict("width" => "250px", "margin" => "auto"),
      value=false
  ),
  html_div(
      id="dark-theme-component-demo",
      children=[
          daq_darkthemeprovider(theme=theme, children=daq_knob(value=6))
      ],
      style=Dict("display" => "block", "margin-left" => "calc(50% - 110px)")
  )
])

callback!(
  app, Output("dark-theme-component-demo", "children"), 
  Input("daq-light-dark-theme", "value")) do dark_theme
    if dark_theme
      theme["dark"] = true
    else
      theme["dark"] = false
    end
    return daq_darkthemeprovider(theme=theme, children=daq_knob(value=6))
end

callback!(
  app, Output("dark-theme-component-demo", "style"), 
  Input("daq-light-dark-theme", "value")) do dark_theme
    if dark_theme
      return Dict("background-color" => "#303030", "color" => "white")
    else
      return Dict("background-color" => "white", "color" => "black")
    end
end

run_server(app, "0.0.0.0", debug=true)

**