Tentative d'angles ronds pour les data tables
This commit is contained in:
@@ -170,6 +170,12 @@ p.version > a {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Dash Table Overrides */
|
/* Dash Table Overrides */
|
||||||
|
table.cell-table,
|
||||||
|
table.cell-table tr {
|
||||||
|
border-color: #fff;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.dash-table-container p {
|
.dash-table-container p {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
@@ -178,11 +184,24 @@ p.version > a {
|
|||||||
.dash-spreadsheet-container
|
.dash-spreadsheet-container
|
||||||
.dash-spreadsheet-inner
|
.dash-spreadsheet-inner
|
||||||
th.dash-header {
|
th.dash-header {
|
||||||
background-color: #b33821;
|
margin: 0;
|
||||||
color: white;
|
color: white;
|
||||||
font-family: "Inter", sans-serif;
|
font-family: "Inter", sans-serif;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
|
padding-right: 12px;
|
||||||
|
border-color: rgb(179, 56, 33) !important;
|
||||||
|
background-color: rgb(179, 56, 33);
|
||||||
|
border-style: solid;
|
||||||
|
border-width: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.cell-table tr:first-of-type th:first-of-type {
|
||||||
|
border-top-left-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.cell-table tr:first-of-type th:last-of-type {
|
||||||
|
border-top-right-radius: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner td {
|
.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner td {
|
||||||
|
|||||||
+30
-6
@@ -91,13 +91,21 @@ def get_yearly_statistics(statistics, today_str) -> html.Div:
|
|||||||
page_size=10,
|
page_size=10,
|
||||||
sort_action="none",
|
sort_action="none",
|
||||||
filter_action="none",
|
filter_action="none",
|
||||||
|
style_cell={
|
||||||
|
"border": "solid 1px rgb(179, 56, 33)",
|
||||||
|
},
|
||||||
|
style_header={
|
||||||
|
"border": "solid 1px rgb(179, 56, 33)",
|
||||||
|
"backgroundColor": "rgb(179, 56, 33)",
|
||||||
|
"color": "white",
|
||||||
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
return html.Div(children=table, className="marches_table")
|
return html.Div(children=table, className="marches_table")
|
||||||
|
|
||||||
|
|
||||||
def get_barchart_sources(df: pl.DataFrame, type_date: str):
|
def get_barchart_sources(df_source: pl.DataFrame, type_date: str):
|
||||||
lf = df.lazy()
|
lf = df_source.lazy()
|
||||||
labels = {
|
labels = {
|
||||||
"dateNotification": "notification",
|
"dateNotification": "notification",
|
||||||
"datePublicationDonnees": "publication des données",
|
"datePublicationDonnees": "publication des données",
|
||||||
@@ -182,6 +190,7 @@ def get_sources_tables(source_path) -> html.Div:
|
|||||||
|
|
||||||
datatable = dash_table.DataTable(
|
datatable = dash_table.DataTable(
|
||||||
id="source_table",
|
id="source_table",
|
||||||
|
data=df.to_dicts(),
|
||||||
columns=[
|
columns=[
|
||||||
{
|
{
|
||||||
"name": columns[i],
|
"name": columns[i],
|
||||||
@@ -204,8 +213,15 @@ def get_sources_tables(source_path) -> html.Div:
|
|||||||
],
|
],
|
||||||
sort_action="native",
|
sort_action="native",
|
||||||
markdown_options={"html": True},
|
markdown_options={"html": True},
|
||||||
|
style_cell={
|
||||||
|
"border": "solid 1px rgb(179, 56, 33)",
|
||||||
|
},
|
||||||
|
style_header={
|
||||||
|
"border": "solid 1px rgb(179, 56, 33)",
|
||||||
|
"backgroundColor": "rgb(179, 56, 33)",
|
||||||
|
"color": "white",
|
||||||
|
},
|
||||||
)
|
)
|
||||||
datatable.data = df.to_dicts()
|
|
||||||
|
|
||||||
return html.Div(children=datatable)
|
return html.Div(children=datatable)
|
||||||
|
|
||||||
@@ -247,9 +263,9 @@ class DataTable(dash_table.DataTable):
|
|||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
dtid: str,
|
dtid: str,
|
||||||
hidden_columns: list = None,
|
hidden_columns: list[str] | None = None,
|
||||||
data=None,
|
data: list[dict[str, str | int | float | bool]] | None = None,
|
||||||
columns: list = None,
|
columns: list[dict[str, str]] | None = None,
|
||||||
page_size: int = 20,
|
page_size: int = 20,
|
||||||
page_action: Literal["native", "custom", "none"] = "native",
|
page_action: Literal["native", "custom", "none"] = "native",
|
||||||
sort_action: Literal["native", "custom", "none"] = "native",
|
sort_action: Literal["native", "custom", "none"] = "native",
|
||||||
@@ -306,6 +322,14 @@ class DataTable(dash_table.DataTable):
|
|||||||
row_deletable=False,
|
row_deletable=False,
|
||||||
page_current=0,
|
page_current=0,
|
||||||
style_cell_conditional=style_cell_conditional,
|
style_cell_conditional=style_cell_conditional,
|
||||||
|
style_header={
|
||||||
|
"border": "solid 1px rgb(179, 56, 33)",
|
||||||
|
"backgroundColor": "rgb(179, 56, 33)",
|
||||||
|
"color": "white",
|
||||||
|
},
|
||||||
|
style_table={
|
||||||
|
"border": "solid 0 white",
|
||||||
|
},
|
||||||
data_timestamp=0,
|
data_timestamp=0,
|
||||||
markdown_options={"html": True},
|
markdown_options={"html": True},
|
||||||
tooltip_duration=8000,
|
tooltip_duration=8000,
|
||||||
|
|||||||
@@ -48,7 +48,6 @@ layout = [
|
|||||||
|
|
||||||
Les statistiques publiées sur cette page ont été produites automatiquement à partir des données les plus récentes ({today_str}).
|
Les statistiques publiées sur cette page ont été produites automatiquement à partir des données les plus récentes ({today_str}).
|
||||||
"""),
|
"""),
|
||||||
dcc.Graph(figure=get_map_count_marches(df)),
|
|
||||||
html.H3(
|
html.H3(
|
||||||
"Statistiques générales sur les marchés",
|
"Statistiques générales sur les marchés",
|
||||||
id="marches",
|
id="marches",
|
||||||
@@ -66,6 +65,7 @@ layout = [
|
|||||||
"""),
|
"""),
|
||||||
html.H4("Statistiques par année"),
|
html.H4("Statistiques par année"),
|
||||||
get_yearly_statistics(statistics, today_str),
|
get_yearly_statistics(statistics, today_str),
|
||||||
|
dcc.Graph(figure=get_map_count_marches(df)),
|
||||||
get_duplicate_matrix(),
|
get_duplicate_matrix(),
|
||||||
html.H3("Nombre de marchés par source dans le temps"),
|
html.H3("Nombre de marchés par source dans le temps"),
|
||||||
dcc.Graph(
|
dcc.Graph(
|
||||||
|
|||||||
Reference in New Issue
Block a user