-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use webviz container component (#70)
- Loading branch information
1 parent
8627581
commit ba704e3
Showing
10 changed files
with
184 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,6 +40,10 @@ pages: | |
content: | ||
- container: TablePlotter | ||
csv_file: ./example_data.csv | ||
contact_person: | ||
name: Ola Nordmann | ||
phone: +47 12345678 | ||
email: [email protected] | ||
|
||
- title: Plot a table (locked) | ||
content: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import dash_html_components as html | ||
from . import WebvizContainer | ||
|
||
|
||
class ExampleDataDownload(WebvizContainer): | ||
|
||
def __init__(self, app, title: str): | ||
self.title = title | ||
self.set_callbacks(app) | ||
|
||
@property | ||
def layout(self): | ||
return html.H1(self.title) | ||
|
||
def set_callbacks(self, app): | ||
@app.callback(self.container_data_output, | ||
[self.container_data_requested]) | ||
def _user_download_data(data_requested): | ||
return WebvizContainer.container_data_compress( | ||
[{'filename': 'some_file.txt', | ||
'content': 'Some download data'}] | ||
) if data_requested else '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters