Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
huong-li-nguyen committed Jul 15, 2024
1 parent 88d7a95 commit 846a4fd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion vizro-core/examples/chart-gallery/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
butterfly_page,
distribution_butterfly,
choropleth,
sankey,
sankey_page,
],
navigation=vm.Navigation(
nav_selector=vm.NavBar(
Expand Down
9 changes: 5 additions & 4 deletions vizro-core/examples/chart-gallery/utils/_pages.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Contains custom components and charts used inside the dashboard."""

import json
from typing import List
from urllib.request import urlopen

import pandas as pd
Expand Down Expand Up @@ -73,20 +74,20 @@ def butterfly(data_frame: pd.DataFrame, x1: str, x2: str, y: str):


@capture("graph")
def sankey(data_frame: pd.DataFrame, source: str, target: str, value: str):
def sankey(data_frame: pd.DataFrame, source: str, target: str, value: str, labels: List[str]):
fig = go.Figure(
data=[
go.Sankey(
node=dict(
pad=16,
thickness=16,
# label=labels,
label=labels,
),
link=dict(
source=data_frame[source],
target=data_frame[target],
value=data_frame[value],
# label=labels,
abel=labels,
color="rgba(205, 209, 228, 0.4)",
),
)
Expand Down Expand Up @@ -838,7 +839,7 @@ def butterfly(data_frame: pd.DataFrame, x1: str, x2: str, y: str):
)


sankey = vm.Page(
sankey_page = vm.Page(
title="Sankey",
layout=vm.Layout(grid=PAGE_GRID),
components=[
Expand Down

0 comments on commit 846a4fd

Please sign in to comment.