Skip to content

Commit

Permalink
improvement(graphs): add subtitle from table description
Browse files Browse the repository at this point in the history
Graphs got subtitle based on result table's description.

closes: #496
  • Loading branch information
soyacz committed Jan 21, 2025
1 parent 65f07fe commit 5ab70c6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion argus/backend/service/results_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,10 +311,10 @@ def create_chart_options(table: ArgusGenericResultMetadata, column: ColumnMetada
"""
options = copy.deepcopy(default_options)
options["plugins"]["title"]["text"] = f"{table.name} - {column.name}"
options["plugins"]["subtitle"] = {"text": table.description, "display": True} if table.description else {"text": ""}
options["scales"]["y"]["title"]["text"] = f"[{column.unit}]" if column.unit else ""
options["scales"]["y"]["min"] = min_y
options["scales"]["y"]["max"] = max_y

return options


Expand Down
2 changes: 1 addition & 1 deletion frontend/TestRun/ResultsGraph.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
export let index = 0;
export let test_id = "";
export let width = 500;
export let height = 300;
export let height = 350;
export let responsive = false;
export let releasesFilters = {};
let chart;
Expand Down
2 changes: 1 addition & 1 deletion frontend/TestRun/ResultsGraphs.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
let dateRange = 6;
let showCustomInputs = false;
let width = 500; // default width for each chart
let height = 300; // default height for each chart
let height = 350; // default height for each chart
const dispatch = createEventDispatcher();
Expand Down

0 comments on commit 5ab70c6

Please sign in to comment.