Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Increase the default font size for chart axes and the calendar widget. * Increase default font size in charts Signed-off-by: F.N. Claessen <felix@seita.nl> * Create util function for merging chart specs Signed-off-by: F.N. Claessen <felix@seita.nl> * Refactor legibility defaults Signed-off-by: F.N. Claessen <felix@seita.nl> * Switch parent and child Signed-off-by: F.N. Claessen <felix@seita.nl> * Generalize how string fields are updated with dicts Signed-off-by: F.N. Claessen <felix@seita.nl> * Switch one month at a time in the calendar Signed-off-by: F.N. Claessen <felix@seita.nl> * Increase calendar font size Signed-off-by: F.N. Claessen <felix@seita.nl> * Support string field updating for both parent and child dicts Signed-off-by: F.N. Claessen <felix@seita.nl> * Changelog entry Signed-off-by: F.N. Claessen <felix@seita.nl> * Add test for util function Signed-off-by: F.N. Claessen <felix@seita.nl>
- Loading branch information
Showing
5 changed files
with
88 additions
and
1 deletion.
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
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,24 @@ | ||
import pytest | ||
|
||
from flexmeasures.data.models.charts.defaults import merge_vega_lite_specs | ||
|
||
|
||
@pytest.mark.parametrize( | ||
"default_specs, custom_specs, expected_specs", | ||
[ | ||
( | ||
{"legend": {"titleFontSize": 16}}, | ||
{"title": "foo"}, | ||
{"legend": {"titleFontSize": 16}, "title": "foo"}, | ||
), | ||
( | ||
{"title": {"fontSize": 16}}, | ||
{"title": "foo"}, | ||
{"title": {"fontSize": 16, "text": "foo"}}, | ||
), | ||
], | ||
) | ||
def test_merge_vega_lite_specs( | ||
default_specs: dict, custom_specs: dict, expected_specs: dict | ||
): | ||
assert merge_vega_lite_specs(default_specs, custom_specs) == expected_specs |
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