On this page

How to define views#

What does this guide solve?

This guide will show you how to define views on your dashboard


A view is the final output of a dashboard, but to be able to create a view, at least one data Source is needed. The following example source is a table containing data about individual penguins with various measurements. This source could have been filtered or transformed but is omitted to keep the example simple.

The views are located in the layouts area and can take the form of various visual components. Lumen includes many View types and is built so that you can easily use components from the Holoviz ecosystem, such as a scatter plot from hvPlot or an indicator from Panel.

Below is an example of two views of the same data - a scatter plot and a table.

    type: file
      penguin_table: https://datasets.holoviz.org/penguins/v1/penguins.csv

  - title: Table
    source: penguin_source
      - type: hvplot
        table: penguin_table
        kind: scatter
        color: species
      - type: table
        table: penguin_table
import panel as pn
from lumen.pipeline import Pipeline
from lumen.views import Table, hvPlotView


data_url = "https://datasets.holoviz.org/penguins/v1/penguins.csv"
pipeline = Pipeline.from_spec(
        "source": {"type": "file", "tables": {"penguin_table": data_url}},

pn.Column(hvPlotView(pipeline=pipeline), Table(pipeline=pipeline))

To arrange the Lumen dashboard views in Python, use Panel, as shown here.